quick circle plotting help needed ...

Hi All,

I need an openGL routine that plots a circle or circles and later on at different locations using Salford FTN95 fortran compiler. The data available would be x and y coordinates of the centre and the radius. I really would like to see if this would work satisfactorily for me as a first step before I get the books out on openGL and spend ages.

This may appear completely trivial to some of you but I would appreciate a piece of fortran code that plots these circles in a kind of animated fashion.

Thanks in advance,

Ozi

If I remember correct (correct me oltherwise).

xpos = x + radius * cos( angle)
ypos = y + radius * sin( angle)

Where angle is in radians, the problem here is to calculate the number of segments to use to get a nice looking circle, not sure if there is a good algorithm for that.

Mikael

[This message has been edited by mikael_aronsson (edited 12-24-2002).]

i hope u’ve got the hint.
Mikael is pretty much corret.

If u want an accurate circle ,search the WEB for the Bresenham algorithm.