Homotopy with surfaces

Parametric surfaces

Instructions:
1. To plot the surface drag the sliders in the domain section.[br]2. Each surface is affected by one or two parameters. Drag the sliders to observe its effects. [br]3. To change the 3D view click on the box 'View" or use right click and drag the mouse.

Inside the Trefoil knot inside Torus

Instructions - Part I
Open GeoGebra in your desktop. Activate 2d and 3d graphics. You will be able to create a Torus with a trefoil knot inside. This is done using vector calculus, which requires lots of computations for the software, so you will need to have a powerful computer. The picture below shows an example of the result.
Instructions - Part II
To have an interesting view in the 3d graphic, open the properties and go to the [b]Projection[/b] tab. Choose [b]Perspective[/b] option and type 100, as shown in the following picture:
Instructions - Part III
In the 2d graphics, create a button with the following GGB Script:[br][br]#First define the components of the trefoil knot Curve (it could be another curve in space R^3)[br][br]fx(x)=(2 + cos(3 / 2 x)) cos(x)-2[br]fy(x)=(2 + cos(3 / 2 x)) sin(x)[br]fz(x)=sin(3 / 2 x)[br][br]SetVisibleInView(fx,1,false)[br]SetVisibleInView(fy,1,false)[br]SetVisibleInView(fz,1,false)[br][br]SetVisibleInView(fx,-1,false)[br]SetVisibleInView(fy,-1,false)[br]SetVisibleInView(fz,-1,false)[br][br]#This defines the curve. To plot it write true below.[br][br]f=Curve(fx(t),fy(t),fz(t), t, 0, 4π)[br][br]SetVisibleInView(f,-1,false)[br][br]#Calculate derivative of each component of the curve[br][br]dfx(x)=Derivative(fx)[br]dfy(x)=Derivative(fy)[br]dfz(x)=Derivative(fz)[br][br]SetVisibleInView(dfx,1,false)[br]SetVisibleInView(dfy,1,false)[br]SetVisibleInView(dfz,1,false)[br][br]SetVisibleInView(dfx,-1,false)[br]SetVisibleInView(dfy,-1,false)[br]SetVisibleInView(dfz,-1,false)[br][br]v1=Curve(0,-dfx(t)/sqrt(dfx(t)*dfx(t)),0,t,0,4pi)[br][br]SetVisibleInView(v1,1,false)[br][br]SetVisibleInView(v1,-1,false)[br][br]v2=Curve(dfx(t)*dfz(t)/sqrt((dfx(t)*dfz(t))^2 + (dfx(t)*dfx(t))^2),0,-dfx(t)*dfx(t)/sqrt((dfx(t)*dfz(t))^2 + (dfx(t)*dfx(t))^2), t, 0, 4π)[br][br]SetVisibleInView(v2,1,false)[br][br]SetVisibleInView(v2,-1,false)[br][br]#Recall that "f=Curve(fx(t),fy(t),fz(t), t, 0, 4π)"[br][br]#Now we define the components of the parametric surface.[br][br]gx(x,y)=fx(x)+(cos(y)*0+sin(y)*(dfx(x)*dfz(x)/sqrt((dfx(x)*dfz(x))^2 + (dfx(x)*dfx(x))^2) ) )/2[br]gy(x,y)=fy(x)+(cos(y)*( -dfx(x)/sqrt(dfx(x)*dfx(x)) )+sin(y)*0)/2[br]gz(x,y)=fz(x)+(cos(y)*0+sin(y)*( -dfx(x)*dfx(x)/sqrt((dfx(x)*dfz(x))^2 + (dfx(x)*dfx(x))^2) ) )/2[br][br]SetVisibleInView(gx,1,false)[br]SetVisibleInView(gy,1,false)[br]SetVisibleInView(gz,1,false)[br][br]SetVisibleInView(gx,-1,false)[br]SetVisibleInView(gy,-1,false)[br]SetVisibleInView(gz,-1,false)[br][br]#Uncomment the next two lines, if you wan to plot[br]#knotS=Surface(gx(t,theta),gy(t,theta), gz(t,theta), t, 0, 4 pi, theta, 0, 2 pi)[br]#SetVisibleInView(knotS,-1,true)[br][br]#We will take a projection to S^3[br]#define by[br]#s3Proj=v/norm(v)^2[br]#for a particular value on the surface, which is defined by the function f.[br][br]value=2/3 pi[br][br]#We need to define the norm separately considering the point "f(value)"[br][br]normgf2(x,y)=(gx -fx(value))^2+(gy-fy(value))^2+(gz-fz(value))^2[br][br]SetVisibleInView(normgf2,-1,false)[br][br]#This is the result[br][br]torusKnot=Surface((gx(t,theta)-fx(value))/normgf2(t,theta),(gy(t,theta)-fy(value))/normgf2(t,theta), (gz(t,theta)-fz(value))/normgf2(t,theta), t, 0, 4 pi, theta, 0, 2 pi)[br][br]SetVisibleInView(torusKnot,-1,false)[br][br]#Finally, we just rotate a little to make it look cooler.[br][br]rotY=Slider(-pi,pi,pi/10,1,100,false,true,false,false)[br][br]SetValue(rotY,-pi/4)[br][br]torusKnotRotY=Rotate(torusKnot,rotY,yAxis)[br][br]SetVisibleInView(torusKnotRotY,-1,false)[br][br]rotX=Slider(-pi,pi,pi/10,1,100,false,true,false,false)[br][br]SetValue(rotX,0.27)[br][br]torusKnotRotX=Rotate(torusKnotRotY,rotX,xAxis)
Final comments
There might be a more efficient method to do all this in GeoGebra. If you find one, let me know: j.ponce@uq.edu.au[br][br]Another version that runs faster (online and in desktop) is here: [url=https://ggbm.at/xBCCQGFW]Inside the Torus with a Trefoil knot[/url]

4-simplex

3D knots

Drags sliders a, b, c, d, e, f or click on button Randomize to change the knot.[br]The slider t defines the period of the knot.

Information