\documentclass{article} \usepackage{pst-solides3d,pst-node,pst-plot,multido,url} \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc} \usepackage{colortbl} \usepackage{array} \usepackage[a4paper,bottom=2.5cm,top=2cm]{geometry} %%\usepackage[frenchle]{babel} \makeatletter \title{\texttt{pst-solides3d} :\\ Tests} \date{\today } \begin{document} \maketitle %\psset{lightsrc=10 20 30,viewpoint=50 20 30 rtp2xyz} \psset{viewpoint=50 20 30 rtp2xyz} \section {Test Tube avec jps} \psset{lightsrc=80 30 30,viewpoint=100 45 45 rtp2xyz,Decran=100,linewidth=0.1pt} \begin{pspicture}(-3.5,-2)(4,4) \psframe*(-3.5,-2)(4,4) \codejps{ /rpn {tx@AlgToPs begin AlgToPs end cvx exec} def /xcy {(-2.065260000*sin(t)+2.065260000*cos(3*t)*sin(t)+.8624533334*cos(t)*sin(3*t)) rpn } def /ycy {(2.065260000*cos(t)-2.065260000*cos(3*t)*cos(t)+.8624533334*sin(3*t)*sin(t)) rpn } def /zcy {(2/3*sin(1.668)*(1-cos(3*t))) rpn } def /xcy' {(-2.065260000*cos(t)-7.058233333*sin(3*t)*sin(t)+4.652620000*cos(3*t)*cos(t)) rpn } def /ycy' {(-2.065260000*sin(t)+7.058233333*cos(t)*sin(3*t)+4.652620000*cos(3*t)*sin(t)) rpn } def /zcy' {(2*sin(1.668)*sin(3*t)) rpn } def %% /xcy'' {(2.065260000*sin(t)-25.82732000*cos(3*t)*sin(t)-21.01609333*cos(t)*sin(3*t)) rpn } def %% /ycy'' {(-2.065260000*cos(t)-21.01609333*sin(3*t)*sin(t)+25.82732000*cos(3*t)*cos(t)) rpn } def %% /zcy'' {(6*sin(1.668)*cos(3*t)) rpn } def %/solidgrid false def /g { 3 dict begin /t exch def xcy ycy zcy end } def /g' { % dérivée première 3 dict begin /t exch def xcy' ycy' zcy' end } def %% /g'' { % dérivée seconde %% 3 dict begin %% /t exch def %% xcy'' ycy'' zcy'' %% end %% } def /cycloide{ % t_min t_max rayon_tube [resolution] 0 6.28 (g) .25 [36 6] newtube dup [.1 .3] solidputhuecolors} def cycloide drawsolid** }% \end{pspicture} \section {Test Tube avec PSTricks} Avec $r=0.25$ \psset{lightsrc=80 30 30,viewpoint=100 45 45 rtp2xyz,Decran=100,linewidth=0.1pt} \begin{pspicture}(-3.5,-2)(4,4) \psframe(-3.5,-2)(4,4) \defFunction[algebraic]{F}(t) {-2.065260000*sin(t)+2.065260000*cos(3*t)*sin(t)+.8624533334*cos(t)*sin(3*t)} {2.065260000*cos(t)-2.065260000*cos(3*t)*cos(t)+.8624533334*sin(3*t)*sin(t)} {2/3*sin(1.668)*(1-cos(3*t))} \defFunction[algebraic]{F'}(t) {-2.065260000*cos(t)-7.058233333*sin(3*t)*sin(t)+4.652620000*cos(3*t)*cos(t)} {-2.065260000*sin(t)+7.058233333*cos(t)*sin(3*t)+4.652620000*cos(3*t)*sin(t)} {2*sin(1.668)*sin(3*t)} %% \defFunction[algebraic]{F''}(t) %% {2.065260000*sin(t)-25.82732000*cos(3*t)*sin(t)-21.01609333*cos(t)*sin(3*t)} %% {-2.065260000*cos(t)-21.01609333*sin(3*t)*sin(t)+25.82732000*cos(3*t)*cos(t)} %% {6*sin(1.668)*cos(3*t)} \psSolid[object=courbe, range=0 6.28, ngrid=36 6, function=F, r=0.25] \end{pspicture} Avec $r=0$ \psset{lightsrc=80 30 30,viewpoint=100 45 45 rtp2xyz,Decran=100,linewidth=0.1pt} \begin{pspicture}(-3.5,-2)(4,4) \psframe(-3.5,-2)(4,4) \defFunction[algebraic]{F}(t) {-2.065260000*sin(t)+2.065260000*cos(3*t)*sin(t)+.8624533334*cos(t)*sin(3*t)} {2.065260000*cos(t)-2.065260000*cos(3*t)*cos(t)+.8624533334*sin(3*t)*sin(t)} {2/3*sin(1.668)*(1-cos(3*t))} %% \defFunction[algebraic]{F'}(t) %% {-2.065260000*cos(t)-7.058233333*sin(3*t)*sin(t)+4.652620000*cos(3*t)*cos(t)} %% {-2.065260000*sin(t)+7.058233333*cos(t)*sin(3*t)+4.652620000*cos(3*t)*sin(t)} %% {2*sin(1.668)*sin(3*t)} %% \defFunction[algebraic]{F''}(t) %% {2.065260000*sin(t)-25.82732000*cos(3*t)*sin(t)-21.01609333*cos(t)*sin(3*t)} %% {-2.065260000*cos(t)-21.01609333*sin(3*t)*sin(t)+25.82732000*cos(3*t)*cos(t)} %% {6*sin(1.668)*cos(3*t)} \psSolid[object=courbe, range=0 6.28, function=F, linecolor=blue, r=0] %% \codejps{ %% %0 6.28 {F} newcourbe drawsolid* %% 0 6.28 {F} [20] newcourbe drawsolid* %% } \end{pspicture} \end{document}