Geometry Computations#

Ellipse#

colour.geometry

ellipse_coefficients_general_form(coefficients)

Return the general form ellipse coefficients from given canonical form ellipse coefficients.

ellipse_coefficients_canonical_form(coefficients)

Return the canonical form ellipse coefficients from given general form ellipse coefficients.

point_at_angle_on_ellipse(phi, coefficients)

Return the coordinates of the point at angle \(\phi\) in degrees on the ellipse with given canonical form coefficients.

ELLIPSE_FITTING_METHODS

Supported ellipse fitting methods.

ellipse_fitting(a[, method])

Return the coefficients of the implicit second-order polynomial/quadratic curve that fits given point array \(a\) using given method.

Ancillary Objects

colour.geometry

ellipse_fitting_Halir1998(a)

Return the coefficients of the implicit second-order polynomial/quadratic curve that fits given point array \(a\) using Halir and Flusser (1998) method.

Intersection#

colour.geometry

extend_line_segment(a, b[, distance])

Extend the line segment defined by point arrays \(a\) and \(b\) by given distance and return the new end point.

intersect_line_segments(l_1, l_2)

Compute \(l_1\) line segments intersections with \(l_2\) line segments.

Ancillary Objects

colour.geometry

LineSegmentsIntersections_Specification(xy, ...)

Define the specification for intersection of line segments \(l_1\) and \(l_2\) returned by colour.algebra.intersect_line_segments() definition.

Primitives#

colour

PRIMITIVE_METHODS

Supported geometry primitive generation methods.

primitive([method])

Return a geometry primitive using given method.

Ancillary Objects

colour.geometry

MAPPING_PLANE_TO_AXIS

Plane to axis mapping.

primitive_grid([width, height, ...])

Generate vertices and indexes for a filled and outlined grid primitive.

primitive_cube([width, height, depth, ...])

Generate vertices and indexes for a filled and outlined cube primitive.

Primitive Vertices#

colour

PRIMITIVE_VERTICES_METHODS

Supported geometry primitive vertices generation methods.

primitive_vertices([method])

Return the vertices of a geometry primitive using given method.

colour.geometry

primitive_vertices_quad_mpl([width, height, ...])

Return the vertices of a quad primitive for use with Matplotlib mpl_toolkits.mplot3d.art3d.Poly3DCollection class.

primitive_vertices_grid_mpl([width, height, ...])

Return the vertices of a grid primitive made of quad primitives for use with Matplotlib mpl_toolkits.mplot3d.art3d.Poly3DCollection class.

primitive_vertices_cube_mpl([width, height, ...])

Return the vertices of a cube primitive made of grid primitives for use with Matplotlib mpl_toolkits.mplot3d.art3d.Poly3DCollection class.

primitive_vertices_sphere([radius, ...])

Return the vertices of a latitude-longitude sphere primitive.

Hull Section#

colour.geometry

hull_section(hull[, axis, origin, normalise])

Compute the hull section for given axis at given origin.