summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/pst-solides3d/doc/par-eclairageponctuel.tex
blob: b8e4c23915dd857d9c8e41cd933bf4374e39f542 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
\section {\' Eclairage par une source lumineuse ponctuelle}

Deux paramètres, l'un positionne la source, l'autre fixe l'intensité
lumineuse :
\begin{itemize}
  \item \Cadre{[lightsrc=20 30 50]} en coordonnées cartésiennes, ou 
\Cadre{[lightsrc=viewpoint]} pour faire coïncider la source lumineuse
avec l'observateur.
  \item \Cadre{[lightintensity=2]} (valeur par défaut).
\end{itemize}

\begin{multicols}{2}
\setlength{\columnseprule}{1pt}
\psset{unit=0.5}
\centerline{
\begin{pspicture}(-6,-5)(4,5)
\psframe(-6,-5)(4,5)
\psset{Decran=1e3,viewpoint=500 0 1000,lightsrc=viewpoint,mode=4}
\psSolid[object=cube,RotZ=30](0,2,0)
\psSolid[object=cylindrecreux,RotX=30,RotZ=-30,fillcolor=cyan,incolor=red](4,-3,0)
\end{pspicture}}
\begin{verbatim}
\psset{Decran=1e3,
       viewpoint=500 0 1000,
       lightsrc=viewpoint,
       mode=5}
\psSolid[object=cube,RotZ=30](0,2,0)
\psSolid[object=cylindrecreux,
         RotX=30,RotZ=-30,
         fillcolor=cyan,incolor=red](4,-3,0)
\end{verbatim}
\columnbreak
\centerline{
\begin{pspicture}(-6,-5)(4,5)
\psframe(-6,-5)(4,5)
\psset{Decran=30,viewpoint=30 10 20,lightsrc=viewpoint,mode=3}
\psSolid[object=cube,lightintensity=3,RotX=90,fillcolor=yellow](0,3,0)
\psSolid[object=cube,lightintensity=1,RotX=90,fillcolor=yellow](3,-3,0)
\end{pspicture}}
\begin{verbatim}
\psset{Decran=30,
       viewpoint=30 30 30,
       lightsrc=viewpoint,
       mode=3}
\psSolid[object=cube,
         lightintensity=3,
         RotX=90](0,3,0)
\psSolid[object=cube,
         lightintensity=1,
         RotX=90](3,-3,0)
\end{verbatim}
\end{multicols}
\textdbend{} Si l'option \texttt{[lightsrc=}\textsl{value1}~\textsl{value2}~\textsl{value3}\texttt{]}
n'est pas spécifiée, l'objet est uniformément éclairé.

\begin{center}
 \begin{pspicture}(-6,-4)(6,4)
\psframe(-6,-4)(6,4)
 \psset{Decran=15}
 \psSolid[object=datfile,file=tore1836,deactivatecolor]
 \axesIIID(0,4.5,0)(6,6,4)
 \end{pspicture}
\end{center}
\begin{verbatim}
 \psSolid[r1=3.5,r0=1,object=tore,ngrid=18 36,fillcolor={[rgb]{.372 .62 .628}}]%
\end{verbatim}