How do you get the points of a circle through an angle in a Cartesian plane?

1

Imagine a circle with a radius of 5 in the Cartesian plane. By analogy I already know the following angles:

0° (ou 360°): (x =  5, y =  0)
90°         : (x =  0, y =  5)
180°        : (x = -5, y =  0)
270°        : (x =  0, y = -5)

Assuming the center is x = 0 and y = 0, of course.

I would like an equation where you can find x and y only through any angle.

    
asked by anonymous 14.04.2018 / 23:13

1 answer

2

After much research I learned how this should be done and also that many people also have this same doubt. Believe it or not, although it is something simple and pure mathematics of elementary education is an uncommented content on the internet, at least it was the impression I had. Perhaps people imagine it to be something so simple that they assume that everyone already knows this way as no one imagines that someone may not know how to multiply ... Anyway ...

In any case, the answer is as Giovanni Nunes mentioned. Here is the code:

link

var x = Math.cos(angulo * Math.PI / 180) * raio;
var y = Math.sin(angulo * Math.PI / 180) * raio;

Ps .: Multiply the angle by PI and divide by 180 to obtain the radians of this angle. This was the missing part for my code to work.

    
17.04.2018 / 02:25