zoomtext

ccw

I

I

I

I

B

B

B

B

F

F

F

F

r

r

r

r

τ

τ

Different kinds of vectors
drawn to different scales

θ

θ = 0.7853981633974483 rad (slider from 0 to 6.283185307179586, step 0.08726646259971647)
AxisPlus = (0, 2, 0)
stepMax = 12
stepper = 12 (slider from 0 to stepMax, step 1)
steps: stepMax - stepper
counter = LaTeX(steps)
A = Corner(1)
B = Corner(3)
txmin = -9.73
txmax = 10.16
tymin = -13.19
tymax = 12.55
xmax = 1
xmin = -1
ymax = 1
ymin = -1
AxisMinus: (-AxisPlus)
C: AxisPlus + (sin(θ), 0, cos(θ))
D: AxisPlus - (sin(θ), 0, cos(θ))
E: AxisMinus + (sin(θ), 0, cos(θ))
F: AxisMinus - (sin(θ), 0, cos(θ))
Bstrength = 3
halfBstrength: Bstrength / 2
Bfield = Sequence(Sequence[Vector[((-halfBstrength), i, j), (halfBstrength, i, j)], i, -3, 3], j, -3, 3)
I_{plusY} = If(dir ≟ "cw", Vector[C, D], Vector[D, C])
I_{minusZ} = If(dir ≟ "cw", Vector[D, F], Vector[F, D])
I_{minusY} = If(dir ≟ "cw", Vector[F, E], Vector[E, F])
I_{plusZ} = If(dir ≟ "cw", Vector[E, C], Vector[C, E])
text1 = LaTeX("\text{The coil is free to rotate around the }\textcolor{#000099}{y}\text{-axis.}")
text2 = LaTeX("\text{Calculate the force on each side of the coil.}")
B_{plusY} = Vector(((-halfBstrength), 2, 0), (halfBstrength, 2, 0))
B_{minusY} = Vector(((-halfBstrength), -2, 0), (halfBstrength, -2, 0))
B_{minusZ} = Vector(((-halfBstrength) + x(D), 0, z(D)), (halfBstrength + x(D), 0, z(D)))
B_{plusZ} = Vector(((-halfBstrength) + x(C), 0, z(C)), (halfBstrength + x(C), 0, z(C)))
α_{plusY} = Angle(I_{plusY}, B_{plusY})
F_{plusY} = Translate(Vector[I_{plusY} ⊗ B_{plusY} / 6], Midpoint[C, D])
α_{minusY} = Angle(I_{minusY}, B_{minusY})
α_{minusZ} = Angle(I_{minusZ}, B_{minusZ})
α_{plusZ} = Angle(I_{plusZ}, B_{plusZ})
F_{minusZ} = Translate(Vector[I_{minusZ} ⊗ B_{minusZ} / 12], Midpoint[F, D])
F_{minusY} = Translate(Vector[I_{minusY} ⊗ B_{minusY} / 6], Midpoint[F, E])
F_{plusZ} = Translate(Vector[I_{plusZ} ⊗ B_{plusZ} / 12], Midpoint[C, E])
text7 = LaTeX("\text{The net force on the coil is zero.}")
text8 = LaTeX("\text{Calculate the torque on each side of the coil.}")
r_{plusY} = Vector((0, 2, 0))
r_{minusY} = Vector((0, -2, 0))
r_{minusZ} = Vector(Midpoint[F, D])
r_{plusZ} = Vector(Midpoint[C, E])
anglePlusYtorque = If(π / 2 ≤ θ ≤ (3 * π / 2), LaTeX["180^{\circ}"], LaTeX["0^{\circ}"])
t_{minusZ}: ((r_{minusZ} ⊗ F_{minusZ}) * 2)
t_{plusZ}: ((r_{plusZ} ⊗ F_{plusZ}) * 2)
Fu_{minusY} = If(Length[F_{minusY}] ≟ 0, Vector[(0, 0, 0)], Vector[F_{minusY} / Length[F_{minusY}]])
Fu_{plusY} = If(Length[F_{plusY}] ≟ 0, Vector[(0, 0, 0)], Vector[F_{plusY} / Length[F_{plusY}]])
tu_{minusZ} = If(Length[t_{minusZ}] ≟ 0, Vector[(0, 0, 0)], Vector[t_{minusZ} / Length[t_{minusZ}]])
tu_{plusZ} = If(Length[t_{plusZ}] ≟ 0, Vector[(0, 0, 0)], Vector[t_{plusZ} / Length[t_{plusZ}]])
text0 = LaTeX("\text{Move the slider to derive the torque on a}\cr\text{single-coil motor.}")
text3 = LaTeX((((((("\textcolor{#CC0000}{\vec{F}}=\textcolor{#996600}{I\vec{L}}\times\textcolor{#00CC00}{\vec{B}}=IhB\sin(\theta\pm 90^{\circ})<" * x(Fu_{plusY})) * " , ") * y(Fu_{plusY})) * " , ") * z(Fu_{plusY})) * ">"))
text4 = LaTeX((((((("\textcolor{#CC0000}{\vec{F}}=\textcolor{#996600}{I\vec{L}}\times\textcolor{#00CC00}{\vec{B}}=IwB\sin(90^{\circ})< " * x(F_{minusZ})) * ",") * y(F_{minusZ})) * ",") * z(F_{minusZ})) * ">"))
text5 = LaTeX((((((("\textcolor{#CC0000}{\vec{F}}=\textcolor{#996600}{I\vec{L}}\times\textcolor{#00CC00}{\vec{B}}=IhB\sin(\theta\pm 90^{\circ})<" * x(Fu_{minusY})) * ",") * y(Fu_{minusY})) * ",") * z(Fu_{minusY})) * ">"))
text6 = LaTeX((((((("\textcolor{#CC0000}{\vec{F}}=\textcolor{#996600}{I\vec{L}}\times\textcolor{#00CC00}{\vec{B}}=IwB\sin(90^{\circ})<" * x(F_{plusZ})) * ",") * y(F_{plusZ})) * ",") * z(F_{plusZ})) * ">"))
unitNormal = Vector((cos(θ), 0, (-sin(θ))))
α = Angle((1, 0, 0), (0, 0, 0), (cos(θ), 0, (-sin(θ))))
β = Angle((1, 0, 0), (0, 0, 0), (cos(θ), 0, (-sin(θ))))
text9 = LaTeX((("\textcolor{#CC66FF}{\vec{\tau}}=\textcolor{#7D7DFF}{\vec{r}}\times\textcolor{#CC0000}{\vec{F}}=\frac{w}{2}IhB\sin(\theta\pm 90^{\circ})\sin(" * anglePlusYtorque) * ")=\vec{0}"))
text10 = LaTeX((((((("\textcolor{#CC66FF}{\vec{\tau}}=\textcolor{#7D7DFF}{\vec{r}}\times\textcolor{#CC0000}{\vec{F}}=\frac{h}{2}IwB\sin(θ)<" * x(tu_{minusZ})) * ",") * y(tu_{minusZ})) * ",") * z(tu_{minusZ})) * ">"))
text12 = LaTeX((("\textcolor{#CC66FF}{\vec{\tau}}=\textcolor{#7D7DFF}{\vec{r}}\times\textcolor{#CC0000}{\vec{F}}=\frac{w}{2}IhB\sin(\theta\pm 90^{\circ})\sin(" * anglePlusYtorque) * ")=\vec{0}"))
text13 = LaTeX((((((("\textcolor{#CC66FF}{\vec{\tau}}=\textcolor{#7D7DFF}{\vec{r}}\times\textcolor{#CC0000}{\vec{F}}=\frac{h}{2}IwB\sin(θ)<" * x(tu_{plusZ})) * ",") * y(tu_{plusZ})) * ",") * z(tu_{plusZ})) * ">"))
text14 = LaTeX((((((("\text{The net torque on the coil is }\textcolor{#CC66FF}{IAB\sin(θ)\left\langle" * x(tu_{minusZ})) * ",") * y(tu_{minusZ})) * ",") * z(tu_{minusZ})) * "\right\rangle}"))
t_{net}: t_{minusZ} + t_{plusZ}