Message-ID: <007c01bdfa2c$81be9da0$827d14cb@dragon> From: "James Takac" To: Subject: Re: 3d sphere Date: Sun, 18 Oct 1998 10:10:43 +1000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" 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 Content-Transfer-Encoding: 8bit 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 To: 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 >