[pstricks] pst-solides3d

Poul Riis Poul.Riis at skolekom.dk
Wed Aug 25 14:37:24 CEST 2010


Graphics with PSTricks <pstricks at tug.org> writes:
>Next project is to make a vertical slice with a special color....
The slice might be restricted to being parallel to the yz-plane.
To be honest, I cannot see how I can do this. I need three planar cuts in
the cylinder. Any suggestions?

Poul Riis
>
>
>\documentclass{article}
>\parindent0pt
>\pagestyle{empty}
>\textwidth12cm
>\usepackage[x11names]{xcolor}
>\usepackage[gray,cmyk,x11names]{pstricks}
>%\usepackage{pst-3dplot}
>\usepackage{pst-func}
>\usepackage{pst-solides3d}
>
>\usepackage{pstricks-add}
>\usepackage{amsmath,amsfonts}
>\definecolor{pureblack}{cmyk}{0 0 0 1}
>\usepackage{siunitx}
>\usepackage{comma}
>
>\begin{document}
>
>\begin{pspicture}[solidmemory](-4,-5)(7,4)
>\psset{viewpoint=50 -40 10
>rtp2xyz,Decran=50,linecolor=Red2,lightsrc=viewpoint}
>\psset{solidmemory}
>\pstVerb{/phi 30 def /cosphi phi cos def /sinphi phi sin def /nx sinphi
>def /ny 0 def /nz cosphi def /rcyl 3 sqrt 4 mul def /hcut rcyl sinphi mul
>cosphi div def /hcyl hcut 2 mul def /h1 1..5 def /dh 0.5 def /h2 h1 dh
>add def}
>\psset{ngrid=1 30}
>\psSolid[object=cylindre,r=rcyl,h=hcyl,plansepare={[nx ny nz
>0]},name=partiescylindre,action=none](0,0,hcut neg)
>%\psSolid[object=load,load=partiescylindre1,fillcolor={[rgb]{0.7 1 0.7
>}},fcol=0 (1 1 0.7 setrgbcolor),opacity=0.5]
>\psSolid[object=load,load=partiescylindre1,fillcolor={[rgb]{0.7 1 0.7
>}},fcol=0 (1 1 0.7 setrgbcolor)]
>\psSolid[object=cylindre,r=rcyl,h=hcyl,plansepare={[nx ny nz
>0]},name=partiescylindre,action=none](0,0,h2 neg)
>\psSolid[object=load,load=partiescylindre1,fillcolor={[rgb]{0.7 1
>0.4}},fcol=0 (0.8 1 0.4 setrgbcolor)]
>%\psSolid[object=load,load=partiescylindre1,fillcolor={[rgb]{0.7 1
>0.4}},fcol=0 (0.8 1 0.4 setrgbcolor),opacity=0.7]
>\psSolid[object=cylindre,r=rcyl,h=hcyl,plansepare={[nx ny nz
>0]},name=partiescylindre,action=none](0,0,h1 neg)
>\psSolid[object=load,load=partiescylindre1,fillcolor={[rgb]{0.7 1 0.7
>}},fcol=0 (1 1 0.7 setrgbcolor)]
>\end{pspicture}
>
>\end{document}

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/pstricks/attachments/20100825/d4b82a04/attachment-0001.html>


More information about the PSTricks mailing list