3 \subsection{Direct definition
}
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
11 As with points, we can save the components of a vector using the
12 option
\Lkeyword{name
}.
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}
19 %% definition du plan de projection
26 %% definition du point A
27 \psProjection[object=point,
31 \psProjection[object=vecteur,
35 \psProjection[object=vecteur,
39 \axesIIID(
4,
2,
2)(
5,
4,
3)
44 \subsection{Some more definitions
}
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
52 \item \texttt{\Lkeyword{definition
}=
\Lkeyval{vecteur
}};
53 \texttt{\Lkeyword{args
}=$A$ $B$
}.
55 The vector $
\overrightarrow {AB
}$
57 \item \texttt{\Lkeyword{definition
}=
\Lkeyval{orthovecteur
}};
58 \texttt{\Lkeyword{args
}=$u$
}.
60 A vector perpendicular to $
\vec u$ with the same length.
62 \item \texttt{\Lkeyword{definition
}=
\Lkeyval{normalize
}};
63 \texttt{\Lkeyword{args
}=$u$
}.
65 The vector $
\Vert \vec u
\Vert ^
{-
1} \vec u$
66 if $
\vec u
\neq \vec 0$, and $
\vec 0$ otherwise.
68 \item \texttt{\Lkeyword{definition
}=
\Lkeyval{addv
}};
69 \texttt{\Lkeyword{args
}=$u$ $v$
}.
71 The vector $
\vec u +
\vec v$
73 \item \texttt{\Lkeyword{definition
}=
\Lkeyval{subv
}};
74 \texttt{\Lkeyword{args
}=$u$ $v$
}.
76 The vector $
\vec u -
\vec v$
78 \item \texttt{\Lkeyword{definition
}=
\Lkeyval{mulv
}};
79 \texttt{\Lkeyword{args
}=$u$ $
\alpha $
}.
81 The vector $
\alpha \vec u$