Student/VectorCalculus/ConvertVector - Maple Help

Student[VectorCalculus]

 ConvertVector
 converts Cartesian free Vectors, rooted Vectors and position Vectors among themselves

 Calling Sequence ConvertVector(v,form) ConvertVector(v,form, root )

Parameters

 v - 'Vector'(algebraic); the Cartesian free Vector, rooted Vector or position Vector to convert form - name; specify the type of Vector to be converted to: free, rooted or position root - (optional) list(algebraic) or Vector(algebraic); root point of the converted Vector

Description

 • The ConvertVector command converts Cartesian free Vectors, rooted Vectors and position Vectors among themselves by specifying the desired type. If v is not a Cartesian Vector, an error is raised.
 • If form is rooted, the root point can be specified as a list or a free Vector with the extra optional parameter root. If root is a list, it is interpreted in Cartesian coordinates, if it is a free Vector in non-Cartesian coordinates, an appropriate transformation is made to obtain a Cartesian root.
 – If form is rooted, v is a free, rooted or position Vector and root is provided, the result is the Vector rooted at root.
 – If form is rooted, v is a position Vector and root is not provided, then the Vector is rooted at the Cartesian origin.
 – If form is rooted, v is a free Vector and root is not provided, an error is raised.
 • The Student[VectorCalculus] package uses the same Vector data structures as the VectorCalculus package. For details about the various types of Vectors in these packages, see VectorCalculus,Details.

Examples

 > $\mathrm{with}\left(\mathrm{Student}\left[\mathrm{VectorCalculus}\right]\right):$
 > $\mathrm{ConvertVector}\left(\mathrm{PositionVector}\left(\left[1,p\right],\mathrm{polar}\right),'\mathrm{rooted}'\right)$
 $\left[\begin{array}{c}{\mathrm{cos}}{}\left({p}\right)\\ {\mathrm{sin}}{}\left({p}\right)\end{array}\right]$ (1)
 > $\mathrm{pv}≔\mathrm{PositionVector}\left(\left[p\mathrm{cos}\left(p\right),p\mathrm{sin}\left(p\right)\right],\mathrm{cartesian}\left[x,y\right]\right)$
 ${\mathrm{pv}}{≔}\left[\begin{array}{c}{p}{}{\mathrm{cos}}{}\left({p}\right)\\ {p}{}{\mathrm{sin}}{}\left({p}\right)\end{array}\right]$ (2)
 > $\mathrm{v1}≔\mathrm{ConvertVector}\left(\mathrm{pv},'\mathrm{free}'\right)$
 ${\mathrm{v1}}{≔}\left({p}{}{\mathrm{cos}}{}\left({p}\right)\right){{e}}_{{x}}{+}\left({p}{}{\mathrm{sin}}{}\left({p}\right)\right){{e}}_{{y}}$ (3)
 > $\mathrm{v2}≔\mathrm{ConvertVector}\left(\mathrm{pv},'\mathrm{rooted}'\right)$
 ${\mathrm{v2}}{≔}\left[\begin{array}{c}{p}{}{\mathrm{cos}}{}\left({p}\right)\\ {p}{}{\mathrm{sin}}{}\left({p}\right)\end{array}\right]$ (4)
 > $\mathrm{About}\left(\mathrm{v2}\right)$
 $\left[\begin{array}{cc}{\mathrm{Type:}}& {\mathrm{Rooted Vector}}\\ {\mathrm{Components:}}& \left[{p}{}{\mathrm{cos}}{}\left({p}\right){,}{p}{}{\mathrm{sin}}{}\left({p}\right)\right]\\ {\mathrm{Coordinates:}}& {{\mathrm{cartesian}}}_{{x}{,}{y}}\\ {\mathrm{Root Point:}}& \left[{0}{,}{0}\right]\end{array}\right]$ (5)
 > $\mathrm{GetRootPoint}\left(\mathrm{v2}\right)$
 $\left({0}\right){{e}}_{{x}}{+}\left({0}\right){{e}}_{{y}}$ (6)
 > $\mathrm{v3}≔\mathrm{ConvertVector}\left(\mathrm{pv},'\mathrm{rooted}',\left[1,1\right]\right)$
 ${\mathrm{v3}}{≔}\left[\begin{array}{c}{p}{}{\mathrm{cos}}{}\left({p}\right)\\ {p}{}{\mathrm{sin}}{}\left({p}\right)\end{array}\right]$ (7)
 > $\mathrm{GetRootPoint}\left(\mathrm{v3}\right)$
 $\left({1}\right){{e}}_{{x}}{+}\left({1}\right){{e}}_{{y}}$ (8)
 > $\mathrm{v4}≔\mathrm{ConvertVector}\left(\mathrm{pv},'\mathrm{rooted}',\mathrm{Vector}\left(⟨1,\frac{\mathrm{\pi }}{2}⟩,\mathrm{coords}=\mathrm{polar}\left[u,v\right]\right)\right)$
 ${\mathrm{v4}}{≔}\left[\begin{array}{c}{p}{}{\mathrm{cos}}{}\left({p}\right)\\ {p}{}{\mathrm{sin}}{}\left({p}\right)\end{array}\right]$ (9)
 > $\mathrm{GetRootPoint}\left(\mathrm{v4}\right)$
 $\left({0}\right){{e}}_{{x}}{+}\left({1}\right){{e}}_{{y}}$ (10)