-
If I knew the centre point, the radius, and the point (in degrees 0-359) I wanted to draw, how would I draw it?
(this should return X and Y, the point of the point... I hope I make sense!) I want to make a circle pixel by pixel so I need to know how to get the pixel!
-
http://www.sparkseek.com/cgi-bin/sea...&qry=bresenham
http://www.gamedev.net/reference/art...article767.asp
Try those links, they ought to explain a few things. It's a highly historical problem, drawing circles. Back when computers were incredibly slow by today's standards, it was a big deal drawing a circle. Thankfully it's pretty easy now :)
-
Thats allright, I found it out...
Here it is, for any curious ppl
X = OriginX + cos(degree) * radius
Y = OriginY + sin(degree)*radius
-
Oh, well just drawing a circle like that is very inefficient and slow, but never mind. Sorry, I would have said that but I thought you'd want something fast.
-
When you use Visual Basic to draw a circle with this code you will have to convert the degrees into radiant,
i mean you will have to multiply the degree value with PI/180 before you use it.