Consider the following code:
\documentclass{article}
\usepackage{pst-solides3d}
\begin{document}
\begin{figure}[htbp]
\centering
\psset{unit = 0.7}
\begin{pspicture}(-8.1,-5.6)(8.7,17.7)
\pnodes%
(0,17.65){A}%
(0,0){B}%
(3.09,-3.43){C}%
(-8.02,1.24){D}%
(-2.59,-5.57){E}%
(8.64,-1.34){F}%
(1.97,4.23){G}
\pspolygon[linestyle = none, fillstyle = solid, fillcolor = gray!20](D)(E)(F)(G)
\psSolid[
object = new,
action = draw,
sommets =
0 -3 0 % punkt 1
-3 0 0 % punkt 2
0 3 0 % punkt 3
3 0 0 % punkt 4
0 0 6, % punkt 5
faces = {
[3 2 1 0] % side A
[4 0 3] % side B
[4 3 2] % side C
[4 2 1] % side D
[4 1 0] % side E
},
RotZ = 30
]
\psline(0,0.65)(0.45,0.2)(0.45,-0.5)
\psline(3,-2.85)(3.6,-2.63)(3.67,-3.25)
{\psset{linestyle = dotted, linecolor = red}
\psline(A)(B)
\psline(B)(C)
\psline(A)(C)}
{\psset{linestyle = none}
\pcline[offset = -8.5pt](D)(E)
\ncput{$g$}
\pcline[offset = -8pt](E)(F)
\ncput{$g$}
\pcline[offset = 7pt](0,12)(B)
\ncput{$h$}
\pcline[offset = 8pt](A)(F)
\ncput{$x$}}
\end{pspicture}
\end{figure}
\end{document}
The output is as I would like but the coordinates of the two projections and the right angles are found by trial and error. (One problem with the manually approach being that if I rotate the pyramid, the drawing is no longer correct.)
How do I use the pst-solides3d
package to draw he entire drawing without having to find the coordinates manually?
pst-solides3d
which seems more up to date and easier to use.