[Date Index]
[Thread Index]
[Author Index]
Re: Question:Polar Field Plot
*To*: mathgroup at smc.vnet.net
*Subject*: [mg21618] Re: Question:Polar Field Plot
*From*: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
*Date*: Tue, 18 Jan 2000 02:35:09 -0500 (EST)
*Organization*: Universitaet Leipzig
*References*: <85s1ag$aj5@smc.vnet.net>
*Sender*: owner-wri-mathgroup at wolfram.com
Hi,
ZEE MEANT NG wrote:
>
> I am trying to plot a 2D vector field. Equations which i have are in
> polar form ie r and theta.
> r^2= x^2+y^2
> Er=f(r,Theta)
> Ep=g(r,Theta)
>
> I have changed them to cartesian form ie Ex, Ey .
> and put Theta= arctan[y/x]
> My plot covers the region {x,-1,1} and {y-1,1}
>
> Question 1:
> The values of theta produced by mathematica are
> -90<Theta<90 degree but what i required is theta which gives the
> value from 0 to 360 degree.
> I have used the if statement as follows but it does not work.
> If[x >= 0, [Theta] = ArcTan[y/x], [Theta] = ArcTan[y/x] + \[Pi]];
> PlotVectorField[{Ex1, Ey1}, {x, - R, R},
> {y, - R, R }]
ArcTan[x,y] ? Notice that x and y are exchanged to the C-function
atan2(y,x)
>
> Question 2:
> Using the built-in function to plot the vector field, it plots all
> the field for the entire region. How do i set some constraints so
> that it only plots at the desired region (eg. plot where x^2+y^2 < R)
> ?
>
No.
> I am having the same problem in the contour plot as well. I will be
> very grateful if someone can advice me on how to solve the above
> problems.
The book by Tom Wickham-Jones has some functions to constrain a contour
plot
to a region. The Matheamtica code is on MathSource
http://www.mathsource.com/Content/Enhancements/Graphics/3D/0208-976
Hope that helps
Jens
Prev by Date:
**Re: Mathematica???**
Next by Date:
**Re: Series expansion of ArcSin around 1**
Previous by thread:
**Re: InterpolatingFunction in NDSolve**
Next by thread:
**Re: Question:Polar Field Plot**
| |