|
On 27/12/10 2:23 PM, Jonathan Crider wrote:
> Thank you for the response. The final goal of the task is to calculate
> the B field and then force on the coil using the Biot Savart law. The
> Biot Savart function i am using takes in the coil as x, y, and z
> coordintes of the coil. I also want to be able to plot those coordinates
> to be able to visualize the coil and the fields around it.
I don't have any ideas at the moment for easy visualization of the
fields around a 3D object. quiver3() on top of a surface plot, maybe.
You must have some kind of [x, y, z] representation now in order to draw
the coil using plot3. What difficulty are you currently encountering? Is
your helix currently along an axis and you are having difficulty
wrapping the helix in to a doughnut shape?
When you do the wrapping of the coil, is it acceptable that the helix
will be spaced further apart on the outside of the doughnut than on the
inside? If so:
Calculate the length of the side of the coil (that is to form the inside
of the doughnut.) Divide by 2*Pi to get Ri, the inside radius. Translate
the coil coordinates so that the coil axis is vertical and the mid-point
of what will form the inside is at (-Ri,0). To form the inside of the
doughnut, you would wrap the inside edge as Ri*[-cos(theta), sin(theta)]
with theta from -Pi to +Pi
and similarly for the outside radius, Ro, which would be Ri plus the
width of the helix coil, W. I will leave it to you to generalize this to
map the rectangle [-W-Ri, -Pi*Ri] through [-Ri, +Pi*Ri] to the
appropriate intermediate positions.
|