| 1 |
\section{Lines} |
| 2 |
|
| 3 |
\subsection{Direct definition} |
| 4 |
|
| 5 |
The object \Lkeyword{line} defines a \Index{line} (or a series of line |
| 6 |
segments). We use the option \Lkeyword{args} to specify the points: |
| 7 |
\texttt{[object=line,args=$A_0$ $A_1$ \ldots $A_n$]} |
| 8 |
|
| 9 |
We can also define a line that has been transformed using a |
| 10 |
translation, a rotation, a homothety, etc., as though it were a |
| 11 |
polygon. |
| 12 |
|
| 13 |
\begin{LTXexample}[width=7.5cm] |
| 14 |
\begin{pspicture}(-3,-3)(4,3.5)% |
| 15 |
\psframe*[linecolor=blue!50](-3,-3)(4,3.5) |
| 16 |
\psset{lightsrc=50 20 20,viewpoint=50 30 15,Decran=60} |
| 17 |
\psset{solidmemory} |
| 18 |
\psSolid[object=grille, |
| 19 |
base=-3 0 -3 3, |
| 20 |
linewidth=0.5\pslinewidth,linecolor=gray,] |
| 21 |
%% definition du plan de projection |
| 22 |
\psSolid[object=plan, |
| 23 |
definition=equation, |
| 24 |
args={[1 0 0 0] 90}, |
| 25 |
base=-3.2 3.2 -2.2 2.2, |
| 26 |
name=monplan, |
| 27 |
planmarks] |
| 28 |
\psset{plan=monplan} |
| 29 |
\psSolid[object=plan, |
| 30 |
args=monplan, |
| 31 |
linecolor=gray!40, |
| 32 |
plangrid, |
| 33 |
action=none] |
| 34 |
\psProjection[object=line, |
| 35 |
args=-1 0 -3 1 1 2, |
| 36 |
name=P] |
| 37 |
\psProjection[object=line, |
| 38 |
definition=rotatepol, |
| 39 |
linecolor=blue, |
| 40 |
args=P -1 0 -45] |
| 41 |
%% du code jps dans la definition |
| 42 |
\psProjection[object=line, |
| 43 |
definition={2 -2 addv} papply, |
| 44 |
linestyle=dashed, |
| 45 |
args=P] |
| 46 |
\composeSolid |
| 47 |
\axesIIID(4,2,2)(5,4,3) |
| 48 |
\end{pspicture} |
| 49 |
\end{LTXexample} |
| 50 |
|
| 51 |
\endinput |