# Why when I do an isometric projection do I get a “dimmetric” view?

First of all I would like to apologize for my poor English. It is not my native language.

I have some doubts about isometric projection that perhaps I do not know how to describe them and I would like to appeal to your knowledge to evacuate them.

I am introducing in the area of video games, doing some research, and testing some concepts.

I am following the article on wikipedia: https://en.wikipedia.org/wiki/Isometric_projection

And the help given in this question: Rendering models in isometric view

My intention is to achieve an isometric view of a 3D world. Where (x, y, z) will be (width, length, height) of it.

X axis: horizontal: -x to the left, + x to the right.

Y axis: vertical: + and up, -y down

Z axis: + z towards the screen, -z away from the screen

This world with such an arrangement of axes is projected isometrically.

Therefore following the previous links I have made a rotation/projection matrix with the angles (-35.264º, 45º) = (atan(-1/sqrt(2), PI/4) on the X and Z axis:

M = Rx(atan(-1/sqrt(2)) * Rz(PI/4)

Where Rx and Rz are the matrices of rotations on the x and z axes respectively. With this I get the following results (rounded to 5 decimal places):

$$\begin{pmatrix} 0.70711 & -0.70711 & 0.0\\ 0.57735 & 0.57735 & 0.57735\\ -0.40825 & -0.40825 & 0.81650\end{pmatrix}$$

Now suppose I have a 1x1x1 cube whose centroid is at the origin (0,0,0). When doing the multiplication: M * V

Where V is a column matrix with the coordinates of the 8 points of the cube $$\begin{pmatrix} -0.5&0.5&-0.5&-0.5&0.5&0.5&-0.5&-0.5\\ -0.5&0.5&0.5&-0.5&-0.5&0.5&0.5&-0.5\\ -0.5&-0.5&-0.5&-0.5&0.5&0.5&0.5&0.5\end{pmatrix}$$

Instead of getting an isometry, I'm getting a dimetry! I see this when I measure the angles between the axes. And they give me 130º, 100º, 130º. When the theory says that it should get 120º, 120º, 120º. The result is:

$$\begin{pmatrix} 0.70711&0.0&-0.70711&0.0&0.70711&0.0&-0.70711&0.0\\ -0.28868&0.28868&-0.28868&-0.86603&0.28868&0.86603&0.28868&-0.28868\\ -0.40825&-0.8165&-0.40825&0.0&0.40825&0.0&0.40825&0.8165\end{pmatrix}$$

As my equipment is broken and the computer I am using is borrowed, I do not have my working tools to thoroughly test this. And I have relied on Excel and graphing by hand. At the time of drawing, and measuring the angles between the axes formed with the protractor I obtain that:

Angle XY: 100º

Angle XZ: 130º

Angle YZ: 130º

So the angle between the horizontal and X, or Y is 40º instead of being 30º

What am I doing wrong? Has the rounding of decimals in M been so marked that there is this difference in the projection?

EDIT I am attaching a photo of the resulting Viso matrix. Please excuse the poor quality of the photo, but I do not have good lighting and the camera is not entirely good.

Maybe it is not my best graph, but it is quite noticeable that the angles are not 120º as the theory indicates.

EDIT 2:

Continuing with my calculations, I decided to calculate the matrix in Wolfram Alpha to check if I was doing the steps well.

The calculated rotation / projection matrix does not differ from the one I explained previously, if we consider the rounding of decimals to 5 decimals. You can see the exact matrix at this link.

And then I proceeded to calculate the angle between the unit vectors x and y, to be surprised that it is approximately 101.5º. When making my graph, I have screwed up for only 1.5º

Now, if the angle is calculated considering the 3 dimensions of the vectors x and y, it obtains as expected 90º

This makes me uneasy since, I am following exactly the angles indicated in the sources that I have already cited previously.

What am I doing wrong?

EDIT 3:

In a basic test, trying to make the angles between the axes be 120º, I found that with a rotation angle of 60º instead of 35,264º, I achieved a very good approximation. But I will have to check my calculations well. And don't trust too much what the transporter says.

Any help I will be very grateful

EDIT 4 - 2020-04-26 (and possible self-response) :

I have set out to analyze what was happening in my calculations and rotations. I have come to an answer to this, although I am not completely sure, I have a 1% doubt and that is enough for me not to answer my own question.

Everything seems to be due to a particularity of how I am facing the design of my world (which at least for me, is natural and appropriate). My 3D world is oriented so that the axes are:

x-axis: width of the world

y-axis: Long of the world

z-axis: height of the world

And the orientation is such that:

x: horizontal

y: vertical

z: perpendicular

This is the logical representation of the world.

The theoretical development indicates that the isometric projection is obtained by making two rotations (atan(1/sqrt(2), pi/4) on the axes (x,z).

But since my z axis is rotated with respect to x by 90º (pi/2) instead of applying atan(1/sqrt(2)), it must be the complementary angle of this: acos(1 /sqr(3)).

Furthermore, the angle must be negative to obtain a view from the top. Otherwise you get a view from the bottom to the top.

Therefore the angle sought is -cos(1/sqrt(3)), which is approximately -54.7356º.

With this new angle when applying the combined rotation Rx*Rz we obtain the correct matrix.

And now you can see a correct symmetrical projection instead of an "approximate" dimetry. The calculations of the angle between the unit axes can be made and they will be able to verify that the angles will indeed be 90º between them. In a similar way, it can be verified that if we take columns of this matrix as vectors the coordinates (x, y) and measure the angle between them and it will effectively be 120º.

You can use the widget in Wolfram Alpha in case you want to check the latter.

The development I made to get to this angle is much longer. What I exposed here is the short story.

I wasn't testing silly angles. Instead I went in the opposite direction, starting from what the resulting matrix should look like, and analyzing what values meet the conditions of the angles for an orthogonality, as well as the projection (x, y) being 120º.

At my first impression, it was a mere coincidence that the final angle for rotation in Rx () is the complement of atan(1/sqrt(2))

If the reasoning that I have carried out is sufficient to finish the topic, and if it turns out to be interesting for others, I can explain the analytical procedure of how this famous angle is reached. For this instead of editing, I will give a formal answer to my question.

I think a good time has passed, and to tell the truth I am a little disappointed because this has become a monologue. And my intention is that someone else could explain to me what was wrong. It must be that my question is not attractive enough, or that such an exhaustive and detailed description of my problem is boring.

• I don't think I was wrong in the sense of rotations when calculating the matrix M by combining both rotations. But if I can give myself time during the weekend I could evaluate this point. I will try to upload an image of what I get, maybe it helps to understand what happens with that matrix M. – Marcelo Cuadrado Apr 16 at 15:51
• I've already been looking for some bibliographic source, and everything points to these same angles: 35,264º and 45º. I have tried to try to find the angle for Rx () * Rz () that allows me to obtain the famous regular hexagon, and the angle that approximates this is 60º. But as soon as I calculate the internal angle between the unit vectors of the x and y axes of this resulting matrix Wolfram Alpha doesn't give me anything. Now, if I limit myself to the x, y coordinates of these vectors, the calculation returns a value of 126.87º. I don't know what to think about all this anymore. – Marcelo Cuadrado Apr 18 at 20:05

Well I think too much time has passed and I don't want to extend this too much. Perhaps what I asked was so silly and absurd that I didn't deserve to spend some time on it, or that it's complex enough that nobody dared to comment.

Whatever the reasons for the lack of participation, it doesn't matter anymore. I am able to answer myself.

As I said before, the correct angle for my case is -acos(1/sqrt(3)). I explain here how to get to this one.

We have a rotation/projection matrix that combines two rotations: one on the x axis and one on the z axis:

M = Rx(?)*Rz(45º)

This multiplication will produce a matrix that takes the following form:

$$\begin{pmatrix} a & -a & 0.0\\ b & b & c\\ d & d & e\end{pmatrix}$$

A few things must also be accomplished:

1. The angle between the column vectors must be 90º to guarantee orthogonality
2. In turn, the vectors [a, b] and [-a, b] must have an angle of 120º
3. Similarly, the angle between vectors [a, b] and [0, -c] must also be 120º
4. By colorary of point 2, We have that the angle between [a, b] and the x axis must be 30º

The value of a can be obtained directly by the multiplication of matrices, and by the characteristics of these is that it is reduced to: a = sin(pi/4) = 1/sqrt(2)

By trigonometry we know that those 30º indicated in point 4 respond to:

tan(30º) = b/a

So that:

b = a * tan(30º) = a * tan(pi/6)

b = 1/sqrt(2) * tan(pi/6) = 1/sqrt(6)

On the other hand, by the multiplication of matrices b must meet:

b = cos(?) * a

From this expression we can obtain the angle we were looking for by replacing the values that we previously had:

cos(?) = (1/sqrt(6))/(1/sqrt(2)) = 1/sqrt(3)

? = acos(1/sqrt(3))

Also since the direction of rotation is inverse, due to the particularity in how the coordinate system of my world was thought:

Angle = -acos(1/sqrt(3)) aprox. -54.74º

Values for c, d, e are obtained by matrix multiplication:

c = -sin(angle) = -sin(-acos(1/sqrt(3))) = sqrt(2/3)

d = sin(angle) * a = sin(-acos(1/sqrt(3))) * (1/sqrt(2)) = -1/sqrt(3)

e = cos(angle) = cos(-acos(1/sqrt(3))) = 1/sqrt(3)

Orthogonality properties are guaranteed by the multiplication of matrices Rx()Rz()

And since we have "forced" the angle between [a, b] and [-a, b] to be 120º and that between [a, b] and the x-axis there is 30º, it is to be expected that the angle between the 3 projected axes exist 120º.

It can be verified by calculating that: AngleBetween ([a, b], [0, -c]) = 120º

This answer complements and reinforces the 4th edition that he had made. In this edition another aspect is explained, perhaps from a "more geometric" point of view such as, and why this angle is obtained and not the theoretical one of 35.264º

I think this may serve others who are in the same situation or in which their coordinate systems are different from the theoretical one expected to apply the isometric projection with the angles (atan(1/sqrt(2)), pi/4) to Rx() and Rz().

Thank you to all who stopped to read all this.