View Full Version : quick circle plotting help needed ...

12-23-2002, 09:50 AM
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,


12-23-2002, 11:30 AM
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.


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

12-29-2002, 11:49 PM
i hope u've got the hint.
Mikael is pretty much corret.

12-30-2002, 12:27 PM
If u want an accurate circle ,search the WEB for the Bresenham algorithm.