How to catch the points of a circle through an angle in a Cartesian plane?

Asked

Viewed 68 times

1

Imagine a circle with a radius of five on 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 it is possible to discover the x and y just through any angle.

  • Problems involving mathematics are interesting, but they need to be involved in the scope of some programming. In your case, it seems to me just a question of ordinary mathematics.

  • It is really a mathematical question, but will be used in a software with 3D canvas.

  • Then it would be necessary to show in the question the code involved as well as the language used.

  • My question is only related to mathematics. I couldn’t find this equation on google. I was only able to find things directly related to the circumference arch which is not useful to me. I can pass the project link, but my doubt is completely mathematical.

  • I would recommend adjusting the question so that it has a programming face and not math. So you have chances to get an answer. As it stands it will probably be closed because it is outside the scope of the site.

  • The programmer community was once much more user friendly. I posted this question, as you say "with a programming face" here And I was flunked out as if I had asked an absurd question, and now I’m again being sensuous. Is it so difficult to give a mathematical formula to someone who doesn’t know? = ( (Sad)

  • It is that the site deals with subjects related to programming, and not mathematics. Maybe there is a Stack network site that deals with mathematics. Research.

  • Here’s a look: https://math.stackexchange.com/

  • That actually helps me! I’m going to post that same question there. Still I’m going to leave this one open for now. When you have a solution I put to answer here. It is not possible that I am the only one who does not know how to do it. Thank you, for now.

  • If you can get there put the link here for us to know. Good luck!

  • People don’t close things up out of spite. Each Stackexchange network simply has different scopes and therefore handles different problems/questions. So you have to put your question on the right network under penalty of being closed abruptly.

  • The question I referred to is in the right scope. In a programming scope with programming-oriented language.

  • Directly from the time of the 8-bit computers, considering the center of the circle as center in (0,0), radius equal to 5 and angle in radians -- X=0, Y=0, Radius=5 -- X'=X+Raio×Seno(Angulo) and Y'=Y-Raio×Cosseno(Angulo)

  • Only a correction to stay in the right sequence... X'=X+Raio×Cosseno(Angulo) and Y'=Y'+Raio*Seno(A)

  • Thanks Giovanni. I believe this is the formula I was looking for. Just one more thing, in X' the quote means something mathematically speaking?

Show 10 more comments

1 answer

2


After much research I learned how this should be done and also that many people also have that same doubt. Believe it or not, despite being something simple and pure elementary school mathematics is a little commented content on the Internet, at least it was the impression that I had. Perhaps people imagine that it is something so simple that they assume that everyone already knows as well as no one imagines that someone can not multiply... Finally...

Anyway the answer is as Giovanni Nunes mentioned. It follows code:

https://jsfiddle.net/s67Lmx1a/39/

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 get the radians from that angle. That was the missing part for my code to work.

  • 1

    For that adventurer who comes to read this answer, always have in your heart the following phrase: unless otherwise specified, the math library you are using will work with radians, will hardly work with degrees.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.