Sometimes you see something that just catches your eye. In this case, a mesmerizing video of a wind turbine on fire. Why is it on fire? Probably due to high winds. When wind speed exceeds a certain point, you must lock the rotation with a brake or rotate the blades so they produce zero torque. In this case, something went wrong, causing a fire.

The spectacular part of this fire is the smoke helix caused by the combination of rotation and linear wind speed. How about a quick python model of this?

I will of course use VPython in one of its many forms—in this case, trinket.io. The great thing VPython is the ability to quickly and easily generate 3D objects. I won't model the entire turbine, just one blade. It will have three parts:

A hub for the center of rotation. I'll use a sphere for this).

The tip of the fan blade. Again, I'll use a sphere.

The blade. I'll use a cylinder.

I want it to rotate, so here is a diagram of how this will work.

From the length of the blade I can determine the x and y-coordinates of the location of the tip (with respect to the hub). Then I can make the blade using a vector from the hub to the tip. There are three properties you could consider for the blade (as a cylinder object):

blade.pos. This is the vector location of one end of the cylinder. In our case this will be set to the position of the hub.

blade.axis. This is a vector from the position to the other end of the cylinder. For our turbine, this will be the vector from the hub to the tip.

blade.radius. This is the radius of the cylinder.

But how does it rotate? That's pretty simple. The orientation and location of the blade depends on the location of the hub and the tip. For the tip, I can find its position based on the angle theta. Then I just redraw the blade. To update the angle, I can use this:

Now for the code. Remember to click the play button to run the code and the pencil to edit it. Yes, you can change the code if it makes you happy.

But that's not the same as the video—not yet. I must make some changes:

Turn the turbine to provide a side view. Instead of rotating in the x-y plane, I will rotate in the y-z plane (z comes out of the screen).

Move the position of the hub in the x-direction. Instead of making wind, I am going to move the hub. Good thing I already took into account the relative position of the tip and the hub, right?

Move the "camera" so it travels along next to the hub. This will give the appearance of a stationary hub with a moving trail. Oh, should I mention the trail? I guess you already saw that in the previous code.

Fortunately, moving the "camera" is much easier than it used to be. The key things to change are scene.camera.pos - that is just the location of the camera. Now for the second program with the wind added.

Pretty cool, right? And now you've perhaps learned a few tricks in VPython. Also, you can see that the helix is just a combination of two motions: constant circular motion and linear motion.