A cylinder. The generating curve is shown in red. The axis v is shown in blue.
>
restart:
rc:=[cos(t1),sin(t1+sin(t1)),0];
v:=[1,1,3];
r:=rc+t2*v;
r:=rc+expand(t2*v);
arr:=plottools[arrow]([0,0,-1.5],convert(v,vector),.1, .2, .05,color=blue):
c:=plots[spacecurve](rc,t1=0..2*Pi,thickness=3,color=red):
cyl:=plot3d(r,t1=0..2*Pi,t2=-1/3..1/3,grid=[50,11]):
plots[display](arr,c,cyl,scaling=constrained,axes=boxed,lightmodel=light2);
A sphere, parametrized by latitude (l) and longitude (g)
>
restart:
r:=[cos(l)*cos(g),cos(l)*sin(g),sin(l)];
plot3d(r,l=-Pi/2..Pi/2,g=-Pi..Pi,
scaling=constrained,axes=boxed,lightmodel=light2);
If we like, we can add the equator and the prime meridian (each a parametric curve):
>
equator:=subs(l=0,r);
prime_meridian:=subs(g=0,r);
>
p_eq:=plots[spacecurve](equator, g=-Pi..Pi ,thickness=3,color=red):
p_pm:=plots[spacecurve](prime_meridian,l=-Pi/2..Pi/2,thickness=3,color=blue):
p_surf:=plot3d(r,l=-Pi/2..Pi/2,g=-Pi..Pi):
plots[display](p_eq,p_pm,p_surf,scaling=constrained,axes=boxed,lightmodel=light2);
>
A donut (surface), also called a "torus", parametrized by two angles, longitude (g) and something like latitude (l)
>
restart:
R:=5+2*cos(l);
r:=[R*cos(g),R*sin(g),2*sin(l)];
plot3d(r,l=-Pi..Pi,g=-Pi..Pi,
scaling=constrained,axes=boxed,lightmodel=light2);
As before, we can if we like add the "equator" and "prime meridian" :
>
equator:=eval(subs(l=0,r));
prime_meridian:=eval(subs(g=0,r));
>
p_eq:=plots[spacecurve](equator, g=-Pi..Pi ,thickness=3,color=red):
p_pm:=plots[spacecurve](prime_meridian,l=-Pi..Pi,thickness=3,color=blue):
p_surf:=plot3d(r,l=-Pi..Pi,g=-Pi..Pi):
plots[display](p_eq,p_pm,p_surf,scaling=constrained,axes=boxed,lightmodel=light2);
>