#### Archived

This topic is now archived and is closed to further replies.

# a matter of degree and trigonometry

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

## Recommended Posts

Hi, i''m trying to calculate a point with a formula, i dont know how to write the formula, and dont know much of trigonometry too: I cant draw it here, so... if i have a point P1 in 3 dimensions , and VposP1[3] and VdirP1[3] are respectively his position and direction vectors, and i want to attach another point P2 to P1 so that P2 has always the same direction than P1 and the same position too(except the Z dimension), infact P2.pos.z = (P1.pos.z + 50), how can i calculate the new position of P2 respect to any rotation of P1, if i want that P2 be always on the P1.dir.z axis( always behind P1), i saw that the problem is like to have to go in circle P2 around P1, how to calculate the new position of P2 after a journey on the circle around P1 in regard to a rotation on the Y axis of the point P1? i have set: P2.dir.x = P1.dir.x; // these are in degree P2.dir.y = P1.dir.y; P2.dir.z = P1.dir.z; P2.pos.x = P1.pos.x; // these are in lenght unit P2.pos.y = P1.pos.y; P2.pos.z = P1.pos.z + 50; But i need to use sin() and cos() to calculate the position after the journey around P1... Someone can help me? Thanks Kev

##### Share on other sites
What you''ll need is a parametric equation. x=cos(t), y=sin(t), where t is some variable.

I''m having trouble visualizing what rotations you''re asking for. It would help if you have an image on the net I could look at.

1. 1
2. 2
Rutin
18
3. 3
4. 4
5. 5

• 9
• 9
• 14
• 12
• 10
• ### Forum Statistics

• Total Topics
633273
• Total Posts
3011168
• ### Who's Online (See full list)

There are no registered users currently online

×