[pstricks] Which package defines parametricplotThreeD?

Zbigniew Nitecki zbigniew.nitecki at tufts.edu
Thu Jul 8 22:14:40 CEST 2010

I have been having trouble getting the viewpoint keyvalue to work, but along the way I also have run into a strange problem.
The following code (which I admit is not minimal, but see below why) produces the attached picture:

*************************************************************************************************************
%!TEX TS-program =  latex
\documentclass[11pt]{article}
\usepackage{amsmath, amssymb}
\usepackage{pstricks, pst-plot, pst-math, pst-3dplot}
\usepackage{pst-3d}
\usepackage{subfig}
\usepackage{graphicsmacros}
\usepackage{basicmacros}
\usepackage{calculusmacros}

\title{Brief Article}
\author{The Author}

\begin{document}
\maketitle
%
\begin{figure}[htbp]
\begin{center}
%			\begin{pspicture}(-2,-2)(2,2)
%				\psline{<->}(-1.5,0)(1.5,0)\uput[r](1.5,0){$x$}
%				\psline{<->}(0,-1.5)(0,1.5)\uput[u](0,1.5){$y$}
%				\parametricplot[plotpoints=200]{0}{360}{%
%					1 t 3 mul cos 0.2 mul add t 2 mul cos mul
%					1 t 3 mul cos 0.2 mul add t 2 mul sin mul
%				}
%			\end{pspicture}
\begin{pspicture}(-2,-2)(2,2)
\psset{viewpoint=1 1 1}
\pstThreeDCoor[xMax=2.0, yMax=2.0, zMax=2.0]
\parametricplotThreeD[xPlotpoints=200, hiddenLine=true](0,360){%
1 t 3 mul cos 0.2 mul add t 2 mul cos mul
1 t 3 mul cos 0.2 mul add t 2 mul sin mul
t 3 mul sin
}
\end{pspicture}
\begin{pspicture}(-2,-2)(2,2)
\psset{viewpoint=0.5 0.5 1}
\pstThreeDCoor[xMax=2.0, yMax=2.0, zMax=2.0]
\parametricplotThreeD[xPlotpoints=200, hiddenLine=true](0,360){%
1 t 3 mul cos 0.2 mul add t 2 mul cos mul
1 t 3 mul cos 0.2 mul add t 2 mul sin mul
t 3 mul sin
}
\end{pspicture}
\begin{pspicture}(-2,-2)(2,2)
\psset{viewpoint=0.1 0.1 1}
\pstThreeDCoor[xMax=2.0, yMax=2.0, zMax=2.0]
\parametricplotThreeD[xPlotpoints=200, hiddenLine=true](0,360){%
1 t 3 mul cos 0.2 mul add t 2 mul cos mul
1 t 3 mul cos 0.2 mul add t 2 mul sin mul
t 3 mul sin
}
\end{pspicture}
\caption{The Trefoil}
\label{fig:bracelet}
\end{center}
\end{figure}

\end{document}

**********************************************************************************************************************

Note that despite the change in viewpoint (the only change between the three pspictures the output appears identical.

I wanted to ask about this, so I tried to create a minimal example by taking out all the package calls that seemed irrelevant, and wrote the package calls for pst in the order
once dictated to me by Herbert (to avoid another conflict).  That resulted in this code:

*************************************************************************************************************************************************************
\documentclass[11pt]{article}
%\usepackage{pstricks, pst-plot, pst-math, pst-3dplot}
%\usepackage{pst-3d}
\usepackage{pst-3d}

\title{Brief Article}
\author{The Author}
%\date{}                                           % Activate to display a given date or no date

\begin{document}
\maketitle
%
\begin{figure}[htbp]
\begin{center}
%			\begin{pspicture}(-2,-2)(2,2)
%				\psline{<->}(-1.5,0)(1.5,0)\uput[r](1.5,0){$x$}
%				\psline{<->}(0,-1.5)(0,1.5)\uput[u](0,1.5){$y$}
%				\parametricplot[plotpoints=200]{0}{360}{%
%					1 t 3 mul cos 0.2 mul add t 2 mul cos mul
%					1 t 3 mul cos 0.2 mul add t 2 mul sin mul
%				}
%			\end{pspicture}
\begin{pspicture}(-2,-2)(2,2)
\psset{viewpoint=1 1 1}
\pstThreeDCoor[xMax=2.0, yMax=2.0, zMax=2.0]
\parametricplotThreeD[xPlotpoints=200, hiddenLine=true](0,360){%
1 t 3 mul cos 0.2 mul add t 2 mul cos mul
1 t 3 mul cos 0.2 mul add t 2 mul sin mul
t 3 mul sin
}
\end{pspicture}
\begin{pspicture}(-2,-2)(2,2)
\psset{viewpoint=0.5 0.5 1}
\pstThreeDCoor[xMax=2.0, yMax=2.0, zMax=2.0]
\parametricplotThreeD[xPlotpoints=200, hiddenLine=true](0,360){%
1 t 3 mul cos 0.2 mul add t 2 mul cos mul
1 t 3 mul cos 0.2 mul add t 2 mul sin mul
t 3 mul sin
}
\end{pspicture}
\begin{pspicture}(-2,-2)(2,2)
\psset{viewpoint=0.1 0.1 1}
\pstThreeDCoor[xMax=2.0, yMax=2.0, zMax=2.0]
\parametricplotThreeD[xPlotpoints=200, hiddenLine=true](0,360){%
1 t 3 mul cos 0.2 mul add t 2 mul cos mul
1 t 3 mul cos 0.2 mul add t 2 mul sin mul
t 3 mul sin
}
\end{pspicture}
\caption{The Trefoil}
\label{fig:bracelet}
\end{center}
\end{figure}

\end{document}

***************************************************************************************************************************************

But running this produced the error

> ! Undefined control sequence.
> \XC at usec@lor ...\expandafter \c at lor@to at ps #1#2\@@
>                                                   \else \expandafter \expand...
> l.29 				\parametricplotThreeD
>                               [xPlotpoints=200, hiddenLine=true](0,360){%
> ?

The only change between the two versions was some erasing of commented stuff and changing the package calls.

So I have two questions:
1. Why does the second version result in \parametricplotThreeD being undefined?
2. Why does viewpoint have no effect in my first version?

Zbigniew Nitecki
Department of Mathematics
Tufts University
Medford, MA 02155

telephones:
Office    (617)627-3843
Dept.    (617)627-3234
Dept. fax    (617)627-3966
http://www.tufts.edu/~znitecki/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/pstricks/attachments/20100708/2e33960c/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: picturetest3.pdf
Type: application/pdf
Size: 14003 bytes
Desc: not available
URL: <http://tug.org/pipermail/pstricks/attachments/20100708/2e33960c/attachment-0001.pdf>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/pstricks/attachments/20100708/2e33960c/attachment-0003.html>