delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/10/17/20:13:30.1

Message-ID: <007c01bdfa2c$81be9da0$827d14cb@dragon>
From: "James Takac" <pdragon AT jtn DOT net DOT au>
To: <djgpp AT delorie DOT com>
Subject: Re: 3d sphere
Date: Sun, 18 Oct 1998 10:10:43 +1000
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
X-MIME-Autoconverted: from 8bit to quoted-printable by icc.net.au id KAA06640
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id UAA29274
Reply-To: djgpp AT delorie DOT com

actually you only need to calculate 1/8th of the circle and plot both
positive and negative values of the coords
-----Original Message-----
From: Arthur <arfa AT clara DOT net>
To: djgpp AT delorie DOT com <djgpp AT delorie DOT com>
Date: Sunday, October 18, 1998 5:28 AM
Subject: RE: 3d sphere


>> If you are not speed dependen, make two loops:
>> loop b=0° to 180°
>>  loop a=0° to 180°
>>   ribbon=cos(b)
>>   offset in ribbon=cos(a)
>>   screenpos= (a,b)
>>
>> offcourse you have to multiply a and b with different konstants,
>> bependin on how many ribbons you have, how big they are and the size of
>> the sphere on screen.
>>
>> cos(a) and cos(b) witt ossilate between -1 and 1 so if you want a screen
>> x-size of 100, make screen_x=cos(a)*50+50;
>>
>> Hop it helped(and hope it works, BTW, ordinary sin() and cos() works
>> with radians, radians=degrees*pi/180 so use sin(a*3.1415/180) etc).
>
>Remember that for a circle, you only need to calculate one quarter of it,
>since the other four quarters are simply mirror images of the first quater.
>
>James Arthur
>jaa AT arfa DOT clara DOT net
>ICQ#15054819
>

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019