# [pstricks] pst-solides3d

Poul Riis poul.riis at skolekom.dk
Sun Dec 30 22:49:37 CET 2018

I want to make a circular hole in the lid of an open box.
I tried to use definition=ABcercle but I cannot find the exact syntax (see
red lines in example below). I'm not sure that the coordinates of the
three points are correct but that's a problem to be fixed later on.
How can I make it work?

Poul Riis

\documentclass[12pt,a4paper]{article}
\usepackage[dvips,left=2cm,top=1.5cm,right=1.5cm,bottom=2.4cm]{geometry}
\usepackage[dvips,x11names]{xcolor}

\usepackage{pst-solides3d}

\begin{document}
\psset{unit=5mm}
\pstVerb{/aa 6 def /bb 10 def /cc 4 def /philaag 20 def /cosphi philaag
cos def /sinphi philaag sin def /Mlaagx cosphi 1 sub aa mul 2 div def
/Mlaagz sinphi aa mul 2 div cc add def /nlaagx sinphi neg def /nlaagz
cosphi def /radius 1 def /Ax Mlaagx def /Ay radius def /Az Mlaagz def /Bx
Mlaagx radius cosphi mul add def /By 0 def /Bz Mlaagz radius sinphi mul
add def /Cx Mlaagx def /Cy radius neg def /Cz Mlaagz def}
\begin{pspicture}(-10,-15)(10,15)
\psset{viewpoint=100 30 20,Decran=200}
\psSolid[
object=parallelepiped,%
a=aa,b=bb,c=cc,
hollow,
fillcolor=Green3,
affinage=0,
affinagecoeff=1,
incolor=yellow]%
(0,0,cc 2 div)
\psSolid[object=plan,
definition=normalpoint,
args={ Mlaagx 0 Mlaagz [sinphi 0 cosphi neg]},
fillcolor=Gold3,
base=aa neg 2 div aa 2 div bb neg 2 div bb 2 div,showbase]
\psProjection[object=cercle,
definition=ABcercle,
args=Ax Ay Az Bx By Bz Cx Cy Cz,
range=0 360]
\end{pspicture}
\end{document}

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/pstricks/attachments/20181230/142dda68/attachment.html>