How to make a circle :?

Joined
Dec 31, 2015
Messages
712
Reaction score
27
0x32789 said:
How do I make a circle out of X and Y positions? A small circle..

Provide more info - which one? http://imgur.com/a/Xyqev 
And you want to draw it on screen or what?
Maybe I can help with something cuz that's interesting
 

0x_

Wtf I'm not new....
Administrator
Joined
Feb 18, 2013
Messages
1,118
Reaction score
166
http://www.mathopenref.com/coordparamcircle.html

REALLY-REALLY-PSEUDOCODE:

Let's say you want to get each point of a full (360°) circle.

LOOP 0,360 (where the current "degree" is i)
FOR EACH
a = (i * PI) / 180; // convert degrees to radians
x = your_x + (cos(a) * radius)
y = your_y - (sin(a) * radius)
END

^ very rough I only "explained" stuff which didn't get explained in the link above, maybe someone who is more capable of me in explaining this stuff could hop in.
 

0x32789

Expert
Joined
May 26, 2014
Messages
849
Reaction score
51
Location
LongForgotten <-> 0x32789
0x688 said:
http://www.mathopenref.com/coordparamcircle.html

REALLY-REALLY-PSEUDOCODE:

Let's say you want to get each point of a full (360°) circle.

LOOP 0,360 (where the current "degree" is i)
FOR EACH
a = (i * PI) / 180; // convert degrees to radians
x = your_x + (cos(a) * radius)
y = your_y - (sin(a) * radius)
END

^ very rough I only "explained" stuff which didn't get explained in the link above, maybe someone who is more capable of me in explaining this stuff could hop in.

Thanks

supahdupahnubah said:
0x32789 said:
How do I make a circle out of X and Y positions? A small circle..

Provide more info - which one? http://imgur.com/a/Xyqev 
And you want to draw it on screen or what?
Maybe I can help with something cuz that's interesting
Not on screen, but for something else  ;)
 
Top