B
B
Bogdan Khvalko2020-05-18 17:57:05
PHP
Bogdan Khvalko, 2020-05-18 17:57:05

Find the points of the circle?

I draw an image.
There is a 500 x 500 pixel square. A circle with a center of 255 x 225 is inscribed in it.

5ec2a15e28ecf239256849.png

You need to divide the square into n equal parts (I have 27).
How to find these points of the circle to draw lines for dividing?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
Lander, 2020-05-18
@quitting

School trigonometry course:
Entire circle - 2*PI radians. One sector that you need - k = 2*PI / 27
Further in the loop k * i (loop counter) - translate into coordinates with zero in the center of the circle (Yes, you will need to use sines / cosines here)
Then translate these coordinates into screen . Everything. I think you'll figure it out yourself.

O
Oleg, 2020-05-18
@politon

look for points and draw imagearc

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question