Google Classroom
GeoGebraGeoGebra Classroom

Möbius strip with rainbow unit normal vectors

Script

size = 1.8 F(x, y) = size * (1+y/2 * cos(x/2))*cos(x) G(x, y) = size * (1+y/2 * cos(x/2))*sin(x) H(x, y) = size * y/2*sin(x/2) #a1 dFx = Derivative(F, x) #b1 dFy = Derivative(F, y) #a2 dGx = Derivative(G, x) #b2 dGy = Derivative(G, y) #a3 dHx = Derivative(H, x) #b3 dHy = Derivative(H, y) #(a2b3 - a3b2)i + (a3b1-a1b3)j + (a1b2-a2b1) Px = dGx * dHy - dHx * dGy Py = dHx * dFy - dFx * dHy Pz = dFx * dGy - dGx * dFy norm = sqrt( Px^2 + Py^2 + Pz^2 ) uNx = Px/norm uNy = Py/norm uNz = Pz/norm Mobius = Surface( F(u, v), G(u, v), H(u, v), u, 0, 2pi, v, -1, 1 ) Ax=Slider(0, 4pi, 0.01, 1, 120, false, true, false, false) Ay=Slider(-1, 1, 0.01, 1, 120, false, true, false, false) n= 33 Execute(Sequence("A"+i+" = "+i+" 4*pi/n + Ax", i, 1, n)) Execute(Sequence("B"+i+" = Mobius(A"+i+", 0)", i, 1, n)) Execute(Sequence("SetDynamicColor(B"+i+", "+i+"/n, 1, 1)", i, 1, n)) Execute(Sequence("ShowLabel(B"+i+", false)", i, 1, n)) Execute(Sequence("SetVisibleInView(B"+i+", 1, false)", i, 1, n)) Execute(Sequence("C"+i+" = (uNx(A"+i+", 0), uNy(A"+i+", 0), uNz(A"+i+", 0))", i, 1, n)) Execute(Sequence("ShowLabel(C"+i+", false)", i, 1, n)) Execute(Sequence("SetVisibleInView(C"+i+", 1, false)", i, 1, n)) Execute(Sequence("SetVisibleInView(C"+i+", -1, false)", i, 1, n)) Execute(Sequence("D"+i+" = Translate(Vector((0,0,0), C"+i+"), B"+i+")", i, 1, n)) Execute(Sequence("ShowLabel(D"+i+", false)", i, 1, n)) Execute(Sequence("SetDynamicColor(D"+i+", "+i+"/n, 1, 1)", i, 1, n)) #A=Mobius(Ax, 0) #B=(uNx(Ax, Ay), uNy(Ax, Ay), uNz(Ax, Ay)) #u=Translate(Vector((0,0,0), B), A)