开发者

Isometric projection : What's wrong with my math?

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 开发者_Go百科projection?


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);
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜