[pstricks] Drawing in 3D

Alan Ristow ristow at ece.gatech.edu
Thu Sep 30 15:37:46 CEST 2004


On Thu, 30 Sep 2004 14:36:39 +0200, Herbert Voss
<Herbert.Voss at alumni.TU-Berlin.DE> wrote:

>Alan Ristow wrote:
>
>> In the code example below, I have drawn two diagrams of an annular blade
>> slicing through a cylindrical object (an annular blade is shaped like an
>> "O" and has its sharp edge on the inside of the "O"). I need to fill the
>> area between the circles so it actually looks like a blade. In the
>> second diagram, I have used two cylinder primitives to make it appear as
>> though the blade is cutting through the cylinder.
>> 
>> Is this the most appropriate way to make a drawing such as this? I get
>> the impression that I am stretching the limits of 3D drawing with
>> PSTricks here....
>
>I do not know if I understand your problem well ...

In retrospect, I'm not surprised. I was way too tired when I wrote the
original message and should probably have just waited until this
morning....

At any rate, I solved the problem of filling the space between two
circles on my own -- I was pleased to see that it worked in 3D -- and I
think I have the remaining issues under control, so all I will ask is if
there is a simple way to clip 3D objects. For example, I might like to
draw a cylinder, clip it in an arbitrary way, then rotate it. If there
is a good way to do that, I cannot find it.

As for the drawing I was trying to describe above, I managed to do with
the code below (it might clear up what I was talking about).

Alan


\documentclass[letterpaper,11pt]{article}%
\usepackage{pst-vue3d}%

\pagestyle{empty}%

\begin{document}
  \psset{THETA=30,PHI=0,normaleLongitude=0,normaleLatitude=0,RotY=90}%

  % In this pspicture, the cylinder is centered inside the "blade".
  \begin{pspicture}(0,0)(10,5)

\CylindreThreeD[fillstyle=solid,fillcolor=darkgray,linestyle=none](0,0,0){5}{20}%
    \pscustom[fillstyle=eofill,fillcolor=yellow]{%
      \CircleThreeD[liftpen=2](19,0,0){7}%
      \CircleThreeD(19,0,0){12}%
    }%
  \end{pspicture}

  % In this pspicture, the "blade" should look like it is cutting into 
	% the cylinder.
  \begin{pspicture}(0,0)(10,5)

\CylindreThreeD[fillstyle=solid,fillcolor=darkgray,linestyle=none](0,0,0){5}{19}%
    \pscustom[fillstyle=eofill,fillcolor=yellow]{%
      \CircleThreeD(19,0,-4){7}%
      \CircleThreeD(19,0,-4){12}%
    }%

\CylindreThreeD[fillstyle=solid,fillcolor=darkgray,linestyle=none](19,0,0){5}{1}%
  \end{pspicture}
\end{document}





More information about the PSTricks mailing list