GraphingCalculator 4; Window 45 4 743 1176; PaneDivider 377; FontSizes 14; BackgroundType 0; BackgroundColor 255 255 255; StackPanes 1; UseAntialiasing 0; T -1 1; U -1 1; V -1 1; 3D.Axes 0; 3D.Depth 1.1330909743; 3D.View -0.3198340149104613 0.9409665498789046 0.1108519510409181 0.4005883170743735 0.02826999750968362 0.9158219300709054 0.8586240174045219 0.337317001326849 -0.3859819134184331; 3D.Speed 0; Text "Torque on a loop in a magnetic field. Plots a square ""frame"" with unit normal N at spherical angles (theta,phi)=(a,b) and passing through a point X0 a distance d from the origin. Also plots a vector field W in the x-direction. Unit normal:"; Color 2; Expr N=vector(sin(a)*cos(b),sin(a)*sin(b),cos(a)); Text "Frame passes through this point:"; Color 3; Opacity 0.7; Expr X_0=d*N; Text "A point along the normal direction a distance f from the origin:"; MathPaneSlider 1; Expr f=slider([-1,10,40]); Color 7; Expr R=f*N; Color 5; MathPaneSlider 68; Expr s=slider([0,0.1]); Color 6; Expr O=vector(0,0,0),I=vector(1,0,0),J=vector(0,1,0),K=vector(0,0,1); Text "T and P are the spherical theta-hat and phi-hat unit vectors:"; Color 4; Expr T=vector(cos(a)*cos(b),cos(a)*sin(b),-sin(a)); Color 5; Expr P=vector(-sin(b),cos(b),0); Text "U and V are unit vectors normal to N that define the plane of the frame, rotated by an angle g about N if we wish to adjust the orientation of the frame. C and D are the corners of the frame."; Color 3; Expr U=T*cos(g)+P*sin(g); Color 5; Expr V=-(T*sin(g))+P*cos(g); Color 2; Expr C=U+V; Color 3; Expr D=U-V; Text "A square frame X0+uU+vV passing through X0 and oriented at an angle g about N:"; Color 17; Expr vector(x,y,z)=X_0+U*u+V*v; Color 17; Expr vector(x,y,z)=vector(0,v,-u)+X_0; Text "Sides of frame:"; Color 8; Expr U+V*t; Color 8; Expr -U+V*t; Color 8; Expr V+U*t; Color 8; Expr -V+U*t; Text "Magnetic field along the x-direction [GC doesn't display changes in the magnitude W, though]:"; Color 7; MathPaneSlider 25; Expr W=slider([-3,3,40]); Color 3; Grain 0; Expr vector(d*x,d*y,d*z)=W*vector(1,0,0); Text "Magnetic moment u=NiA of loop (up to factor of current):"; Color 17; Grain 0.1166666666666667; Expr X_0,X_0+R,'radius'=s; Color 17; Expr X_0,X_0+I,'radius'=s; Text "A ""flux tube"" illustrating the portion of the vector flow that passes through the frame. In its current form, only works properly when a and b are varied separately and d=0. [Tube is 0x+(y/cosb)^m+(z/sina)^m=1; shift center and orientation to generalize; slows down plotting significantly so retained in a separate file.]"; Opacity 0.7; Expr m=10; Text "(a,b) are (theta,phi) of unit normal to frame N; d is the distance from the origin to the place; g is the angle of rotation of the frame about N."; Color 4; Expr G=slider([0,1,40]); Color 2; Expr d=slider([0,10]); Color 8; Expr a=pi*A,b=2*pi*B,g=2*pi*G; Color 6; MathPaneSlider 20; Expr A=slider([0,1,40]); MathPaneSlider 20; Expr B=slider([0,1,40]); Text "Edges of loop representing direction of current flow."; Grain 1; Expr D,D-(2*U),'radius'=s; Grain 1; Expr -C,-C+2*V,'radius'=s; Grain 1; Expr -D,-D+2*U,'radius'=s; Grain 1; Expr C,C-(2*V),'radius'=s; Text "Force on each side of loop due to current flowing through loop through the magnetic field B (=WI):"; Color 17; Expr -V,-V-[cross(W*U,I)],'radius'=s; Color 17; Expr V,V+W*[cross(U,I)],'radius'=s; Color 17; Expr -U,-U+cross(W*V,I),'radius'=s; Color 17; Expr U,U-[cross(W*V,I)],'radius'=s; Text "Now turn it around. Switch the current off, but move the loop through the field. Show the forces on each wire. Z = velocity of wire, s = speed:"; Color 4; MathPaneSlider 111; Expr s=slider([-10,10]); Expr Z=vector(0,0,1)*s; Color 17; Expr O,Z,'radius'=s; Text "Force on each side of loop due to motion through field B (=WI):"; Color 17; Expr -V,-V+cross(W*Z,I),'radius'=s; Color 17; Expr V,V+W*[cross(Z,I)],'radius'=s; Color 17; Expr -U,-U+cross(W*Z,I),'radius'=s; Color 17; Expr U,U+W*[cross(Z,I)],'radius'=s; Text " Author: David A. Craig <";