Basics types

  • Point. A point is represented as a vector. Example: p = [0.0, 0.0, 1.0]

  • Line

SemiAlgebraicTypes.LineType

Line{T} represented by two points pt0, pt1.

The type T is the promote type of the entry type of pt0, pt1.

Example

Line([0,0,0], [1.,0,0])
source
  • Sphere
SemiAlgebraicTypes.SphereType

Sphere{T} represented by a point center and a radius. The type T is the promote type of the entry type of center and the type of radius.

Example

Sphere([0,0,0], 1.)
source
  • Cylinder
SemiAlgebraicTypes.CylinderType

Cylinder{T} represented by two points pt0, pt1 and a number radius. The type T is the promote type of the entry type of pt0, pt1 and the type of radius.

Example

Cylinder([0,0,0],[0,0,1], 0.5)
source
  • Cone
SemiAlgebraicTypes.ConeType

Cone{T} represented by two points pt0, pt1 and a number radius. The apex of the cone is the first point. The type T is the promote type of the entry type of pt0, pt1 and the type of radius.

Example

Cone([1,0,0], [0,0,0], 0.5)
source
  • Ellipsoid
SemiAlgebraicTypes.EllipsoidType

Ellipsoid{T} represented by

  • c the center
  • sx, sy, sz semi-axes. They should be orthogonal but this not checked at the construction.

The type T is the promote type of the entry types of c, sx, sy, sz.

Example

Ellipsoid([0,0,0], [1,0,0], [0,0.5,0], [0,0,0.1])
source