<HTML><FONT FACE=arial,helvetica><HTML><FONT  SIZE=2 PTSIZE=10 FAMILY="SANSSERIF" FACE="Arial" LANG="1">Ravi Gautam wrote:<BR>
<BR>
&gt;I need to draw Bezier curves in three dimension. Please let me know if <BR>
&gt;any body know the commands for it. Also is there any command similar <BR>
&gt;to parametric plot for 3D.&nbsp; <BR>
<BR>
One can also easily draw 3D curves: parametric, bezier or other with the the package pst-3D. In this package, there is a macro (tx@ProjThreeD), writen by Timothy Van Zandt (the author),&nbsp; which, as far i can see, have been never used. This macro allows to&nbsp; put a point in 3 coordinates. To increase the possibility, i have use it in association with&nbsp; pst-node in the aim to make a command simpler to use.<BR>
 <BR>
Let me give three basic examples :<BR>
<BR>
\documentclass[12pt,a4paper]{article}<BR>
\usepackage{pst-plot,pst-3d,pst-node}%<BR>
% Manuel Luque<BR>
% mluque5130@aol.com<BR>
\SpecialCoor<BR>
\makeatletter<BR>
\let\ProjThreeD\tx@ProjThreeD<BR>
\makeatother<BR>
<BR>
\makeatletter<BR>
\def\pnodeThreeD(#1,#2,#3)#4{%<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \pst@Verb{%<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \psk@embedangle<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \psk@viewpoint<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \psk@viewangle<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \tx@SetMatrixThreeD}<BR>
&nbsp; \pnode(!#1 #2 #3 \ProjThreeD){#4}}<BR>
\makeatother<BR>
\psset{plotpoints=720}<BR>
\pagestyle{empty}<BR>
\begin{document}<BR>
\begin{pspicture}(-5,-8)(5,10)<BR>
\def\vx{1}\def\vy{0.5}\def\vz{0.5}<BR>
\psset{viewpoint={\vx} {\vy} {\vz}}%<BR>
\pnodeThreeD(0,0,12){Z}<BR>
\pstVerb{%<BR>
&nbsp;&nbsp;&nbsp; /vX \vx\space def<BR>
&nbsp;&nbsp;&nbsp; /vY \vy\space def<BR>
&nbsp;&nbsp;&nbsp; /vZ \vz\space def<BR>
&nbsp;&nbsp;&nbsp; /Start vX neg vY atan def<BR>
&nbsp;&nbsp;&nbsp;&nbsp; Start 270 ge {/Start Start 360 sub def} if<BR>
&nbsp;&nbsp;&nbsp; /Stop 180 Start add def<BR>
&nbsp;&nbsp;&nbsp; /Radius 3 def<BR>
&nbsp;&nbsp;&nbsp; /H 9 def}<BR>
\parametricplot{Start}{Stop}{%<BR>
&nbsp;&nbsp;&nbsp; Radius t cos mul<BR>
&nbsp;&nbsp;&nbsp; Radius t sin mul<BR>
&nbsp;&nbsp;&nbsp; 0<BR>
&nbsp;&nbsp;&nbsp; \ProjThreeD}<BR>
\pnodeThreeD(Start cos Radius mul,Start sin Radius mul,0){A1}<BR>
\pnodeThreeD(Stop cos Radius mul,Stop sin Radius mul,0){A2}<BR>
\pnodeThreeD(Start cos Radius mul,Start sin Radius mul,H){B1}<BR>
\pnodeThreeD(Stop cos Radius mul,Stop sin Radius mul,H){B2}<BR>
\parametricplot[fillstyle=hlines,hatchcolor=green]{0}{360}{%<BR>
&nbsp;&nbsp;&nbsp; Radius t cos mul<BR>
&nbsp;&nbsp;&nbsp; Radius t sin mul<BR>
&nbsp;&nbsp;&nbsp; H<BR>
&nbsp;&nbsp;&nbsp; \ProjThreeD}<BR>
\parametricplot[linecolor=cyan,linestyle=dashed]{0}{1440}{%<BR>
&nbsp;&nbsp;&nbsp; Radius t cos mul<BR>
&nbsp;&nbsp;&nbsp; Radius t sin mul<BR>
&nbsp;&nbsp;&nbsp; t 7 mul 1440 div<BR>
&nbsp;&nbsp;&nbsp; \ProjThreeD}<BR>
\parametricplot[linecolor=blue]{0}{Stop}{%<BR>
&nbsp;&nbsp;&nbsp; Radius t cos mul<BR>
&nbsp;&nbsp;&nbsp; Radius t sin mul<BR>
&nbsp;&nbsp;&nbsp; t 7 mul 1440 div<BR>
&nbsp;&nbsp;&nbsp; \ProjThreeD}<BR>
\multido{\iA=360+360}{4}{%<BR>
\parametricplot[linecolor=blue]{Start}{Stop}{%<BR>
&nbsp;&nbsp;&nbsp; Radius t cos mul<BR>
&nbsp;&nbsp;&nbsp; Radius t sin mul<BR>
&nbsp;&nbsp;&nbsp; t \iA\space add 7 mul 1440 div<BR>
&nbsp;&nbsp;&nbsp; \ProjThreeD}}<BR>
\psline(A1)(B1)<BR>
\psline(A2)(B2)<BR>
\pnodeThreeD(0,0,H){H}<BR>
\uput[180](Z){$z$}<BR>
\psline[linecolor=red]{-&gt;}(H)(Z)<BR>
\psdot[linecolor=red](H)<BR>
\end{pspicture}<BR>
<BR>
\begin{pspicture}(-5,-8)(5,10)<BR>
\def\vx{1}\def\vy{0.5}\def\vz{0.5}<BR>
\psset{viewpoint={\vx} {\vy} {\vz}}%<BR>
\pnodeThreeD(0,0,0){O}<BR>
\pnodeThreeD(0,0,10){Z}<BR>
\pnodeThreeD(7,0,0){X}<BR>
\pnodeThreeD(0,7,0){Y}<BR>
\psline{-&gt;}(O)(X)<BR>
\psline{-&gt;}(O)(Z)<BR>
\psline{-&gt;}(O)(Y)<BR>
\uput[180](Z){$z$}<BR>
\uput[0](X){$x$}<BR>
\uput[0](Y){$y$}<BR>
\pnodeThreeD(4,0,0){A}<BR>
\pnodeThreeD(4,4,0){B}<BR>
\pnodeThreeD(4,4,4){C}<BR>
\pnodeThreeD(0,0,4){D}<BR>
\psbezier[linewidth=1mm,linecolor=red,showpoints=true]{|-&gt;}(A)(B)(C)(D)<BR>
\end{pspicture}<BR>
<BR>
<BR>
\begin{pspicture}(-5,-8)(5,10)<BR>
\def\vx{1}\def\vy{0.5}\def\vz{0.5}<BR>
\psset{viewpoint={\vx} {\vy} {\vz}}%<BR>
\pnodeThreeD(0,0,10){Z}<BR>
\uput[180](Z){$z$}<BR>
\pstVerb{%<BR>
&nbsp;&nbsp;&nbsp; /vX \vx\space def<BR>
&nbsp;&nbsp;&nbsp; /vY \vy\space def<BR>
&nbsp;&nbsp;&nbsp; /vZ \vz\space def<BR>
&nbsp;&nbsp;&nbsp; /Start vX neg vY atan def<BR>
&nbsp;&nbsp;&nbsp;&nbsp; Start 270 ge {/Start Start 360 sub def} if<BR>
&nbsp;&nbsp;&nbsp; /Stop 180 Start add def<BR>
&nbsp;&nbsp;&nbsp; /Radius 3 def<BR>
&nbsp;&nbsp;&nbsp; /H 9 def}<BR>
\parametricplot{Start}{Stop}{%<BR>
&nbsp;&nbsp;&nbsp; Radius t cos mul<BR>
&nbsp;&nbsp;&nbsp; Radius t sin mul<BR>
&nbsp;&nbsp;&nbsp; 0<BR>
&nbsp;&nbsp;&nbsp; \ProjThreeD}<BR>
\pnodeThreeD(Start cos Radius mul,Start sin Radius mul,0){A1}<BR>
\pnodeThreeD(Stop cos Radius mul,Stop sin Radius mul,0){A2}<BR>
\pnodeThreeD(Start cos Radius mul,Start sin Radius mul,H){B1}<BR>
\pnodeThreeD(Stop cos Radius mul,Stop sin Radius mul,H){B2}<BR>
\parametricplot{0}{360}{%<BR>
&nbsp;&nbsp;&nbsp; Radius t cos mul<BR>
&nbsp;&nbsp;&nbsp; Radius t sin mul<BR>
&nbsp;&nbsp;&nbsp; H<BR>
&nbsp;&nbsp;&nbsp; \ProjThreeD}<BR>
\parametricplot[linecolor=red]{0}{Stop}{%<BR>
&nbsp;&nbsp;&nbsp; Radius t cos mul<BR>
&nbsp;&nbsp;&nbsp; Radius t sin mul<BR>
&nbsp;&nbsp;&nbsp; t 7 mul 720 div<BR>
&nbsp;&nbsp;&nbsp; \ProjThreeD}<BR>
\multido{\iA=0+360}{5}{%<BR>
\pscustom[linecolor=blue]{%<BR>
\parametricplot{Start}{Stop}{%<BR>
&nbsp;&nbsp;&nbsp; Radius t cos mul<BR>
&nbsp;&nbsp;&nbsp; Radius t sin mul<BR>
&nbsp;&nbsp;&nbsp; t \iA\space add 7 mul 1440 div<BR>
&nbsp;&nbsp;&nbsp; \ProjThreeD}%<BR>
\parametricplot{Stop}{Start}{%<BR>
&nbsp;&nbsp;&nbsp; Radius t cos mul<BR>
&nbsp;&nbsp;&nbsp; Radius t sin mul<BR>
&nbsp;&nbsp;&nbsp; t \iA\space add 7 mul 1440 div 1 add<BR>
&nbsp;&nbsp;&nbsp; \ProjThreeD}<BR>
\fill[fillstyle=solid,fillcolor=yellow]}}%<BR>
%<BR>
\multido{\iA=0+360}{5}{%<BR>
\parametricplot[linecolor=red]{Start}{Stop}{%<BR>
&nbsp;&nbsp;&nbsp; Radius t cos mul<BR>
&nbsp;&nbsp;&nbsp; Radius t sin mul<BR>
&nbsp;&nbsp;&nbsp; t \iA\space add 7 mul 1440 div<BR>
&nbsp;&nbsp;&nbsp; \ProjThreeD}}%<BR>
\psline(A1)(B1)<BR>
\psline(A2)(B2)<BR>
\pnodeThreeD(0,0,H){H}<BR>
\pnodeThreeD(0,0,10){Z}<BR>
\uput[180](Z){$z$}<BR>
\psline[linecolor=red]{-&gt;}(H)(Z)<BR>
\psdot[linecolor=red](H)<BR>
\end{pspicture}<BR>
\end{document}<BR>
<BR>
Manuel<BR>
<BR>
<BR>
<BR>
<BR>
</FONT></HTML>