Re: vectors in polar coordinates
- To: mathgroup@smc.vnet.net
- Subject: [mg11776] Re: [mg11763] vectors in polar coordinates
- From: "Jürgen Tischer" <jtischer@pitagoras.univalle.edu.co>
- Date: Sat, 28 Mar 1998 00:25:14 -0500
Second question first:
norm[x_]=Sqrt[x.x].
First question:
If I work with polar vectors, I do define sum and so on by hand. It's
not that difficult either.
cart[polar[r_,f_]]=r{Cos[f],Sin[f]}
polar[x:{_x1,_x2}]=polar[norm[x],ArcTan[x1,x2]] polar/:
x_polar+y_polar=polar[cart[x]+cart[y]]
J|rgen
----------
> From: Michael Milirud <michael@idirect.com>
To: mathgroup@smc.vnet.net
> To: mathgroup@smc.vnet.net
> Subject: [mg11776] [mg11763] vectors in polar coordinates
> Date: Thursday, March 26, 1998 3:09 AM
>
> I'm really lost here. It seems there is almost NO support of simple
> vectors in Mathematica v.3.0
> If I want to add 2 vectors of which I have a polar (cylindrical)
> representation I am forced to do something like
>
> << Calculus`VectorAnalysis`
> SetCoordinates[Cylindrical]
> a={100, -115*Pi/180, 0}
> b={200, -30*Pi/180, 0}
> A=CoordinatesToCartesian[a, Cylindrical] B=CoordinatesToCartesian[b,
> Cylindrical] d=A+B
> D=CoordinatesFromCartesian[d, Cylindrical]
>
> and that is a HECK longer to do then by hand. There's got to be
> something simplier like:
> {100, -115*Pi/180, 0} + {200, -30*Pi/180, 0}
>
> or something...
>
> Also how do I find a magnitude of a vector. The Abs[] doesn't support
> this. Sqrt[d[[1]]^2+d[[2]]^2+d[[3]]^2]
>
> is simply hedious!!!
>
> Please help cause I'm really lost ;(
>
> Michael
>
> P.S. If possible, please also send a direct email to
> mmichael@idirect.com
>
>