Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Helical Coil Help

Subject: Helical Coil Help

From: Jonathan Crider

Date: 27 Dec, 2010 19:40:05

Message: 1 of 8

I am trying to draw a helical coil. I have been able to create a 3d helix and a doughnut using the plot3 command, but i cannot seem to put the two together to create the helical coil (if you took a slinky and put the ends together).

Any help on this would be greatly appreciated.

Thanks

Subject: Helical Coil Help

From: Walter Roberson

Date: 27 Dec, 2010 20:01:22

Message: 2 of 8

On 27/12/10 1:40 PM, Jonathan Crider wrote:
> I am trying to draw a helical coil. I have been able to create a 3d
> helix and a doughnut using the plot3 command, but i cannot seem to put
> the two together to create the helical coil (if you took a slinky and
> put the ends together).

Do you just have to _draw_ it, or do you have to construct a model of it?

If you just have to _draw_ it, consider the possibility of using a
texture map (an image of a helix overlayed on top of the model of the
doughnut.)

If you have to construct a model of it, then you might find that using a
"mesh" or patch() object is more appropriate than using plot3d.

Subject: Helical Coil Help

From: Jonathan Crider

Date: 27 Dec, 2010 20:23:04

Message: 3 of 8

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.

Jonathan

Subject: Helical Coil Help

From: Walter Roberson

Date: 27 Dec, 2010 21:23:21

Message: 4 of 8

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.

Subject: Helical Coil Help

From: Mark Shore

Date: 27 Dec, 2010 22:14:18

Message: 5 of 8

"Jonathan Crider" <criderj@purdue.edu> wrote in message <ifaq2l$a7l$1@fred.mathworks.com>...
> I am trying to draw a helical coil. I have been able to create a 3d helix and a doughnut using the plot3 command, but i cannot seem to put the two together to create the helical coil (if you took a slinky and put the ends together).
>
> Any help on this would be greatly appreciated.
>
> Thanks

I think you'd get further in your own search, and possibly focus the analytical mathematical skills of some of the regular contributors here (Walter Roberson or Roger Stafford come to mind) if you used the correct terminology.

You are looking for a toroidal helix or toroidal spiral. Its parametric form is
x(t) = (a + b*sin(ct)) cos(t)
y(t) = (a + b*sin(ct)) sin(t)
z(t) = b*cos(ct)
where a and b are the major and minor radii of the torus, and c the number of turns of the helix.

As you are probably aware, this newsgroup is not for homework purposes so contributors usually don't give explicit solutions. However since this is only a minor part of your problem and since there are a couple of minor pitfalls, here is my implementation. Enjoy the physics.

t=linspace(0,2*pi,1000);
a=6; b=1; c=20;
x=(a+b*sin(c.*t)).*cos(t);
y=(a+b*sin(c.*t)).*sin(t);
z=b.*cos(c.*t);
plot3(x,y,z)

Subject: Helical Coil Help

From: Jonathan Crider

Date: 27 Dec, 2010 22:25:20

Message: 6 of 8

Thank you very much Mark and Walter. I really appreciate the help in this.

Jonathan

Subject: Helical Coil Help

From: Mark Shore

Date: 28 Dec, 2010 18:13:04

Message: 7 of 8

"Jonathan Crider" <criderj@purdue.edu> wrote in message <ifasj8$mdd$1@fred.mathworks.com>...
> 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.
>
> Jonathan

One of the interesting things you might find is that the common assumption that the external magnetic field of a current-carrying toroidal coil is negligible is not that accurate for a wide range of realistic geometries.

With 100 turns of a 2 cm large radius, 0.5 cm small radius toroidal coil, the vertical component at the center of the torus is ~3% that of the field within the toroidal helix.

I'd assume that with a ferromagnetic torus (instead of air), a smaller b/a ratio and more closely spaced windings this factor will decrease.

Subject: Helical Coil Help

From: Ron Irvin Marcelino

Date: 7 Aug, 2011 07:04:10

Message: 8 of 8

"Mark Shore" wrote in message <ifb33q$i1b$1@fred.mathworks.com>...
> "Jonathan Crider" <criderj@purdue.edu> wrote in message <ifaq2l$a7l$1@fred.mathworks.com>...
> > I am trying to draw a helical coil. I have been able to create a 3d helix and a doughnut using the plot3 command, but i cannot seem to put the two together to create the helical coil (if you took a slinky and put the ends together).
> >
> > Any help on this would be greatly appreciated.
> >
> > Thanks
>
> I think you'd get further in your own search, and possibly focus the analytical mathematical skills of some of the regular contributors here (Walter Roberson or Roger Stafford come to mind) if you used the correct terminology.
>
> You are looking for a toroidal helix or toroidal spiral. Its parametric form is
> x(t) = (a + b*sin(ct)) cos(t)
> y(t) = (a + b*sin(ct)) sin(t)
> z(t) = b*cos(ct)
> where a and b are the major and minor radii of the torus, and c the number of turns of the helix.
>
> As you are probably aware, this newsgroup is not for homework purposes so contributors usually don't give explicit solutions. However since this is only a minor part of your problem and since there are a couple of minor pitfalls, here is my implementation. Enjoy the physics.
>
> t=linspace(0,2*pi,1000);
> a=6; b=1; c=20;
> x=(a+b*sin(c.*t)).*cos(t);
> y=(a+b*sin(c.*t)).*sin(t);
> z=b.*cos(c.*t);
> plot3(x,y,z)


i'm an engineering student.. can i have a copy of the syntax how to draw a spring..?

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us