DPRG
DPRG List  



[DPRG] math I once knew

Subject: [DPRG] math I once knew
From: Dan Miner miner at centtech.com
Date: Fri Dec 20 10:30:02 CST 2002

Dave,

That's close but you have sin/cos backwards.

x = r * cos (theta) + Xc
y = r * sin (theta) + Yc

where (Xc,Yc) is the center of the circle.

				- Dan Miner

> -----Original Message-----
> From: Dave Hylands [mailto:dhylands at broadcom.com]
> Sent: Friday, December 20, 2002 10:07 AM
> To: 'Sluggy!'; dprg
> Subject: RE: [DPRG] math I once knew
> 
> 
> Hi Sluggy,
> 
> I think that this is what you want:
> 
> x = r * sin( theta )
> y = r * cos( theta )
> 
> -- 
> Dave Hylands
> Vancouver, BC, Canada
> http://www.DaveHylands.com/
> 
> 
> > -----Original Message-----
> > From: Sluggy! [mailto:slugmusk at linuxlegend.com]
> > Sent: Friday, December 20, 2002 7:50 AM
> > To: dprg
> > Subject: [DPRG] math I once knew
> > 
> > 
> > Hey, folks...
> > 
> > I have a question about some math I once knew but don't 
> remember the 
> > details of.
> > 
> > I need to be able to plot X and Y coordinates for points 
> laying in a 
> > circle, in this case, the minute and hour points on a clock face.
> > 
> > I used to do this all the time drawing circles and radar 
> > screens and the 
> > like on the Commodore 64 and even on my first IBM clone. Thus far, 
> > everything I have found online seems to be a tool to give you 
> > back the 
> > picture, not the coordinates for the points.
> > 
> > As I recall, the algorithm was such that you plug in the 
> > coordinates of 
> > the center point, units of diameter and an an angle in 
> degrees for a 
> > given point. To scribe a circle, you simply stepped through 
> > the range on 
> > 0 to 359 for the angle, drawing a line between each set of points. 
> > Actually, I think there were two steps, one for the X 
> coordinate, one 
> > for the Y.
> > 
> > Anyway, if anyone has a lead on this, it would be appreciated! :)
> > 
> > Sluggy!
> > 
> > _______________________________________________
> > DPRGlist mailing list
> > DPRGlist at dprg.org
> > http://nimon.ncc.com/mailman/listinfo/dprglist
> > 
> 
> _______________________________________________
> DPRGlist mailing list
> DPRGlist at dprg.org
> http://nimon.ncc.com/mailman/listinfo/dprglist
> 

More information about the DPRG mailing list