README

python123-ops/moon-cv-geometry/core does not have a README file

#
GeometryError

pub(all) suberror GeometryError {
DegenerateInput(String)
NotEnoughPoints(String)
} derive(Eq,
Debug
)

#
Aabb3

pub(all) struct Aabb3 {
min : Point3
max : Point3
} derive(Eq,
Debug
)

#
Aabb3::center

fn Aabb3::center(box : Aabb3) -> Point3

#
Aabb3::contains

fn Aabb3::contains(box : Aabb3, p : Point3) -> Bool

#
Aabb3::expand

fn Aabb3::expand(box : Aabb3, margin : Double) -> Aabb3

#
Aabb3::from_points

fn Aabb3::from_points(points : ArrayView[Point3]) -> Aabb3 raise GeometryError

#
Aabb3::volume

fn Aabb3::volume(box : Aabb3) -> Double

#
Circle2

pub(all) struct Circle2 {
center : Point2
radius : Double
} derive(Eq,
Debug
)

#
Circle2::contains

fn Circle2::contains(circle : Circle2, point : Point2) -> Bool

#
Circle2::new

fn Circle2::new(center~ : Point2, radius~ : Double) -> Circle2 raise GeometryError

#
Circle2::signed_distance

fn Circle2::signed_distance(circle : Circle2, point : Point2) -> Double

#
Line2

pub(all) struct Line2 {
normal : Vec2
offset : Double
} derive(Eq,
Debug
)

#
Line2::from_points

fn Line2::from_points(a : Point2, b : Point2) -> Line2 raise GeometryError

#
Line2::intersect

fn Line2::intersect(a : Line2, b : Line2) -> Point2?

#
Line2::project

fn Line2::project(line : Line2, point : Point2) -> Point2

#
Line2::signed_distance

fn Line2::signed_distance(line : Line2, point : Point2) -> Double

#
Mat3

pub(all) struct Mat3 {
m00 : Double
m01 : Double
m02 : Double
m10 : Double
m11 : Double
m12 : Double
m20 : Double
m21 : Double
m22 : Double
} derive(Eq,
Debug
)

#
Mat3::add

fn Mat3::add(a : Mat3, b : Mat3) -> Mat3

#
Mat3::det

fn Mat3::det(m : Mat3) -> Double

#
Mat3::frobenius_norm

fn Mat3::frobenius_norm(m : Mat3) -> Double

#
Mat3::inverse

fn Mat3::inverse(m : Mat3) -> Mat3 raise GeometryError

#
Mat3::is_orthonormal

fn Mat3::is_orthonormal(m : Mat3, tolerance? : Double) -> Bool

#
Mat3::mul

fn Mat3::mul(a : Mat3, b : Mat3) -> Mat3

#
Mat3::mul_vec3

fn Mat3::mul_vec3(m : Mat3, v : Vec3) -> Vec3

#
Mat3::scale

fn Mat3::scale(m : Mat3, value : Double) -> Mat3

#
Mat3::sub

fn Mat3::sub(a : Mat3, b : Mat3) -> Mat3

#
Mat3::transpose

fn Mat3::transpose(m : Mat3) -> Mat3

#
Mat34

pub(all) struct Mat34 {
m00 : Double
m01 : Double
m02 : Double
m03 : Double
m10 : Double
m11 : Double
m12 : Double
m13 : Double
m20 : Double
m21 : Double
m22 : Double
m23 : Double
} derive(Eq,
Debug
)

#
Mat34::transform_point

fn Mat34::transform_point(m : Mat34, p : Point3) -> Point3

#
Mat4

pub(all) struct Mat4 {
m00 : Double
m01 : Double
m02 : Double
m03 : Double
m10 : Double
m11 : Double
m12 : Double
m13 : Double
m20 : Double
m21 : Double
m22 : Double
m23 : Double
m30 : Double
m31 : Double
m32 : Double
m33 : Double
} derive(Eq,
Debug
)

#
Mat4::mul

fn Mat4::mul(a : Mat4, b : Mat4) -> Mat4

#
Mat4::transform_point

fn Mat4::transform_point(m : Mat4, p : Point3) -> Point3 raise GeometryError

#
Mat4::transpose

fn Mat4::transpose(m : Mat4) -> Mat4

#
Plane3

pub(all) struct Plane3 {
normal : Vec3
offset : Double
} derive(Eq,
Debug
)

#
Plane3::from_points

fn Plane3::from_points(a : Point3, b : Point3, c : Point3) -> Plane3 raise GeometryError

#
Plane3::project

fn Plane3::project(plane : Plane3, point : Point3) -> Point3

#
Plane3::ray_hit

fn Plane3::ray_hit(plane : Plane3, ray : Ray3) -> Double?

#
Plane3::signed_distance

fn Plane3::signed_distance(plane : Plane3, point : Point3) -> Double

#
Point2

pub(all) struct Point2 {
x : Double
y : Double
} derive(Eq,
Debug
)

#
Point2::minus

fn Point2::minus(a : Point2, b : Point2) -> Vec2

#
Point2::new

fn Point2::new(x~ : Double, y~ : Double) -> Point2

#
Point2::to_homogeneous

fn Point2::to_homogeneous(p : Point2) -> Vec3

#
Point2::to_vec

fn Point2::to_vec(p : Point2) -> Vec2

#
Point2::translate

fn Point2::translate(p : Point2, v : Vec2) -> Point2

#
Point3

pub(all) struct Point3 {
x : Double
y : Double
z : Double
} derive(Eq,
Debug
)

#
Point3::minus

fn Point3::minus(a : Point3, b : Point3) -> Vec3

#
Point3::new

fn Point3::new(x~ : Double, y~ : Double, z~ : Double) -> Point3

#
Point3::to_vec

fn Point3::to_vec(p : Point3) -> Vec3

#
Point3::translate

fn Point3::translate(p : Point3, v : Vec3) -> Point3

#
Quadratic

pub(all) struct Quadratic {
a : Double
b : Double
c : Double
} derive(Eq,
Debug
)

#
Quadratic::derivative

fn Quadratic::derivative(q : Quadratic, x : Double) -> Double

#
Quadratic::evaluate

fn Quadratic::evaluate(q : Quadratic, x : Double) -> Double

#
Quadratic::new

fn Quadratic::new(a~ : Double, b~ : Double, c~ : Double) -> Quadratic

#
Quadratic::roots

fn Quadratic::roots(q : Quadratic) -> Array[Double] raise GeometryError

#
Quaternion

pub(all) struct Quaternion {
w : Double
x : Double
y : Double
z : Double
} derive(Eq,
Debug
)

#
Quaternion::conjugate

fn Quaternion::conjugate(q : Quaternion) -> Quaternion

#
Quaternion::identity

fn Quaternion::identity() -> Quaternion

#
Quaternion::mul

#
Quaternion::new

fn Quaternion::new(w~ : Double, x~ : Double, y~ : Double, z~ : Double) -> Quaternion

#
Quaternion::norm

fn Quaternion::norm(q : Quaternion) -> Double

#
Quaternion::normalize

fn Quaternion::normalize(q : Quaternion) -> Quaternion raise GeometryError

#
Quaternion::rotate

fn Quaternion::rotate(q : Quaternion, v : Vec3) -> Vec3

#
Quaternion::to_mat3

fn Quaternion::to_mat3(q : Quaternion) -> Mat3

#
Ray3

pub(all) struct Ray3 {
origin : Point3
direction : Vec3
} derive(Eq,
Debug
)

#
Ray3::closest_midpoint

fn Ray3::closest_midpoint(a : Ray3, b : Ray3) -> Point3 raise GeometryError

#
Ray3::closest_separation

fn Ray3::closest_separation(a : Ray3, b : Ray3) -> Double raise GeometryError

#
Ray3::new

fn Ray3::new(origin~ : Point3, direction~ : Vec3) -> Ray3 raise GeometryError

#
Ray3::point_at

fn Ray3::point_at(ray : Ray3, depth : Double) -> Point3

#
Rect2

pub(all) struct Rect2 {
min : Point2
max : Point2
} derive(Eq,
Debug
)

#
Rect2::area

fn Rect2::area(rect : Rect2) -> Double

#
Rect2::center

fn Rect2::center(rect : Rect2) -> Point2

#
Rect2::contains

fn Rect2::contains(rect : Rect2, p : Point2) -> Bool

#
Rect2::expand

fn Rect2::expand(rect : Rect2, margin : Double) -> Rect2 raise GeometryError

#
Rect2::from_center_size

fn Rect2::from_center_size(center~ : Point2, width~ : Double, height~ : Double) -> Rect2 raise GeometryError

#
Rect2::height

fn Rect2::height(rect : Rect2) -> Double

#
Rect2::intersection

fn Rect2::intersection(a : Rect2, b : Rect2) -> Rect2?

#
Rect2::new

fn Rect2::new(min~ : Point2, max~ : Point2) -> Rect2 raise GeometryError

#
Rect2::union

fn Rect2::union(a : Rect2, b : Rect2) -> Rect2

#
Rect2::width

fn Rect2::width(rect : Rect2) -> Double

#
RigidTransform

pub(all) struct RigidTransform {
rotation : Mat3
translation : Vec3
} derive(Eq,
Debug
)

#
RigidTransform::apply

#
RigidTransform::compose

#
RigidTransform::identity

fn RigidTransform::identity() -> RigidTransform

#
RigidTransform::inverse

#
RigidTransform::new

fn RigidTransform::new(rotation~ : Mat3, translation~ : Vec3) -> RigidTransform

#
Triangle3

pub(all) struct Triangle3 {
a : Point3
b : Point3
c : Point3
} derive(Eq,
Debug
)

#
Triangle3::area

fn Triangle3::area(t : Triangle3) -> Double

#
Triangle3::barycentric

fn Triangle3::barycentric(t : Triangle3, p : Point3) -> (Double, Double, Double) raise GeometryError

#
Triangle3::centroid

fn Triangle3::centroid(t : Triangle3) -> Point3

#
Triangle3::new

fn Triangle3::new(a~ : Point3, b~ : Point3, c~ : Point3) -> Triangle3

#
Triangle3::normal

fn Triangle3::normal(t : Triangle3) -> Vec3 raise GeometryError

#
Vec2

pub(all) struct Vec2 {
x : Double
y : Double
} derive(Eq,
Debug
)

#
Vec2::add

fn Vec2::add(a : Vec2, b : Vec2) -> Vec2

#
Vec2::dot

fn Vec2::dot(a : Vec2, b : Vec2) -> Double

#
Vec2::new

fn Vec2::new(x~ : Double, y~ : Double) -> Vec2

#
Vec2::norm

fn Vec2::norm(v : Vec2) -> Double

#
Vec2::norm2

fn Vec2::norm2(v : Vec2) -> Double

#
Vec2::normalize

fn Vec2::normalize(v : Vec2) -> Vec2 raise GeometryError

#
Vec2::scale

fn Vec2::scale(v : Vec2, s : Double) -> Vec2

#
Vec2::sub

fn Vec2::sub(a : Vec2, b : Vec2) -> Vec2

#
Vec3

pub(all) struct Vec3 {
x : Double
y : Double
z : Double
} derive(Eq,
Debug
)

#
Vec3::add

fn Vec3::add(a : Vec3, b : Vec3) -> Vec3

#
Vec3::cross

fn Vec3::cross(a : Vec3, b : Vec3) -> Vec3

#
Vec3::dot

fn Vec3::dot(a : Vec3, b : Vec3) -> Double

#
Vec3::new

fn Vec3::new(x~ : Double, y~ : Double, z~ : Double) -> Vec3

#
Vec3::norm

fn Vec3::norm(v : Vec3) -> Double

#
Vec3::norm2

fn Vec3::norm2(v : Vec3) -> Double

#
Vec3::normalize

fn Vec3::normalize(v : Vec3) -> Vec3 raise GeometryError

#
Vec3::scale

fn Vec3::scale(v : Vec3, s : Double) -> Vec3

#
Vec3::sub

fn Vec3::sub(a : Vec3, b : Vec3) -> Vec3

#
abs

fn abs(x : Double) -> Double

#
add_arrays

fn add_arrays(a : ArrayView[Double], b : ArrayView[Double]) -> Array[Double] raise GeometryError

#
all_close

fn all_close(a : ArrayView[Double], b : ArrayView[Double], tolerance? : Double) -> Bool

#
almost_equal

fn almost_equal(a : Double, b : Double, eps? : Double) -> Bool

#
angle_between

fn angle_between(a : Vec3, b : Vec3) -> Double raise GeometryError

#
barycentric3_contains

fn barycentric3_contains(weights : (Double, Double, Double), tolerance? : Double) -> Bool

#
barycentric_2d

fn barycentric_2d(a : Point2, b : Point2, c : Point2, p : Point2) -> (Double, Double, Double) raise GeometryError

#
barycentric_contains

fn barycentric_contains(weights : (Double, Double, Double), tolerance? : Double) -> Bool

#
bounding_radius

fn bounding_radius(points : ArrayView[Point3], center : Point3) -> Double

#
centroid3

fn centroid3(points : ArrayView[Point3]) -> Point3 raise GeometryError

#
clamp

fn clamp(x : Double, lo~ : Double, hi~ : Double) -> Double

#
clamp_unit

fn clamp_unit(value : Double) -> Double

#
closest_point_on_segment

fn closest_point_on_segment(a : Point2, b : Point2, point : Point2) -> Point2

#
closest_point_on_triangle

fn closest_point_on_triangle(t : Triangle3, point : Point3) -> Point3 raise GeometryError

#
covariance_2d

fn covariance_2d(points : ArrayView[Point2]) -> Mat3 raise GeometryError

#
covariance_3d

fn covariance_3d(points : ArrayView[Point3]) -> Mat4 raise GeometryError

#
cumulative_lengths

fn cumulative_lengths(points : ArrayView[Point2]) -> Array[Double]

#
damped_update

fn damped_update(current : Double, gradient : Double, damping? : Double) -> Double

#
distance2

fn distance2(a : Point2, b : Point2) -> Double

#
distance3

fn distance3(a : Point3, b : Point3) -> Double

#
dot_array

fn dot_array(a : ArrayView[Double], b : ArrayView[Double]) -> Double raise GeometryError

#
finite_difference

fn finite_difference(f : (Double) -> Double, x : Double, epsilon? : Double) -> Double

#
finite_difference_vec

fn finite_difference_vec(f : (Double) -> Vec3, x : Double, epsilon? : Double) -> Vec3

#
finite_point2

fn finite_point2(p : Point2) -> Bool

#
finite_point3

fn finite_point3(p : Point3) -> Bool

#
hermite_point2

fn hermite_point2(p0 : Point2, p1 : Point2, tangent0 : Vec2, tangent1 : Vec2, amount : Double) -> Point2

#
hermite_point3

fn hermite_point3(p0 : Point3, p1 : Point3, tangent0 : Vec3, tangent1 : Vec3, amount : Double) -> Point3

#
hermite_scalar

fn hermite_scalar(p0~ : Double, p1~ : Double, tangent0~ : Double, tangent1~ : Double, amount~ : Double) -> Double

#
identity3

fn identity3() -> Mat3

#
identity4

fn identity4() -> Mat4

#
interpolate_table

fn interpolate_table(x : Double, xs : ArrayView[Double], ys : ArrayView[Double]) -> Double raise GeometryError

#
interquartile_range

fn interquartile_range(values : ArrayView[Double]) -> Double raise GeometryError

#
lerp_vec3

fn lerp_vec3(a : Vec3, b : Vec3, amount : Double) -> Vec3

#
linear_interpolate

fn linear_interpolate(a : Double, b : Double, amount : Double) -> Double

#
mat34_from_rows

fn mat34_from_rows(r0 : (Double, Double, Double, Double), r1 : (Double, Double, Double, Double), r2 : (Double, Double, Double, Double)) -> Mat34

#
mat3_from_rows

fn mat3_from_rows(r0 : (Double, Double, Double), r1 : (Double, Double, Double), r2 : (Double, Double, Double)) -> Mat3

#
mat4_from_rows

fn mat4_from_rows(r0 : (Double, Double, Double, Double), r1 : (Double, Double, Double, Double), r2 : (Double, Double, Double, Double), r3 : (Double, Double, Double, Double)) -> Mat4

#
max_error

fn max_error(errors : ArrayView[Double]) -> Double raise GeometryError

#
mean

fn mean(values : ArrayView[Double]) -> Double raise GeometryError

#
mean_point2

fn mean_point2(points : ArrayView[Point2]) -> Point2 raise GeometryError

#
median

fn median(values : ArrayView[Double]) -> Double raise GeometryError

#
newton_step

fn newton_step(q : Quadratic, x : Double) -> Double raise GeometryError

#
normal_equation_2d

fn normal_equation_2d(x : ArrayView[Point2], values : ArrayView[Double]) -> Vec2 raise GeometryError

#
normalize_weights

fn normalize_weights(weights : ArrayView[Double]) -> Array[Double] raise GeometryError

#
orthogonal_component

fn orthogonal_component(v : Vec3, axis : Vec3) -> Vec3 raise GeometryError

#
outer_product

fn outer_product(a : Vec3, b : Vec3) -> Mat3

#
percentile

fn percentile(values : ArrayView[Double], fraction~ : Double) -> Double raise GeometryError

#
point2_from_homogeneous

fn point2_from_homogeneous(v : Vec3) -> Point2 raise GeometryError

#
point2_lerp

fn point2_lerp(a : Point2, b : Point2, amount : Double) -> Point2

#
point3_lerp

fn point3_lerp(a : Point3, b : Point3, amount : Double) -> Point3

#
polygon_centroid

fn polygon_centroid(points : ArrayView[Point2]) -> Point2 raise GeometryError

#
polygon_signed_area

fn polygon_signed_area(points : ArrayView[Point2]) -> Double raise GeometryError

#
polyline_length

fn polyline_length(points : ArrayView[Point2]) -> Double

#
polynomial_residuals

fn polynomial_residuals(q : Quadratic, values : ArrayView[Double]) -> Array[Double]

#
project_vector

fn project_vector(v : Vec3, axis : Vec3) -> Vec3 raise GeometryError

#
quaternion_from_axis_angle

fn quaternion_from_axis_angle(axis : Vec3, angle : Double) -> Quaternion raise GeometryError

#
rect2_from_points

fn rect2_from_points(points : ArrayView[Point2]) -> Rect2 raise GeometryError

#
relative_error

fn relative_error(actual : Double, expected : Double) -> Double

#
reprojection_error

fn reprojection_error(a : Point2, b : Point2) -> Double

#
resample_polyline

fn resample_polyline(points : ArrayView[Point2], samples~ : Int) -> Array[Point2] raise GeometryError

#
residual_statistics

fn residual_statistics(errors : ArrayView[Double]) -> (Double, Double, Double) raise GeometryError

#
rms_error

fn rms_error(errors : ArrayView[Double]) -> Double raise GeometryError

#
robust_scale

fn robust_scale(values : ArrayView[Double]) -> Double raise GeometryError

#
robust_z_scores

fn robust_z_scores(values : ArrayView[Double]) -> Array[Double] raise GeometryError

#
safe_divide

fn safe_divide(numerator : Double, denominator : Double) -> Double raise GeometryError

#
safe_rms

fn safe_rms(errors : ArrayView[Double]) -> Double

#
scale_array

fn scale_array(values : ArrayView[Double], scale : Double) -> Array[Double]

#
segment_distance

fn segment_distance(a : Point2, b : Point2, point : Point2) -> Double

#
skew_symmetric

fn skew_symmetric(v : Vec3) -> Mat3

#
smootherstep

fn smootherstep(edge0~ : Double, edge1~ : Double, x~ : Double) -> Double

#
smoothstep

fn smoothstep(edge0~ : Double, edge1~ : Double, x~ : Double) -> Double

#
solve_2x2

fn solve_2x2(a00~ : Double, a01~ : Double, a10~ : Double, a11~ : Double, b0~ : Double, b1~ : Double) -> Vec2 raise GeometryError

#
solve_3x3

fn solve_3x3(a : Mat3, b : Vec3) -> Vec3 raise GeometryError

#
solve_newton

fn solve_newton(q : Quadratic, initial~ : Double, iterations? : Int) -> Double raise GeometryError

#
solve_symmetric_3x3

fn solve_symmetric_3x3(a : Mat3, b : Vec3) -> Vec3 raise GeometryError

#
square

fn square(x : Double) -> Double

#
squared_norm_array

fn squared_norm_array(values : ArrayView[Double]) -> Double

#
triangle_plane_distance

fn triangle_plane_distance(t : Triangle3, point : Point3) -> Double raise GeometryError

#
trimmed_mean

fn trimmed_mean(values : ArrayView[Double], trim_fraction? : Double) -> Double raise GeometryError

#
variance

fn variance(values : ArrayView[Double]) -> Double raise GeometryError

#
weighted_centroid3

fn weighted_centroid3(points : ArrayView[Point3], weights : ArrayView[Double]) -> Point3 raise GeometryError

#
weighted_mean

fn weighted_mean(values : ArrayView[Double], weights : ArrayView[Double]) -> Double raise GeometryError

#
z_score

fn z_score(value : Double, center : Double, spread : Double) -> Double raise GeometryError