Initialisation du projet pst-solides3d.git (SVN revision 142)
[pst-solides3d.git] / tests / test_07.tex
1 \documentclass{article}
2 \usepackage{pst-solides3d,pst-node,pst-plot,multido,url}
3 \usepackage[latin1]{inputenc}
4 \usepackage[T1]{fontenc}
5 \usepackage{colortbl}
6 \usepackage{array}
7 \usepackage[a4paper,bottom=2.5cm,top=2cm]{geometry}
8 %%\usepackage[frenchle]{babel}
9 \makeatletter
10
11 \title{\texttt{pst-solides3d} :\\
12 Tests}
13 \date{\today }
14 \begin{document}
15 \maketitle
16
17 %\psset{lightsrc=10 20 30,viewpoint=50 20 30 rtp2xyz}
18 \psset{viewpoint=50 20 30 rtp2xyz}
19
20 \section {Test Tube avec jps}
21
22
23 \psset{lightsrc=80 30 30,viewpoint=100 45 45 rtp2xyz,Decran=100,linewidth=0.1pt}
24 \begin{pspicture}(-3.5,-2)(4,4)
25 \psframe*(-3.5,-2)(4,4)
26 \codejps{
27 /rpn {tx@AlgToPs begin AlgToPs end cvx exec} def
28 /xcy {(-2.065260000*sin(t)+2.065260000*cos(3*t)*sin(t)+.8624533334*cos(t)*sin(3*t)) rpn } def
29 /ycy {(2.065260000*cos(t)-2.065260000*cos(3*t)*cos(t)+.8624533334*sin(3*t)*sin(t)) rpn } def
30 /zcy {(2/3*sin(1.668)*(1-cos(3*t))) rpn } def
31 /xcy' {(-2.065260000*cos(t)-7.058233333*sin(3*t)*sin(t)+4.652620000*cos(3*t)*cos(t)) rpn } def
32 /ycy' {(-2.065260000*sin(t)+7.058233333*cos(t)*sin(3*t)+4.652620000*cos(3*t)*sin(t)) rpn } def
33 /zcy' {(2*sin(1.668)*sin(3*t)) rpn } def
34 %% /xcy'' {(2.065260000*sin(t)-25.82732000*cos(3*t)*sin(t)-21.01609333*cos(t)*sin(3*t)) rpn } def
35 %% /ycy'' {(-2.065260000*cos(t)-21.01609333*sin(3*t)*sin(t)+25.82732000*cos(3*t)*cos(t)) rpn } def
36 %% /zcy'' {(6*sin(1.668)*cos(3*t)) rpn } def
37 %/solidgrid false def
38 /g {
39 3 dict begin
40 /t exch def
41 xcy ycy zcy
42 end
43 } def
44 /g' { % dérivée première
45 3 dict begin
46 /t exch def
47 xcy' ycy' zcy'
48 end
49 } def
50 %% /g'' { % dérivée seconde
51 %% 3 dict begin
52 %% /t exch def
53 %% xcy'' ycy'' zcy''
54 %% end
55 %% } def
56 /cycloide{
57 % t_min t_max rayon_tube [resolution]
58 0 6.28 (g) .25 [36 6] newtube
59 dup [.1 .3] solidputhuecolors} def
60 cycloide
61 drawsolid**
62 }%
63 \end{pspicture}
64
65 \section {Test Tube avec PSTricks}
66
67
68 Avec $r=0.25$
69
70 \psset{lightsrc=80 30 30,viewpoint=100 45 45 rtp2xyz,Decran=100,linewidth=0.1pt}
71 \begin{pspicture}(-3.5,-2)(4,4)
72 \psframe(-3.5,-2)(4,4)
73 \defFunction[algebraic]{F}(t)
74 {-2.065260000*sin(t)+2.065260000*cos(3*t)*sin(t)+.8624533334*cos(t)*sin(3*t)}
75 {2.065260000*cos(t)-2.065260000*cos(3*t)*cos(t)+.8624533334*sin(3*t)*sin(t)}
76 {2/3*sin(1.668)*(1-cos(3*t))}
77 \defFunction[algebraic]{F'}(t)
78 {-2.065260000*cos(t)-7.058233333*sin(3*t)*sin(t)+4.652620000*cos(3*t)*cos(t)}
79 {-2.065260000*sin(t)+7.058233333*cos(t)*sin(3*t)+4.652620000*cos(3*t)*sin(t)}
80 {2*sin(1.668)*sin(3*t)}
81 %% \defFunction[algebraic]{F''}(t)
82 %% {2.065260000*sin(t)-25.82732000*cos(3*t)*sin(t)-21.01609333*cos(t)*sin(3*t)}
83 %% {-2.065260000*cos(t)-21.01609333*sin(3*t)*sin(t)+25.82732000*cos(3*t)*cos(t)}
84 %% {6*sin(1.668)*cos(3*t)}
85 \psSolid[object=courbe,
86 range=0 6.28,
87 ngrid=36 6,
88 function=F,
89 r=0.25]
90 \end{pspicture}
91
92 Avec $r=0$
93
94 \psset{lightsrc=80 30 30,viewpoint=100 45 45 rtp2xyz,Decran=100,linewidth=0.1pt}
95 \begin{pspicture}(-3.5,-2)(4,4)
96 \psframe(-3.5,-2)(4,4)
97 \defFunction[algebraic]{F}(t)
98 {-2.065260000*sin(t)+2.065260000*cos(3*t)*sin(t)+.8624533334*cos(t)*sin(3*t)}
99 {2.065260000*cos(t)-2.065260000*cos(3*t)*cos(t)+.8624533334*sin(3*t)*sin(t)}
100 {2/3*sin(1.668)*(1-cos(3*t))}
101 %% \defFunction[algebraic]{F'}(t)
102 %% {-2.065260000*cos(t)-7.058233333*sin(3*t)*sin(t)+4.652620000*cos(3*t)*cos(t)}
103 %% {-2.065260000*sin(t)+7.058233333*cos(t)*sin(3*t)+4.652620000*cos(3*t)*sin(t)}
104 %% {2*sin(1.668)*sin(3*t)}
105 %% \defFunction[algebraic]{F''}(t)
106 %% {2.065260000*sin(t)-25.82732000*cos(3*t)*sin(t)-21.01609333*cos(t)*sin(3*t)}
107 %% {-2.065260000*cos(t)-21.01609333*sin(3*t)*sin(t)+25.82732000*cos(3*t)*cos(t)}
108 %% {6*sin(1.668)*cos(3*t)}
109 \psSolid[object=courbe,
110 range=0 6.28,
111 function=F,
112 linecolor=blue,
113 r=0]
114 %% \codejps{
115 %% %0 6.28 {F} newcourbe drawsolid*
116 %% 0 6.28 {F} [20] newcourbe drawsolid*
117 %% }
118 \end{pspicture}
119
120 \end{document}

Licence Creative Commons Les fichiers de Syracuse sont mis à disposition (sauf mention contraire) selon les termes de la
Licence Creative Commons Attribution - Pas d’Utilisation Commerciale - Partage dans les Mêmes Conditions 4.0 International.