2

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): Right angle

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] \pstThreeDTrianglefillcolor=yellow,fillstyle=solid,linecolor=black,opacity=0.5(0,2.5,0)(0,0,1) \pstThreeDLinelinestyle=dashed(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}

Code compiled

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?

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

2 Answers2

4

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}

enter image description here

  • 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. – iom10 Jan 29 '17 at 19:12
  • @P.W. Made an update but it might require further fine-tuning. –  Jan 29 '17 at 19:53
3
\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)

enter image description here