A
A
Adolf Milos2019-05-19 09:31:32
3D
Adolf Milos, 2019-05-19 09:31:32

How to find out the coordinates of a two-dimensional projection of a three-dimensional point?

There are 12 lines with which a cube is drawn in two-dimensional space, i.e. each line is indicated by 2 points with coordinates (x;y). You need to rotate this cube along all three axes (x, y, z) using the rotation matrix. I made a rotation along the Z axis (everything works), but for rotations along the X, Y axes, you need to calculate Z. And where to put it next to display new coordinates (x; y), I did not quite understand. Simple equating to 0 doesn't work, or something is wrong with my formula.
Tell me what to do.
PS I have already looked at a lot of information on the Internet and tried different formulas and substitutions, but for some reason it doesn’t work: c
[on the photo is the X-axis rotation code and the rotation matrix used]
5ce0f7f99e93e866114430.jpeg5ce0f8057b355903736325.jpeg5ce0f80e94074901260085.png
and this is what happens during rotation
5ce0f90da2e97367079551.jpeg5ce0f9142434a822993718.jpeg5ce0f91ae9edb142979567.jpeg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
Griboks, 2019-05-19
@Griboks

I think it's because you have line.x=x; line.y=y;. When should be should beline.x=x+dx*z; line.y=y+dy*z;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question