|
Revision 89, 1.6 kB
(checked in by jpv, 6 months ago)
|
Correction bug de clipping sur projection droites + SphercalCoor? dans la doc
|
| Line | |
|---|
| 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 |
|
|---|
| 9 |
\makeatletter |
|---|
| 10 |
|
|---|
| 11 |
\title{\texttt{pst-solides3d} :\\ |
|---|
| 12 |
Test 1} |
|---|
| 13 |
\date{\today } |
|---|
| 14 |
\begin{document} |
|---|
| 15 |
\maketitle |
|---|
| 16 |
|
|---|
| 17 |
\section {Tube avec PSTricks} |
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
\psset{viewpoint=50 20 30 rtp2xyz} |
|---|
| 21 |
|
|---|
| 22 |
\begin{center} |
|---|
| 23 |
\psset{lightsrc=10 0 10,viewpoint=50 -20 30 rtp2xyz,Decran=50} |
|---|
| 24 |
\begin{pspicture*}(-5,-4)(6,3) |
|---|
| 25 |
\psframe(-5,-4)(6,3) |
|---|
| 26 |
\defFunction{F}(t){t Cos 2 mul}{t Sin 2 mul}{2 t mul Sin 1 mul} |
|---|
| 27 |
\psSolid[object=courbe, |
|---|
| 28 |
r=0.25, |
|---|
| 29 |
function=F, |
|---|
| 30 |
range=0 2 pi mul, |
|---|
| 31 |
fillcolor=red, |
|---|
| 32 |
ngrid=120 12, |
|---|
| 33 |
] |
|---|
| 34 |
\end{pspicture*} |
|---|
| 35 |
\end{center} |
|---|
| 36 |
|
|---|
| 37 |
\section {Tube avec jps} |
|---|
| 38 |
|
|---|
| 39 |
|
|---|
| 40 |
\psset{viewpoint=50 20 30 rtp2xyz} |
|---|
| 41 |
|
|---|
| 42 |
\begin{center} |
|---|
| 43 |
\psset{lightsrc=10 0 10,viewpoint=50 -20 30 rtp2xyz,Decran=50} |
|---|
| 44 |
\begin{pspicture*}(-5,-4)(6,3) |
|---|
| 45 |
\psframe(-5,-4)(6,3) |
|---|
| 46 |
\codejps{ |
|---|
| 47 |
/a 2 def |
|---|
| 48 |
/b 1 def |
|---|
| 49 |
|
|---|
| 50 |
/g { |
|---|
| 51 |
3 dict begin |
|---|
| 52 |
/t exch def |
|---|
| 53 |
t Cos a mul |
|---|
| 54 |
t Sin a mul |
|---|
| 55 |
2 t mul Sin b mul |
|---|
| 56 |
end |
|---|
| 57 |
} def |
|---|
| 58 |
|
|---|
| 59 |
/g' { |
|---|
| 60 |
3 dict begin |
|---|
| 61 |
/t exch def |
|---|
| 62 |
t Sin a neg mul |
|---|
| 63 |
t Cos a mul |
|---|
| 64 |
2 t mul Cos 2 b mul mul |
|---|
| 65 |
end |
|---|
| 66 |
} def |
|---|
| 67 |
|
|---|
| 68 |
0 pi 2 mul {g} CourbeR3 |
|---|
| 69 |
|
|---|
| 70 |
|
|---|
| 71 |
.3 setlinewidth |
|---|
| 72 |
|
|---|
| 73 |
noir |
|---|
| 74 |
|
|---|
| 75 |
GetCamPos setlightsrc |
|---|
| 76 |
|
|---|
| 77 |
|
|---|
| 78 |
0 pi 2 mul (g) .25 [120 12] newtube |
|---|
| 79 |
dup (rouge) outputcolors |
|---|
| 80 |
drawsolid** |
|---|
| 81 |
} |
|---|
| 82 |
\end{pspicture*} |
|---|
| 83 |
\end{center} |
|---|
| 84 |
|
|---|
| 85 |
\end{document} |
|---|