| > restart; | |
| > with(plots): | |
| > with(linalg): Warning, new definition for norm Warning, new definition for trace | |
| In this Maple worksheet we create a Mobius strip with a circular boundry to demonstrate the fact that a Mobius strip has but one edge. In order to do this, we start with a very simple surface, the surface of a closed disc, and distort that surface until it is the Mobius strip we set out to create. We then show an animation of a "normal" shaped Mobius strip stretching into this one, to show that it is indeed a Mobius strip. |
| Step 1: Stretching the surface | ||
| The first thing we need to think about is the closed disc formed by stretching the simplest surface over the circle. We need to think about how one might connect the top side to the bottom side. The idea is, to connect the top to the bottom, we need to stretch the surface around the outside of the circle. Think of attaching a tube somehow to the top surface, pulling it out around the outside of the circle, and attaching the other end to the bottom. This is easy to think of, but hard to get equations for.Something a little harder to visualize, but easier to write equations for, is what we seek. | ||
| The first thing we do to help connect the top side to the bottom side is to define a stretching function that will have the property of stretching the surface upward and outward. This needs to be done so that we can then pull this surface around the outside of the circular boundry and connect it to the other side (much like what the tube accomplished). I thought a good curve to use that curves outward and upward was a circle, so I tried to find an equation of a circle passing through the points (-1, 0), (0, 2), (1, 0). The original surface is a distance of 1 from the origin, so that's where the (-1, 0) and (1, 0) coordinates came from. The (0, 2) is from the fact that I want the stretch the surface upward, and if I rotate it around (to connect to the other side), then I want it to reach outside of the circle (i.e. It's height coordinate should be >1). (2,0) seemed like a good choice. I ended up with a circle of radius 1.25, center at (0, 0.75), and k is the angle between the line from the center to (1, 0), and the vertical line from the center to (0, 2). This way, I can give v a nicer range [-1, 1] and let the constant k make sure the curve begins at (-1, 0) and ends at (1, 0). There is another reason why I want the range of v to be [-1, 1], which I will explain shortly. | ||
| > k:=1/2*(Pi+2*arctan(3/4)); | ||
> plot([1.25*sin(k*v),0.75+1.25*cos(k*v),v=-1..1],labels=['xy','z']); ![]() | ||
| For obvious reasons, the surface cannot bend upward everywhere. There must be some area in between that's flat, so we need to have the height equation vary based on the value of u. Also, it is not as easy as simply decreasing the z-coordinate. When the surface is flat, I don't want it to overlap it's boundries. It should go straight from (-1, 0) to (1, 0). Now the reason I wanted the range of v to be [-1, 1] will be apparent. Knowing a point I want the function to start at, and a point I want the function to pass through when it is stretched up the farthest, and then return to the original point, I can get a quadratic function of time to pass through these points. The general form for a this path will look like x = a*y^2 + b. (Notice I don't have a y^1 term because the function is symmetric about the x-axis.). Also, because I want it to continuously go back and forth between y = 0, and y = 2, I write the y-coordinate of the parabola as a function of sin( u ).Here is the specific equation I came up with: | ||
| > h:=(u,v)->[v+sin(u)^2*(1.25*sin(k*v)-v),sin(u)*(0.75+1.25*cos(k*v)) ]; | ||
| > plot3d([u,h(u,v)[1],h(u,v)[2]],u=0..Pi,v=-1..1,scaling=constrained) ; ![]() | ||
| Notice in the next view the definite circular shape of the top of the curve, as well as the parabolic shape of the curves joining it to the base: | ||
| > plot3d([u,h(u,v)[1],h(u,v)[2]],u=0..Pi,v=-1..1,scaling=constrained, orientation=[0,90]); ![]() | ||
| Step 2: Rotations | ||
| If we ever want to "bend the surface around", so to speak, we will need to use rotations. First, we define a rotation about the x-axis. This will rotate the surface over and around the circular boundry. | ||
| > yz_rotated_coords:=(h,u)->vector([h[1],h[2]*sin(u),h[2]*cos(u)]); | ||
| To make the surface meet itself, we have the rotation maximum (Pi / 2) when the function is stretched up the most (maximum h[2]), and no rotation when the function is not stretched. Here's what it will look like with this rotation. | ||
| > plot3d(yz_rotated_coords(h(u,v),u),u=0..Pi,v=-1..1,scaling=constrai ned,orientation=[-45,45]); ![]() | ||
| Now, all that's left is rotating this surface in the x-y plane to create the circular boundry edge. Notice we also need to do this to connect the "inside" to the "outside". (In the graph above, where the surface meets, it connects in such a way that it has a separate inside and outside.) | ||
| > xy_rotated_coords:=(xyz,u)->vector([xyz[1]*cos(u)-xyz[2]*sin(u),xyz [1]*sin(u)+xyz[2]*cos(u),xyz[3]]); | ||
| > plot3d(xy_rotated_coords(yz_rotated_coords(h(u,v),u),u),v=-1..1,u=0 ..Pi,scaling=constrained,orientation=[-45,45]); ![]() | ||
| Step 3: Correction for skewing. | ||
| There is one last problem we need to deal with. Looking at the shape from the right angle, we can see that it is very skewed. This can be easily fixed by introducing a skewing function. | ||
| > unskew:=(xyz)->[xyz[1],xyz[2]-xyz[3],xyz[3]]; | ||
| We now have enough information to write the final equation of the surface. | ||
| > final_coords:=(h,u)->unskew(xy_rotated_coords(yz_rotated_coords(h,u ),u)); | ||
| Here is what the graph looked like before we unskewed it: | ||
| > plot3d(xy_rotated_coords(yz_rotated_coords(h(u,v),u),u),v=-1..1,u=0 ..Pi,scaling=constrained,orientation=[-30,80]); ![]() | ||
| And here is the graph with the skewing corrected: | ||
| > plot3d(final_coords(h(u,v),u),v=-1..1,u=0..Pi,scaling=constrained,o rientation=[-30,80]); ![]() | ||
| Step 4: Adding color | ||
| Here, we define color functions with which to color the plot. | ||
| > redfunc:=x->(1+cos(2*Pi*x))/2; | ||
| > greenfunc:=x->(1+cos(2*Pi*x-2*Pi/3))/2; | ||
| > bluefunc:=x->(1+cos(2*Pi*x-4*Pi/3))/2; | ||
| > plot([redfunc(x),greenfunc(x),bluefunc(x)],x=0..1,color=[red,green, blue]); ![]() | ||
| > plot3d(final_coords(h(u,v),u),v=-1..1,u=0..Pi,scaling=constrained,o rientation=[0,80],color=[redfunc(abs(v)),greenfunc(abs(v)),bluefunc (abs(v))]); ![]() | ||
| Step 5: Animation. | ||
| And finally, we animate it, by creating a function for a "normal" looking Mobius strip with the same general range as the other one, and creating a linear transformation from one to the other. A linear transformation is a nice way to animate one surface becoming another when their independant variables have the same domain. If you want f to morph into g for example, you simply use the equation (1-t)*f + t*g, with t = [0, 1]. | ||
| > normal_coords:=(u,v)->[1/2*(2+v*cos(u))*cos(2*u)-1,v*sin(u),1/2*(2+ v*cos(u))*sin(2*u)]; | ||
| Normal looking Mobius strip. | ||
| > plot3d(normal_coords(u,v),v=-1..1,u=0..Pi,scaling=constrained,orien tation=[0,80],color=[redfunc(abs(v)),greenfunc(abs(v)),bluefunc(abs (v))]); ![]() | ||
| Animation of the "normal" Mobius strip stretching into the "unusual" looking one. | ||
| > animate3d(evalm((1-t)*normal_coords(u,v)+t*final_coords(h(u,v),u)), v=-1..1,u=0..Pi,t=0..1,scaling=constrained,orientation=[0,80],color =[redfunc(abs(v)),greenfunc(abs(v)),bluefunc(abs(v))]); ![]() | ||