Common parametrized surfaces in 3D.

AUTHORS:

- Joris Vankerschaver (2012-06-16)
class sage.geometry.riemannian_manifolds.surface3d_generators.SurfaceGenerators[source]

Bases: object

A class consisting of generators for several common parametrized surfaces in 3D.

static Catenoid(c=1, name='Catenoid')[source]

Return a catenoid surface, with parametric representation.

\[\begin{split}\begin{aligned} x(u, v) & = c \cosh(v/c) \cos(u); \\ y(u, v) & = c \cosh(v/c) \sin(u); \\ z(u, v) & = v. \end{aligned}\end{split}\]

INPUT:

  • c – surface parameter

  • name – string; name of the surface

For more information, see Wikipedia article Catenoid.

EXAMPLES:

sage: cat = surfaces.Catenoid(); cat
Parametrized surface ('Catenoid') with equation (cos(u)*cosh(v), cosh(v)*sin(u), v)
sage: cat.plot()                                                            # needs sage.plot
Graphics3d Object
>>> from sage.all import *
>>> cat = surfaces.Catenoid(); cat
Parametrized surface ('Catenoid') with equation (cos(u)*cosh(v), cosh(v)*sin(u), v)
>>> cat.plot()                                                            # needs sage.plot
Graphics3d Object
static Crosscap(r=1, name='Crosscap')[source]

Return a crosscap surface, with parametrization.

\[\begin{split}\begin{aligned} x(u, v) & = r(1 + \cos(v)) \cos(u); \\ y(u, v) & = r(1 + \cos(v)) \sin(u); \\ z(u, v) & = - r\tanh(u - \pi) \sin(v). \end{aligned}\end{split}\]

INPUT:

  • r – surface parameter

  • name – string; name of the surface

For more information, see Wikipedia article Cross-cap.

EXAMPLES:

sage: crosscap = surfaces.Crosscap(); crosscap
Parametrized surface ('Crosscap') with equation ((cos(v) + 1)*cos(u), (cos(v) + 1)*sin(u), -sin(v)*tanh(-pi + u))
sage: crosscap.plot()                                                       # needs sage.plot
Graphics3d Object
>>> from sage.all import *
>>> crosscap = surfaces.Crosscap(); crosscap
Parametrized surface ('Crosscap') with equation ((cos(v) + 1)*cos(u), (cos(v) + 1)*sin(u), -sin(v)*tanh(-pi + u))
>>> crosscap.plot()                                                       # needs sage.plot
Graphics3d Object
static Dini(a=1, b=1, name="Dini's surface")[source]

Return Dini’s surface, with parametrization.

\[\begin{split}\begin{aligned} x(u, v) & = a \cos(u)\sin(v); \\ y(u, v) & = a \sin(u)\sin(v); \\ z(u, v) & = u + \log(\tan(v/2)) + \cos(v). \end{aligned}\end{split}\]

INPUT:

  • a, b – surface parameters

  • name – string; name of the surface

For more information, see Wikipedia article Dini%27s_surface.

EXAMPLES:

sage: dini = surfaces.Dini(a=3, b=4); dini
Parametrized surface ('Dini's surface') with equation (3*cos(u)*sin(v), 3*sin(u)*sin(v), 4*u + 3*cos(v) + 3*log(tan(1/2*v)))
sage: dini.plot()                                                           # needs sage.plot
Graphics3d Object
>>> from sage.all import *
>>> dini = surfaces.Dini(a=Integer(3), b=Integer(4)); dini
Parametrized surface ('Dini's surface') with equation (3*cos(u)*sin(v), 3*sin(u)*sin(v), 4*u + 3*cos(v) + 3*log(tan(1/2*v)))
>>> dini.plot()                                                           # needs sage.plot
Graphics3d Object
static Ellipsoid(center=(0, 0, 0), axes=(1, 1, 1), name='Ellipsoid')[source]

Return an ellipsoid centered at center whose semi-principal axes have lengths given by the components of axes. The parametrization of the ellipsoid is given by

\[\begin{split}\begin{aligned} x(u, v) & = x_0 + a \cos(u) \cos(v); \\ y(u, v) & = y_0 + b \sin(u) \cos(v); \\ z(u, v) & = z_0 + c \sin(v). \end{aligned}\end{split}\]

INPUT:

  • center – 3-tuple; coordinates of the center of the ellipsoid

  • axes – 3-tuple; lengths of the semi-principal axes

  • name – string; name of the ellipsoid

For more information, see Wikipedia article Ellipsoid.

EXAMPLES:

sage: ell = surfaces.Ellipsoid(axes=(1, 2, 3)); ell
Parametrized surface ('Ellipsoid') with equation (cos(u)*cos(v), 2*cos(v)*sin(u), 3*sin(v))
sage: ell.plot()                                                            # needs sage.plot
Graphics3d Object
>>> from sage.all import *
>>> ell = surfaces.Ellipsoid(axes=(Integer(1), Integer(2), Integer(3))); ell
Parametrized surface ('Ellipsoid') with equation (cos(u)*cos(v), 2*cos(v)*sin(u), 3*sin(v))
>>> ell.plot()                                                            # needs sage.plot
Graphics3d Object
static Enneper(name="Enneper's surface")[source]

Return Enneper’s surface, with parametrization.

\[\begin{split}\begin{aligned} x(u, v) & = u(1 - u^2/3 + v^2)/3; \\ y(u, v) & = -v(1 - v^2/3 + u^2)/3; \\ z(u, v) & = (u^2 - v^2)/3. \end{aligned}\end{split}\]

INPUT:

  • name – string; name of the surface

For more information, see Wikipedia article Enneper_surface.

EXAMPLES:

sage: enn = surfaces.Enneper(); enn
Parametrized surface ('Enneper's surface') with equation (-1/9*(u^2 - 3*v^2 - 3)*u, -1/9*(3*u^2 - v^2 + 3)*v, 1/3*u^2 - 1/3*v^2)
sage: enn.plot()                                                            # needs sage.plot
Graphics3d Object
>>> from sage.all import *
>>> enn = surfaces.Enneper(); enn
Parametrized surface ('Enneper's surface') with equation (-1/9*(u^2 - 3*v^2 - 3)*u, -1/9*(3*u^2 - v^2 + 3)*v, 1/3*u^2 - 1/3*v^2)
>>> enn.plot()                                                            # needs sage.plot
Graphics3d Object
static Helicoid(h=1, name='Helicoid')[source]

Return a helicoid surface, with parametrization.

\[\begin{split}\begin{aligned} x(\rho, \theta) & = \rho \cos(\theta); \\ y(\rho, \theta) & = \rho \sin(\theta); \\ z(\rho, \theta) & = h\theta/(2\pi). \end{aligned}\end{split}\]

INPUT:

  • h – distance along the z-axis between two successive turns of the helicoid

  • name – string; name of the surface

For more information, see Wikipedia article Helicoid.

EXAMPLES:

sage: helicoid = surfaces.Helicoid(h=2); helicoid
Parametrized surface ('Helicoid') with equation (rho*cos(theta), rho*sin(theta), theta/pi)
sage: helicoid.plot()                                                       # needs sage.plot
Graphics3d Object
>>> from sage.all import *
>>> helicoid = surfaces.Helicoid(h=Integer(2)); helicoid
Parametrized surface ('Helicoid') with equation (rho*cos(theta), rho*sin(theta), theta/pi)
>>> helicoid.plot()                                                       # needs sage.plot
Graphics3d Object
static Klein(r=1, name='Klein bottle')[source]

Return the Klein bottle, in the figure-8 parametrization given by

\[\begin{split}\begin{aligned} x(u, v) & = (r + \cos(u/2)\cos(v) - \sin(u/2)\sin(2v)) \cos(u); \\ y(u, v) & = (r + \cos(u/2)\cos(v) - \sin(u/2)\sin(2v)) \sin(u); \\ z(u, v) & = \sin(u/2)\cos(v) + \cos(u/2)\sin(2v). \end{aligned}\end{split}\]

INPUT:

  • r – radius of the “figure-8” circle

  • name – string; name of the surface

For more information, see Wikipedia article Klein_bottle.

EXAMPLES:

sage: klein = surfaces.Klein(); klein
Parametrized surface ('Klein bottle') with equation (-(sin(1/2*u)*sin(2*v) - cos(1/2*u)*sin(v) - 1)*cos(u), -(sin(1/2*u)*sin(2*v) - cos(1/2*u)*sin(v) - 1)*sin(u), cos(1/2*u)*sin(2*v) + sin(1/2*u)*sin(v))
sage: klein.plot()                                                          # needs sage.plot
Graphics3d Object
>>> from sage.all import *
>>> klein = surfaces.Klein(); klein
Parametrized surface ('Klein bottle') with equation (-(sin(1/2*u)*sin(2*v) - cos(1/2*u)*sin(v) - 1)*cos(u), -(sin(1/2*u)*sin(2*v) - cos(1/2*u)*sin(v) - 1)*sin(u), cos(1/2*u)*sin(2*v) + sin(1/2*u)*sin(v))
>>> klein.plot()                                                          # needs sage.plot
Graphics3d Object
static MonkeySaddle(name='Monkey saddle')[source]

Return a monkey saddle surface, with equation

\[z = x^3 - 3xy^2.\]

INPUT:

  • name – string; name of the surface

For more information, see Wikipedia article Monkey_saddle.

EXAMPLES:

sage: saddle = surfaces.MonkeySaddle(); saddle
Parametrized surface ('Monkey saddle') with equation (u, v, u^3 - 3*u*v^2)
sage: saddle.plot()                                                         # needs sage.plot
Graphics3d Object
>>> from sage.all import *
>>> saddle = surfaces.MonkeySaddle(); saddle
Parametrized surface ('Monkey saddle') with equation (u, v, u^3 - 3*u*v^2)
>>> saddle.plot()                                                         # needs sage.plot
Graphics3d Object
static Paraboloid(a=1, b=1, c=1, elliptic=True, name=None)[source]

Return a paraboloid with equation.

\[\frac{z}{c} = \pm \frac{x^2}{a^2} + \frac{y^2}{b^2}\]

When the plus sign is selected, the paraboloid is elliptic. Otherwise the surface is a hyperbolic paraboloid.

INPUT:

  • a, b, c – surface parameters

  • elliptic – boolean (default: True); whether to create an elliptic or hyperbolic paraboloid

  • name – string; name of the surface

For more information, see Wikipedia article Paraboloid.

EXAMPLES:

sage: epar = surfaces.Paraboloid(1, 3, 2); epar
Parametrized surface ('Elliptic paraboloid') with equation (u, v, 2*u^2 + 2/9*v^2)
sage: epar.plot()                                                           # needs sage.plot
Graphics3d Object

sage: hpar = surfaces.Paraboloid(2, 3, 1, elliptic=False); hpar
Parametrized surface ('Hyperbolic paraboloid') with equation (u, v, -1/4*u^2 + 1/9*v^2)
sage: hpar.plot()                                                           # needs sage.plot
Graphics3d Object
>>> from sage.all import *
>>> epar = surfaces.Paraboloid(Integer(1), Integer(3), Integer(2)); epar
Parametrized surface ('Elliptic paraboloid') with equation (u, v, 2*u^2 + 2/9*v^2)
>>> epar.plot()                                                           # needs sage.plot
Graphics3d Object

>>> hpar = surfaces.Paraboloid(Integer(2), Integer(3), Integer(1), elliptic=False); hpar
Parametrized surface ('Hyperbolic paraboloid') with equation (u, v, -1/4*u^2 + 1/9*v^2)
>>> hpar.plot()                                                           # needs sage.plot
Graphics3d Object
static Sphere(center=(0, 0, 0), R=1, name='Sphere')[source]

Return a sphere of radius R centered at center.

INPUT:

  • center – 3-tuple; center of the sphere

  • R – radius of the sphere

  • name – string; name of the surface

For more information, see Wikipedia article Sphere.

EXAMPLES:

sage: sphere = surfaces.Sphere(center=(0, 1, -1), R=2); sphere
Parametrized surface ('Sphere') with equation (2*cos(u)*cos(v), 2*cos(v)*sin(u) + 1, 2*sin(v) - 1)
sage: sphere.plot()                                                         # needs sage.plot
Graphics3d Object
>>> from sage.all import *
>>> sphere = surfaces.Sphere(center=(Integer(0), Integer(1), -Integer(1)), R=Integer(2)); sphere
Parametrized surface ('Sphere') with equation (2*cos(u)*cos(v), 2*cos(v)*sin(u) + 1, 2*sin(v) - 1)
>>> sphere.plot()                                                         # needs sage.plot
Graphics3d Object

Note that the radius of the sphere can be negative. The surface thus obtained is equal to the sphere (or part thereof) with positive radius, whose coordinate functions have been multiplied by -1. Compare for instant the first octant of the unit sphere with positive radius:

sage: octant1 = surfaces.Sphere(R=1); octant1
Parametrized surface ('Sphere') with equation (cos(u)*cos(v), cos(v)*sin(u), sin(v))
sage: octant1.plot((0, pi/2), (0, pi/2))                                    # needs sage.plot
Graphics3d Object
>>> from sage.all import *
>>> octant1 = surfaces.Sphere(R=Integer(1)); octant1
Parametrized surface ('Sphere') with equation (cos(u)*cos(v), cos(v)*sin(u), sin(v))
>>> octant1.plot((Integer(0), pi/Integer(2)), (Integer(0), pi/Integer(2)))                                    # needs sage.plot
Graphics3d Object

with the first octant of the unit sphere with negative radius:

sage: octant2 = surfaces.Sphere(R=-1); octant2
Parametrized surface ('Sphere') with equation (-cos(u)*cos(v), -cos(v)*sin(u), -sin(v))
sage: octant2.plot((0, pi/2), (0, pi/2))                                    # needs sage.plot
Graphics3d Object
>>> from sage.all import *
>>> octant2 = surfaces.Sphere(R=-Integer(1)); octant2
Parametrized surface ('Sphere') with equation (-cos(u)*cos(v), -cos(v)*sin(u), -sin(v))
>>> octant2.plot((Integer(0), pi/Integer(2)), (Integer(0), pi/Integer(2)))                                    # needs sage.plot
Graphics3d Object
static Torus(r=2, R=3, name='Torus')[source]

Return a torus obtained by revolving a circle of radius r around a coplanar axis R units away from the center of the circle. The parametrization used is

\[\begin{split}\begin{aligned} x(u, v) & = (R + r \cos(v)) \cos(u); \\ y(u, v) & = (R + r \cos(v)) \sin(u); \\ z(u, v) & = r \sin(v). \end{aligned}\end{split}\]

INPUT:

  • r, R – minor and major radius of the torus

  • name – string; name of the surface

For more information, see Wikipedia article Torus.

EXAMPLES:

sage: torus = surfaces.Torus(); torus
Parametrized surface ('Torus') with equation ((2*cos(v) + 3)*cos(u), (2*cos(v) + 3)*sin(u), 2*sin(v))
sage: torus.plot()                                                          # needs sage.plot
Graphics3d Object
>>> from sage.all import *
>>> torus = surfaces.Torus(); torus
Parametrized surface ('Torus') with equation ((2*cos(v) + 3)*cos(u), (2*cos(v) + 3)*sin(u), 2*sin(v))
>>> torus.plot()                                                          # needs sage.plot
Graphics3d Object
static WhitneyUmbrella(name="Whitney's umbrella")[source]

Return Whitney’s umbrella, with parametric representation

\[x(u, v) = uv, \quad y(u, v) = u, \quad z(u, v) = v^2.\]

INPUT:

  • name – string; name of the surface

For more information, see Wikipedia article Whitney_umbrella.

EXAMPLES:

sage: whitney = surfaces.WhitneyUmbrella(); whitney
Parametrized surface ('Whitney's umbrella') with equation (u*v, u, v^2)
sage: whitney.plot()                                                        # needs sage.plot
Graphics3d Object
>>> from sage.all import *
>>> whitney = surfaces.WhitneyUmbrella(); whitney
Parametrized surface ('Whitney's umbrella') with equation (u*v, u, v^2)
>>> whitney.plot()                                                        # needs sage.plot
Graphics3d Object