views:

437

answers:

1

I have an math problem in Isometric projection. I have reading an article: Axonometric projections - a technical overview. For the Isometric projection part, it give an mathematical formula for conversion 3D point into 2D point for the x part the formula is:

x' = ( x − z ) cos(30);

But i also check for wiki for Isometric Projection so i use the rotation matrices which the wiki giving, calculate myself

x' = x*cos(beta) - z*sin(beta)

The beta is define by the wiki(Y axis rotation angle, and it should be 45). So what's wrong with my math? Or is there something that i don't know about the Isometric projection?

+1  A: 

Are you sure your cos and sin take degrees and not radians?

// C/C++ code

#define PI 3.141592654
static const float PI_RADIANS = PI / 180.f;

inline float DegToRad(float a_Degrees)
{
   return (a_Degrees * PI_RADIANS);
}

inline float RadToDeg(float a_Radians)
{
   return (a_Radians / PI_RADIANS);
}
knight666
is not for the code part, what i use .cosTheta = Math.cos(30 * Math.PI / 180);what i mean is for the right calculate should be 30,but i calculate is 45, i don't know what'wrong T-T.please help me.
Tunied
Where do you get 45? If all three dimensions (X,Y,Z) are symmetric, the angle between the axes should be 120... and, (120-90)=30.
comingstorm
the 45 is comming from rotation matrix ,true Isometric projection is rotation y-axis 45 degrees then rotation x-axis 35.5 degrees. for game Isometric projection is rotation y-axis 45 degrees then rotation x-axis 30 degrees.
Tunied