[pstricks] pst-solides3d

Herbert Voss Herbert.Voss at fu-berlin.de
Sun Jan 6 10:18:20 CET 2019



Am 05.01.19 um 23:32 schrieb Poul Riis:
> Almost perfect - except that some of the circular hole is clipped off 
> when the radius is larger than 2.5 with the actual parameters. How does 
> that happen and how can I avoid it?

looks like a bug. The diameter of the circle must be smaller
than the height of the plane.

\pstVerb{/aa 12 def /bb 12 def /cc 4 def /philid 30 def /radius 3 def

would be ok.

Herbert


> 
> Poul Riis
> 
> 
> 
> 
> \documentclass{article}
> \usepackage[x11names]{xcolor}
> \usepackage{pst-tools}
> \usepackage{pst-solides3d}
> 
> \begin{document}
>          \psset{unit=5mm}
>          \begin{pspicture}[solidmemory](-10,-15)(10,15)
>          \pstVerb{/aa 10 def /bb 10 def /cc 4 def /philid 30 def /radius 
> 3 def
> /cosphi philid
>                  cos def /sinphi philid
>                  sin def /Mlidx cosphi 1 sub aa mul 2 div def /Mlidy 0 
> def /Mlidz
> sinphi aa mul 2
>                  div cc add def /nlidx
>                  sinphi neg def /nlidz cosphi def /Ax Mlidx def /Ay
>                  radius def /Az Mlidz def
>                  /Bx Mlidx radius cosphi mul add def /By 0 def /Bz Mlidz 
> radius sinphi
>                  mul add def /Cx Mlidx
>                  def /Cy radius neg def /Cz Mlidz def /ex Ax Mlidx sub 
> def /ey Ay Mlidy
> sub def /ez Az Mlidz
>                  sub def /fx Bx Mlidx sub def /fy By Mlidy sub def /fz 
> Bz Mlidz sub def}
>          \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={ Mlidx 0 Mlidz [sinphi 0 cosphi neg]},
>          fillcolor=Gold3,
>          base=aa neg 2 div aa 2 div bb neg 2 div bb 2 div,
>          name=myplane]
>          \psPoint(aa 0.5 mul,0,0){Tx}
>          \psPoint(0,bb 0.5 mul,0){Ty}
>          \psPoint(aa 2 div,bb 0.5 mul neg,cc 2 div){Tz}
>          \psPoint(Ax,Ay,Az){Alid}
>          \psPoint(Bx,By,Bz){Blid}
>          \psPoint(Cx,Cy,Cz){Clid}
>          \psPoint(Mlidx,Mlidy,Mlidz){MAC}
>          \psset{plan=myplane}
>      \defFunction[algebraic]{Circle}(t){radius*sin(t)}{radius*cos(t)}{}%
>      \psProjection[object=courbeR2,
>         linecolor=Red1,fillstyle=solid,fillcolor=white,
>         range=0 TwoPi,resolution=720,function=Circle]%
>     \composeSolid
>     \uput{5pt}[270]{0}(Tx){$x$}
>     \uput{5pt}[0]{0}(Ty){$x$}
>     \uput{5pt}[180]{0}(Tz){$h$}
>     \psline[linestyle=dashed](Alid)(Clid)
>     \uput{2pt}[90]{0}(MAC){$2r$}
> \end{pspicture}
> \end{document}
> 
> 
> 
> _______________________________________________
> PSTricks mailing list
> PSTricks at tug.org
> http://tug.org/mailman/listinfo/pstricks
> archive: http://www.tug.org/pipermail/pstricks/
> 


More information about the PSTricks mailing list