# Rotating Triangles Problem

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

## Recommended Posts

hi I have got two triangles, one in ABC(x, z) plane and another in LMN(y, z) plane. One point of both triangles is at origin. Now I want to rotate these triangles along X and Y axis. Following are the equations. /*********************/ Triangle 1 (ABC) /*********************/ Point1.x = 0; Point1.y = 0; Point1.z = 0; TempAngle = 270-(FOV/2)-Camera_Y_Angle Point2.x = cos(TempAngle); Point2.y = sin(Camera_X_Angle); Point2.z = sin(TempAngle)*cos(Camera_X_Angle); TempAngle = 270+(FOV/2)-Camera_Y_Angle Point3.x = cos(TempAngle); Point3.y = sin(Camera_X_Angle); Point3.z = sin(TempAngle)*cos(Camera_X_Angle); /*********************/ Triangle 2 (LMN) /*********************/ Point1.x = 0; Point1.y = 0; Point1.z = 0; TempAngle = Camera_X_Angle+FOV/2 Point2.x = cos(Camera_Y_Angle+270); Point2.y = sin(TempAngle); Point2.z = sin(Camera_Y_Angle+270)*cos(TempAngle); TempAngle = Camera_X_Angle-FOV/2 Point3.x = cos(Camera_Y_Angle+270); Point3.y = sin(TempAngle); Point3.z = sin(Camera_Y_Angle+270)*cos(TempAngle); Problems faced: I'm not getting positive Z co-ordinates when rotating about X axis. Rest everything works fine. Plz advice.

1. 1
Rutin
28
2. 2
3. 3
4. 4
5. 5

• 12
• 13
• 11
• 10
• 13
• ### Forum Statistics

• Total Topics
632953
• Total Posts
3009441
• ### Who's Online (See full list)

There are no registered users currently online

×