Initialisation du projet pst-solides3d.git (SVN revision 142)
[pst-solides3d.git] / doc-en / .svn / text-base / par-projectionvecteur-en.tex.svn-base
1 \section{Vectors}
2
3 \subsection{Direct definition}
4
5 The object \Lkeyword{vecteur} allows us to define and draw a \Index{vector}.
6 To do so in a simple way, we use the option \Lkeyword{args} to define
7 its components $(x,y)$ and we specify the point from where the
8 vector starts with the macro \Lcs{psProjection} (or we may use a
9 named point).
10
11 As with points, we can save the components of a vector using the
12 option \Lkeyword{name}.
13
14 \begin{LTXexample}[width=7.5cm]
15 \begin{pspicture}(-3,-3)(4,3.5)%
16 \psframe*[linecolor=blue!50](-3,-3)(4,3.5)
17 \psset{viewpoint=50 30 15,Decran=60}
18 \psset{solidmemory}
19 %% definition du plan de projection
20 \psSolid[object=plan,
21    definition=equation,
22    args={[1 0 0 0] 90},
23    planmarks,
24    name=monplan]
25 \psset{plan=monplan}
26 %% definition du point A
27 \psProjection[object=point,
28    args=-2 0.75,
29    name=A,text=A,
30    pos=dl]
31 \psProjection[object=vecteur,
32    linecolor=red,
33    args=1 1,
34    name=U](1,0)
35 \psProjection[object=vecteur,
36    args=U,
37    linecolor=blue](A)
38 \composeSolid
39 \axesIIID(4,2,2)(5,4,3)
40 \end{pspicture}
41 \end{LTXexample}
42
43
44 \subsection{Some more definitions}
45
46 There are other methods to define a vector in 2D. The options
47 \Lkeyword{definition} and \Lkeyword{args} allow us a variety of supported
48 methods:
49
50 \begin{itemize}
51
52 \item \texttt{\Lkeyword{definition}=\Lkeyval{vecteur}};
53 \texttt{\Lkeyword{args}=$A$ $B$}.
54
55 The vector $\overrightarrow {AB}$
56
57 \item \texttt{\Lkeyword{definition}=\Lkeyval{orthovecteur}};
58 \texttt{\Lkeyword{args}=$u$}.
59
60 A vector perpendicular to $\vec u$ with the same length.
61
62 \item \texttt{\Lkeyword{definition}=\Lkeyval{normalize}};
63 \texttt{\Lkeyword{args}=$u$}.
64
65 The vector $\Vert \vec u \Vert ^{-1} \vec u$
66 if $\vec u \neq \vec 0$, and $\vec 0$ otherwise.
67
68 \item \texttt{\Lkeyword{definition}=\Lkeyval{addv}};
69 \texttt{\Lkeyword{args}=$u$ $v$}.
70
71 The vector $\vec u + \vec v$
72
73 \item \texttt{\Lkeyword{definition}=\Lkeyval{subv}};
74 \texttt{\Lkeyword{args}=$u$ $v$}.
75
76 The vector $\vec u - \vec v$
77
78 \item \texttt{\Lkeyword{definition}=\Lkeyval{mulv}};
79 \texttt{\Lkeyword{args}=$u$ $\alpha $}.
80
81 The vector $\alpha \vec u$
82
83 \end{itemize}
84
85 \endinput

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.