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

\subsection{Definition with components}

The object \verb+vecteur+ allows us to define a vector. The simplest way to do that is to use the argument \texttt{[args=$x$ $y$ $z$]} to specify its 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$.

One then uses the arguments \verb+[definition=vecteur3d]+ and \texttt{[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$ et $B$

If the points $A$ and $B$ were already defined, one can easily use the named variables:
\texttt{[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 vector. Here a list of some possible definitions with the appropriate arguments:

\begin{itemize}

\item \verb+[definition=addv3d]+;
\verb+args=+ $\vec u$ $\vec v$.

Addition of 2 vectors.

\item \verb+[definition=subv3d]+;
\verb+args=+ $\vec u$ $\vec v$.

Difference of 2 vectors.

\item \verb+[definition=mulv3d]+;
\verb+args=+ $\vec u$ $\lambda $.

Multiplication of a vector with a real.

\item \verb+[definition=vectprod3d]+;
\verb+args=+ $\vec u$ $\vec v$.

Vector product of 2 vectors.

\item \verb+[definition=normalize3d]+;
\verb+args=+ $\vec u$.

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

\end{itemize}

\endinput