# Circle calculation

This topic is 5125 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi iam not that good in math, doing my best to get better. so i got a question about a circle and a graphic x,y. if i got a point on 5,0(x,y) and i would like to get 20 degrees up/left how could i calculate the new point? hope iam clear and it doesn't sound like rubisch :)

##### Share on other sites
what is new point? Should it be placed on circle? On what circle exactly?
What is 20 degrees up left?

Or you want to turn your point conterclockwise by 20 degrees?
In second case, rotation is given by
5*cos(20)-0*sin(20)
5*sin(20)+0*cos(20)

of course 0*something=0

edit: and rotation is around origin.

##### Share on other sites
thank you so far for the information.

i ment radius of 5, center is on 0,0. and move 20 degrees then both directions are actually fine.

am i giving enough information or am i missing something?

Edit:
what i got now is.

po = 0,5
moving on the (x,y) 45 degrees is.
5 * cos(45) = x
5 * sin(45) = y
then i have the new x,y position.

[Edited by - Mexx Cuter on November 27, 2004 9:24:20 AM]

##### Share on other sites
Dude, I've added you to my MSN contact list - all you need to do is to log-in and talk to me, I'll explain it to you personally :).
By the way, this's my msn adress, feel free to add me if you blocked me or deleted me from some reason: ariyes@bezeqint.net .
Yours, Arie.

##### Share on other sites
Quote:
 Original post by Mexx Cuterthank you so far for the information.i ment radius of 5, center is on 0,0. and move 20 degrees then both directions are actually fine.am i giving enough information or am i missing something?Edit: what i got now is.po = 0,5radius is 5 moving on the (x,y) 45 degrees is.5 * cos(45) = x5 * sin(45) = ythen i have the new x,y position.

It's usually called turning around zero. Yes, your formule is right, and will be right for 20 degrees too.

edit: if your actual *code* is like that, it will not work. In most programming languages, sin & cos take angle in radians. You need to use
sin(angle*(pi/180.0))
and
cos(angle*(pi/180.0))

1. 1
2. 2
Rutin
30
3. 3
4. 4
5. 5
khawk
14

• 11
• 11
• 23
• 10
• 9
• ### Forum Statistics

• Total Topics
633647
• Total Posts
3013108
×