# Right angle in 3D-pstricks

I'd like to draw a right angle in a 3D-pstricks-graphic. I can't find a way to do that. This is what I want to do (but in 3D):

Here is my code:

\documentclass{standalone}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage{pst-all}
\usepackage{pst-3dplot}

\begin{document}

\psset{coorType=2}
\begin{pspicture}(-3,-3.1)(3.5,3.5)
\pstThreeDCoor[xMin = -3, xMax = 3, yMin = -3, yMax = 3, zMin = -3, zMax = 3, arrows = ->, linecolor=black]
\pstThreeDTriangle[fillcolor=yellow,fillstyle=solid,linecolor=black,opacity=0.5](2,0,0)(0,2.5,0)(0,0,1)
\pstThreeDLine[linestyle=dashed](0.489361,0.691489,0.478723)(1.5,1.5,2.5)
\pstThreeDDot(1.5,1.5,2.5)
\pstThreeDPut(1.5,1.8,2.5){$P$}
\pstThreeDDot(0.489361,0.691489,0.478723)
\pstThreeDPut(0.489361,0.991489,0.478723){$P'$}
\pstThreeDDot(2,0,0)
\pstThreeDPut(2,-0.3,0){2}
\pstThreeDDot(0,2.5,0)
\pstThreeDPut(0,2.5,0.3){2.5}
\pstThreeDDot(0,0,1)
\pstThreeDPut(0,-0.3,1){1}
\end{pspicture}

\end{document}


In the picture you can see what I have got. I need to show two right angles so the projection is better visible.

Is there an equivalent of \psarc in 3D?

• Welcome to TeX.SE. We usually use the comments for thanking users. Have fun here. – Jan Jan 28 '17 at 18:56

\pstThreeDEllipse[beginAngle=0,endAngle=90](0,0,1)(0.5,0,-0.25)(0,0.625,-0.25)
\pstThreeDDot(0.3,0.3,0.85)


• Thank you very much. This was the solutions I was waiting for. – P. W. Jan 29 '17 at 20:49

I'd suggest to use \ThreeDput :

 \documentclass{standalone}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage{pst-all}
\usepackage{pst-3dplot}

\begin{document}

\psset{coorType=2}
\begin{pspicture}(-3,-3.1)(3.5,3.5)
\pstThreeDCoor[xMin = -3, xMax = 3, yMin = -3, yMax = 3, zMin = -3, zMax = 3, arrows = ->, linecolor=black]
\ThreeDput[normal=1.3 1 3](0,0,1.66){%
\pspolygon[fillcolor=yellow,fillstyle=solid,linecolor=black,opacity=0.8]%
(0,0)(-3,0)(0,-3)
\psarc{-}(0,0){0.6}{-180}{-90}
\psdot[dotsize=1mm](-0.2,-0.2)
\psdot[dotsize=2mm](0,0)
\psdot[dotsize=2mm](-3,0)
\psdot[dotsize=2mm](0,-3)}
\pstThreeDLine[linestyle=dashed](0.33,0.5,0.5)(1.5,1.5,2.5)
\pstThreeDDot(1.5,1.5,2.5)
\pstThreeDPut(1.5,1.8,2.5){$P$}
\pstThreeDDot(0.33,0.5,0.5)
\pstThreeDPut(0.33,0.8,0.5){$P'$}
\rput[r](-0.2,1.4){1}
\rput[r](-0.5,-0.4){2}
\rput[b](2.6,0.1){2.5}
\end{pspicture}

\end{document}


• Thank you very much. So I have to draw the triangle in 2D an tilt it so it gets three dimensional. Can you explain what you have to write in the brackets after \ThreeDput. – P. W. Jan 29 '17 at 19:12
• @P.W. Made an update but it might require further fine-tuning. – user121799 Jan 29 '17 at 19:53