summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/pst-solides3d/src/text/par-vecteur-en.tex
blob: ca9ccc36ddf152dc09eb851f27f566e00cfa890e (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{The object \texttt{vecteur}}

\subsection{Definition with components}

The object \Lkeyword{vecteur} allows us to define a \Index{vector}. The simplest way to do
that is to use the argument \texttt{\Lkeyword{args}=$x$ $y$ $z$} to specify its \Index{components}.

\psset{lightsrc=10 -20 50,viewpoint=50 -20 30 rtp2xyz,Decran=100}
\begin{LTXexample}[width=6cm]
\begin{pspicture*}(-1,-1)(1,2)
\psSolid[object=vecteur,
    action=draw*,
   args=0 0 1,
   linecolor=yellow]%
\psSolid[object=vecteur,
   args=1 0 0,
   linecolor=red]
\psSolid[object=vecteur,
   args=0 0 1,
   linecolor=blue](1,0,0)
\end{pspicture*}
\end{LTXexample}

\subsection{Definition with 2 points}

We can also define a vector with 2 given points $A$ and $B$ of $\mathbb{R}^3$.

We then use the arguments \texttt{\Lkeyword{definition}=\Lkeyval{vecteur3d}} and \texttt{\Lkeyword{args}=$x_A$ $y_A$ $z_A$ $x_B$
$y_B$ $z_B$} where  $(x_A, y_A, z_A)$ and $(x_B, y_B, z_B)$  are the appropriate coordinates of the points $A$ and $B$

If the points $A$ and $B$ were already defined, we can easily use the named variables:
\texttt{\Lkeyword{args}=$A$ $B$}.

\psset{lightsrc=10 -20 50,viewpoint=20 20 20,Decran=20}
\begin{LTXexample}[width=6cm]
\begin{pspicture*}(-3,-3)(4.5,2)
\psSolid[object=plan,
   linecolor=gray,
   definition=equation,
   args={[0 1 1 0]},
   base=-1 3 -2 2,
   planmarks,
   plangrid]
\psSolid[object=vecteur,
   definition=vecteur3d,
   args=0 0 1 1 1 1]%
\end{pspicture*}
\end{LTXexample}


\subsection{Some other definitions of a vector}

There are some other possibilities to define a \Index{vector}. Here a list of some
possible definitions with the appropriate arguments:

\begin{itemize}

\item \texttt{\Lkeyword{definition}=\Lkeyval{addv3d}};
\texttt{\Lkeyword{args}= $\vec u$ $\vec v$}.

Addition of 2 vectors.

\item \texttt{\Lkeyword{definition}=\Lkeyval{subv3d}};
\texttt{\Lkeyword{args}= $\vec u$ $\vec v$}.

Difference of 2 vectors.

\item \texttt{\Lkeyword{definition}=\Lkeyval{mulv3d}};
\texttt{\Lkeyword{args}= $\vec u$ $\lambda $}.

\Index{Multiplication} of a vector with a real.

\item \texttt{\Lkeyword{definition}=\Lkeyval{vectprod3d}};
\texttt{\Lkeyword{args}= $\vec u$ $\vec v$}.

\Index{Vector product} of 2 vectors.

\item \texttt{\Lkeyword{definition}=\Lkeyval{normalize3d}};
\texttt{\Lkeyword{args}= $\vec u$}.

\Index{Normalized vector} $\Vert \vec u\Vert ^{-1} \vec u$.

\end{itemize}

\endinput