| > | restart: |
| > | with(plots):
with(linalg): |
Warning, the name changecoords has been redefined
Warning, the protected names norm and trace have been redefined and unprotected
| > | assume (u,real); Forteller Maple at u og v er reelle tall (ikke komplekse)
assume (v,real); |
| > | x := (4-v*sin(u/2))*sin(u); Parametriseringen
y := (3-v*sin(u/2))*cos(u); z := v*cos(u/2); |
| > | a := 0; b := 2*Pi; Parameterintervallene for u og v
c := -1; d := 1; |
| > | Flaten := plot3d([x,y,z],u=a..b,v=c..d,grid=[20,4],projection=0.9,scaling=constrained): Plotter flaten |
| > | Ru := [diff(x,u),diff(y,u),diff(z,u)]; Regner ut partiellderiverte av posisjonsvektoren R
Rv := [diff(x,v),diff(y,v),diff(z,v)]; |
| > | N := (a,b) -> crossprod(subs({u=a,v=b}, Rv),subs({u=a,v=b}, Ru)); Regner ut kryssproduktet, dvs. en normalvektor N til flaten |
| > | R := (a,b) -> [subs({u=a,v=b}, x), subs({u=a,v=b}, y), subs({u=a,v=b}, z)]; |
| > | Npil := (a,b) -> arrow( R(a,b), N(a,b), color=red): |
| > | n := 30; |
| > | animasjon := seq( display(Flaten,Npil(2*Pi*i/n,0),scaling=constrained),i=0..n-1): |
| > | display(animasjon, insequence=true); |
![[Plot]](images/moebius_13.gif)
| > | display(animasjon); |
![[Plot]](images/moebius_14.gif)
| > | n := 30; |
| > | FlatenAnimert := seq(plot3d([(4-v*sin(u/2*i/n))*(-(1-i/n)* (u-Pi)/2 + (i/n)*sin(u)), (3-v*sin(u/2*i/n))*(i/n)*cos(u), v*cos(u/2*i/n)], u=a..b, v=c..d, grid=[20,4], projection=0.9, scaling=constrained), i=0..n): |
| > | display(FlatenAnimert,insequence=true); |
![[Plot]](images/moebius_16.gif)
| > |