# How to draw a pyramid according to the requirements?

In the pyramid P-ABCD, the bottom surface ABCD is a diamond, AC intersects with BD at point O, the angle BAD is equal to 60 °, PA=AB=2, PA vertical AC, plane PAC vertical plane PBD, and M is the point on the line segment PB

The appearance of a four-dimensional figure is as follows:

I am trying to solve the problem step by step, and I welcome your guidance

1. Draw a pyramid with the intersection point of the bottom diamond diagonal as the origin of the spatial coordinate system：
Graphics3D[
Pyramid[{{Sqrt[3], 0, 0}, {0, 1, 0}, {-Sqrt[3], 0, 0}, {0, -1,
0}, {Sqrt[3], 0, 2}}]]

1. How to add the letters in the figure to each vertex next?
• Please show the code you have tried so far. There is a function Pyramid. May 23, 2023 at 8:49
• The definition of M isn't unique. May 23, 2023 at 9:19
• @UlrichNeumann The M-point does not require fixation, as long as it can be moved within the segment May 23, 2023 at 9:41
• @Domen This command is not very convenient for drawing. If the origin of the space Cartesian coordinate system system is not the vertex of a solid figure, but the intersection of the midpoint of a line segment and the diagonal of the bottom polygon in practical application. Do you need to calculate the coordinates of other points on this basis when drawing? May 23, 2023 at 10:50
• I think, you can use 3dtools Aug 16, 2023 at 0:32

• We can solve the equations which according to the conditons to find the coordinate of the point p.
Clear["Global*"];
a = {0, 0, 0};
b = {2, 0, 0};
d = 2 {Cos[π/3], Sin[π/3], 0};
c = b + d;
p = {x, y, z};
p = SolveValues[{(p - a) . (a - c) == 0,
Cross[p - a, p - c] . Cross[p - b, p - d] == 0, Norm[p - a] == 2,
z > 0}, {x, y, z}] // First
m = Mean[{p, b}];
o = Mean[{a, b, c, d}];
labels = {Text[Style[P, 12, FontFamily -> "Times"], p, {-1, -1}],
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, {-2, 0}],
Text[Style[D, 12, FontFamily -> "Times"], d, {3, 0}],
Text[Style[M, 12, FontFamily -> "Times"], m, {-1, -2}],
Text[Style[O, 12, FontFamily -> "Times"], o, {0, 1}]};
Graphics3D[{Thick, Line[{p, a, b}], Line[{p, b, c, p}],
Line[{a, m, c}], Dashed, Line[{a, c}], Line[{b, d}], Line[{d, p}],
Line[{d, a}], Line[{d, c}], labels}, Boxed -> False,
ViewPoint -> {-.9, -3, 1.28}]


{0,0,2}

• First step: Calculate the coordinates of the four vertices on the bottom surface. May 23, 2023 at 14:12
• a = {0, 0, 0}; b = {2, 0, 0}; d = 2 {Cos[π/3], Sin[π/3], 0}; c = b + d; May 23, 2023 at 14:12
• Then the second step: Find the coordinates of the vertex P of the pyramid May 23, 2023 at 14:17
• Cross[p - a, p - c] and Cross[p - b, p - d]Are these two finding the normal vectors of two planes separately? If the plane is perpendicular, then their normal vectors are perpendicular. Use a system of equations to find the coordinates of point P May 23, 2023 at 14:18
• Text[Style[P, 12, FontFamily -> "Times"], p, {-1, -1}]This sentence describes vertex attributes. The vertex letter name is P，FontFamily -> "Times"this is a font，pThis represents the coordinates of vertex P, {-1, -1}How much offset is the vertex letter P at the coordinate position of vertex P? May 23, 2023 at 14:31