summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/pst-solides3d/doc-en/par-projectionvecteur_en_corr.tex
blob: b33c652a21b65c8befdf0256c16b5b6ab352cab8 (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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
\section{Vectors}

\subsection{Direct definition}

The object \texttt{vecteur} allows us to define and draw a vector.
To do so in a simple way, we use the option \verb+args+ to define
its components $(x,y)$ and we specify the point from where the
vector starts with the macro \bs{psProjection} (or we may use a
named point).

As with points, we can save the components of a vector using the
option \texttt{name}.

\begin{LTXexample}[width=7.5cm]
\begin{pspicture}(-3,-3)(4,3.5)%
\psframe*[linecolor=blue!50](-3,-3)(4,3.5)
\psset{viewpoint=50 30 15,Decran=60}
\psset{solidmemory}
%% definition du plan de projection
\psSolid[object=plan,
   definition=equation,
   args={[1 0 0 0] 90},
   planmarks,
   name=monplan]
\psset{plan=monplan}
%% definition du point A
\psProjection[object=point,
   args=-2 0.75,
   name=A,text=A,
   pos=dl]
\psProjection[object=vecteur,
   linecolor=red,
   args=1 1,
   name=U](1,0)
\psProjection[object=vecteur,
   args=U,
   linecolor=blue](A)
\composeSolid
\axesIIID(4,2,2)(5,4,3)
\end{pspicture}
\end{LTXexample}


\subsection{Some more definitions}

There are other methods to define a vector in 2D. The options
\texttt{definition} and \texttt{args} allow a variety of supported
methods:

\begin{itemize}

\item \texttt{[definition=vecteur]};
\verb+args=+ $A$ $B$. 

The vector $\overrightarrow {AB}$

\item \texttt{[definition=orthovecteur]};
\verb+args=+ $u$. 

A vector perpendicular to $\vec u$ with the same length.

\item \texttt{[definition=normalize]};
\verb+args=+ $u$. 

The vector $\Vert \vec u \Vert ^{-1} \vec u$
if $\vec u \neq \vec 0$, and $\vec 0$ otherwise.

\item \texttt{[definition=addv]};
\verb+args=+ $u$ $v$. 

The vector $\vec u + \vec v$

\item \texttt{[definition=subv]};
\verb+args=+ $u$ $v$. 

The vector $\vec u - \vec v$

\item \texttt{[definition=mulv]};
\verb+args=+ $u$ $\alpha $. 

The vector $\alpha \vec u$

\end{itemize}

\endinput