3
$\begingroup$

In the triangular prism A-BCD, DA=DB=DC=2, BD is perpendicular to CD, and the angle ADB equals the angle ADC, both of which are 60 degrees. E is the midpoint of BC.Vector EF equals vector DA.

enter image description here

I use point D as the origin of the spatial Cartesian coordinate system to establish the system. The line where DB is located is the x-axis, and the line where DC is located is the y-axis. The line perpendicular to the bottom DBC and facing upwards from point D is the z-axis.

The code is as follows:

Clear["Global`*"];
d = {0, 0, 0};
b = {2, 0, 0};
c = {0, 2, 0};
e = Mean[{b, c}];
a = {x1, y1, z1};
a = SolveValues[{VectorAngle[a - d, b - d] == 60 Degree, 
    VectorAngle[a - d, c - d] == 60 Degree, Norm[a - d] == 2, 
    z1 > 0}, {x1, y1, z1}] // First
f = {x2, y2, z2};
f = SolveValues[{a - d == f - e, z2 > 0}, {x2, y2, z2}] // First
labels = {Text[Style[A, 12, FontFamily -> "Times"], a, {-1, -1}], 
   Text[Style[B, 12, FontFamily -> "Times"], b, {1, 1}], 
   Text[Style[C, 12, FontFamily -> "Times"], c, {1, 1}], 
   Text[Style[D, 12, FontFamily -> "Times"], d, {-2, 0}], 
   Text[Style[E, 12, FontFamily -> "Times"], e, {3, 0}], 
   Text[Style[F, 12, FontFamily -> "Times"], f, {-1, -2}]};
dashLines = {Dashed, 
   AbsoluteThickness[2], {Brown, Line[{{c, a}}]}, {Red, 
    Line[{{c, b}, {d, c}}]}, {Purple, Line[{{e, f}}]}, {Black, 
    Line[{{e, a}, {d, e}}]}};
realLines = {AbsoluteThickness[2], 
   Line[{{a, d}, {a, b}, {b, d}, {a, f}, {b, f}}]};
Show[Graphics3D[{dashLines, realLines, labels}, Boxed -> False, 
  ViewPoint -> {2, -3.5, 1.28}], 
 RegionPlot3D[Polygon[{a, b, d}], MeshFunctions -> {#1 + #2 + #3 &}, 
  PlotStyle -> Opacity[0.2]], 
 RegionPlot3D[Polygon[{a, b, f}], MeshFunctions -> {#1 + #2 + #3 &}, 
  PlotStyle -> Opacity[0.3]], 
 Graphics3D[{Arrow[{{d, d + {0, 0, 2}}, {b, b + {1, 0, 0}}, {c, 
      c + {0, 1, 0}}}], 
   Text[Style["z", Red, 20, Italic, FontFamily -> "Times"], 
    d + {0, 0, 2}, {-1, -1}], 
   Text[Style["y", Red, 20, Italic, FontFamily -> "Times"], 
    c + {0, 1, 0}, {-2, -1}], 
   Text[Style["x", Red, 20, Italic, FontFamily -> "Times"], 
    b + {1, 0, 0}, {2, -1}]}]]

get the result:

enter image description here

My current idea is to keep the spatial geometry unchanged. Just change the origin and coordinate axis of the spatial coordinate system, and now use the E point as the origin of the spatial Cartesian coordinate system. The line ED is located on the x-axis, and the line EB is located on the y-axis to reestablish the spatial Cartesian coordinate system. Do not manually recalculate the coordinates of each point and vector in the new coordinate system. What transformation is used to transform the coordinate system so that the coordinates of the points can be automatically recalculated?

My goal is not just to rebuild the coordinate system. And it is also necessary to adapt the coordinates of each point and vector in the new coordinate system to the new system. A={1,1, Sqrt 2} This is the value in the old system. For example, the value in the new series should be a={0,0, Sqrt 2}.and so on

The final effect is as follows:

enter image description here

$\endgroup$

1 Answer 1

3
$\begingroup$
  • Directly rebuild the Axis.
Graphics3D[{Arrow[{{a, a + Normalize[a - e]}, {b, 
     b + Normalize[b - c]}, {d, d + Normalize[d - e]}}], 
  Text[Style["z", Red, 20, Italic, FontFamily -> "Times"], 
   a + Normalize[a - e], {-1, -1}], 
  Text[Style["y", Red, 20, Italic, FontFamily -> "Times"], 
   b + Normalize[b - c], {-2, -1}], 
  Text[Style["x", Red, 20, Italic, FontFamily -> "Times"], 
   d + Normalize[d - e], {2, -1}]}]

enter image description here

Edit

  • We can build a new frame system with original: base1,base2,base3.
original = e;
base1 = Normalize[d - e];
base2 = Normalize[b - e];
base3 = Normalize[a - e];

transframe[{x_, y_, 
   z_}] = {x1, y1, z1} /. 
    Solve[{x, y, z} == original + x1*base1 + y1*base2 + z1*base3, {x1,
       y1, z1}] // First // Simplify

The same as

transframe[{x_, y_, z_}] = ({x, y, z} - original) . 
   Inverse[{base1, base2, base3}] // Simplify

{-((-2 + x + y)/Sqrt[2]), (x - y)/Sqrt[2], z}.

  • Examples
d={0,0,0};
b={2, 0, 0};
a={1,1, Sqrt[2]};
transframe[d]
transframe[b]
transframe[a]

{Sqrt[2], 0, 0}

{0, Sqrt[2], 0}.

{0, 0, Sqrt[2]}

$\endgroup$
1
  • $\begingroup$ My goal is not just to rebuild the coordinate system. And it is also necessary to adapt the coordinates of each point and vector in the new coordinate system to the new system. A={1,1, Sqrt [2]} This is the value in the old system. The value in the new system should be a={0,0, Sqrt [2]}. The above operation only changes the coordinate system position. But the coordinates of the corresponding points have not changed $\endgroup$
    – csn899
    Commented Jun 12, 2023 at 3:29

Not the answer you're looking for? Browse other questions tagged or ask your own question.