Please enable / Bitte aktiviere JavaScript!
Veuillez activer / Por favor activa el Javascript![ ? ]
How to find a point on the circumference of a circle? - bug-code.com Q&A

How to find a point on the circumference of a circle?

0 like 0 dislike
27 views
asked by (4.3k points) | 27 views

1 Answer

0 like 0 dislike

Use this parametric equation for a circle:

 

x = cx + r * cos(a)

y = cy + r * sin(a)

Where r - radius, cx,cy -origin, and a - angle.

 

Pay attention, that most languages require radians for the angle in trig functions, so it would be better to cycle through 0..2PI radians, then through 0..360 degrees

answered by (8.5k points)
Welcome to Bug-code Q&A, where you can ask questions and receive answers from other members of the community.

24.8k questions

46.2k answers

0 comments

12.7k users

24,788 questions
46,220 answers
0 comments
12,685 users