I am trying to take an equilateral triangle and get it's projection at an angle of 60 degrees. I have the triangle already (SSSTriangle[6, 6, 6]
) and I have tried to figure out how to use Projection[]
but I have trouble figuring out how to employ this with vectors. I can also get the Radon transform at 60 degrees, but this is still not the actual 2D projection that I am trying to create. Neither of these options seems to be what I really want. How do I create this projection and visualize it? I know drawing it out, it should basically look like another triangle.
1 Answer
Your problem was not well defined, as in 3D there are many ways to rotate object and many ways to project vectors and objects. As a demonstration I rotated you triangle around $x$, $y$ and $z$ axis by 60 degrees clockwise. If you run the code, you can rotate the 3D Graphics and take a look at it under different angles. Then I projected the triangles to the $xy$ plane. The code is written such that you can easily change the rotation axis and projection plane.
triangle = SSSTriangle[6, 6, 6]
basisX = {1, 0, 0};
basisY = {0, 1, 0};
basisZ = {0, 0, 1};
triangles3D =
Table[triangle /. {x_, y_} :>
RotationMatrix[60 Degree, v].{x, y, 0},
{v, {basisX, basisY, basisZ}}]
Graphics3D[{FaceForm[None], EdgeForm[Black], triangles3D},
Axes -> True, AxesLabel -> {x, y, z}, ViewPoint -> Top]
triangles2D =
triangles3D /.
p : {x_?NumberQ, y_, z_} :> {
Projection[p, basisX].basisX,
Projection[p, basisY].basisY
}
Graphics[{FaceForm[None], EdgeForm[Black], triangles2D}, Axes -> True,
AxesLabel -> {x, y}]
Triangle[{{0, 0}, {6, 0}, {3, 3 Sqrt[3]}}] {Triangle[{{0, 0, 0}, {6, 0, 0}, {3, (3 Sqrt[3])/2, 9/2}}], Triangle[{{0, 0, 0}, {3, 0, -3 Sqrt[3]}, {3/2, 3 Sqrt[3], -((3 Sqrt[3])/2)}}], Triangle[{{0, 0, 0}, {3, 3 Sqrt[3], 0}, {-3, 3 Sqrt[3], 0}}]}
{Triangle[{{0, 0}, {6, 0}, {3, (3 Sqrt[3])/2}}], Triangle[{{0, 0}, {3, 0}, {3/2, 3 Sqrt[3]}}], Triangle[{{0, 0}, {3, 3 Sqrt[3]}, {3, 3 Sqrt[3]}}]}