# How do you draw this prism in tikz/pstricks

The numbers are in Persian (side SB=6 and angle SBA=60 degrees).

## 2 Answers

A solution with tkz-euclide but I made a mistake (HBS=60 and not SBA). Your example shows HBS ??. It's easy to make the same thing with TikZ but perhaps you can place some points like A,B,C,S and after we can help you to finish your drawing.

\documentclass[11pt]{article}
\usepackage{tkz-euclide}
\usetkzobj{all}

\begin{document}
\begin{tikzpicture}
\tkzDefPoint(0,0){B}
\tkzDefPoint(4,0){C}
\tkzDefPoint(60:6){S}
\tkzDefPoint(30:3){A}
\tkzDefPointWith[colinear= at S](B,A)   \tkzGetPoint{I}
\tkzDefPointBy[projection=onto B--C](S) \tkzGetPoint{H}
\tkzDefPointWith[colinear= at S](B,C)   \tkzGetPoint{D}
\tkzDrawPolygon(S,D,I)
\tkzDrawSegments(B,C S,H B,S C,D)
\tkzDrawSegments[dashed](A,C A,B A,I)
\tkzLabelPoints[below right](C,D,H)
\tkzLabelPoints[above left](A,B,S,I)
\tkzMarkRightAngle[fill=lightgray](B,H,S)
\tkzMarkAngle[mark=|,arc=||,size=.5 cm,mkcolor=gray](C,B,S)
\tkzLabelAngle[pos=1,circle,fill=white](C,B,S){$60^{\circ}$}
\tkzLabelSegment[left](B,S){6}
\end{tikzpicture}
\end{document}


Update

The definition of the coordinates with TikZ are given by

  \begin{tikzpicture}
\coordinate (B) at (0,0);
\coordinate (C) at (4,0);
\coordinate (S) at (60:6);
\coordinate (D) at ($(60:6)+(C)-(B)$);
\coordinate (A) at (30:3);
\coordinate (I) at ($(60:6)+(A)-(B)$);
\coordinate (H) at ($(B)!(S)!(C)$);
\draw (D) -- (S) -- node[left] {6}(B)--(C) --  cycle;
\draw (S) -- (H);
\draw[dashed] (B) -- (A) --(C) (I) -- (A);
\draw (S) -- (I) -- (D);
\end{tikzpicture}


Compile the following with either xelatex or latex-dvips-ps2pdf.

\documentclass[border=12pt]{standalone}
\usepackage{pst-eucl}

\begin{document}
\begin{pspicture}[showgrid=false](9.2,7.7)
\psset{PointSymbol=none}
\pstTriangle[PosAngleA=-140,PosAngleC=135](0,0){B}(5,0){C}(3,2){A}
\pstGeonode[PointName=none](0,0){M}(4,6){N}
\pstTranslation[PointName={none,S,D},CurveType=polygon,PosAngle={0,135,0}]{M}{N}{A,B,C}
\pstLineAB[linestyle=dashed]{A}{A'}
\pstLineAB{B}{B'}
\pstLineAB{C}{C'}
\pstGeonode[PosAngle=-90,PointNameSep=7pt](B'|B){H}
\pstLineAB{B'}{H}
\pspolygon[fillstyle=solid,fillcolor=gray,opacity=0.5](B)(H)(B')
\pstRightAngle{B}{H}{B'}
\end{pspicture}
\end{document}

• The remaining labels are intentionally left as your homework. – kiss my armpit Jul 2 '12 at 19:20