Перейти к основному содержимому
warning

This module's API is unstable. The main idea is good, but there may be corrections in the future.

осторожно

This module's API reference is not yet ready.

Kone: Computational Geometry

This module provides an API of working with Euclidean geometry in RnR^n affine spaces for any ordered ring RR, geometric entities in the geometry, and operations on the entities.

About learning order

Applying the dependencies

build.gradle.kts
dependencies {
implementation("dev.lounres:kone.computationalGeometry:0.0.0-experiment")
}

💭 Concept: "points" and "vectors"

When you are working with Euclidean geometry, the first things you explore are points, lines (also, rays and segments), and angles. But points and angles are more fundamental, because lines, rays, and segments are figures that consist of points. Points define a particular place in the space. But the things that define its structure as of Euclidean space are vectors. They define relations between the points like what translation (of a space) is and the fact that such translations commutate with each other. Without them, we cannot distinguish points in Euclidean space from points on some surface with non-Euclidean geometry. (Hi, hyperbolic and elliptic geometries!)

It's obvious that the moment we introduce some orthonormalised coordinates in the Euclidean space we can represent both points and vectors as a list of coordinates (of size equal to the space dimension). But points and vectors are still different entities.

Points and vectors API

Because of the differences in roles, both of them are represented as two different classes in Kone. The classes are Point and Vector. They are just wrappers over column vectors from Kone's "Linear Algebra" module. Because they are always represented like that in geometry (as well as in differential geometry) so that any square matrices could be applied to them from the left to get new column vectors.

For cases of dimensions 2, 3, and 4, there are also their specialised inheritors: Point2 and Vector2 for dimension 2, Point3 and Vector3 for dimension 3, Point4 and Vector4 for dimension 4.

Euclidean category API

For operations on points and vectors, there is a Euclidean category context represented via EuclideanKategory. And for cases of dimensions 2, 3, and 4, there are analogues EuclideanKategory2, EuclideanKategory3, and EuclideanKategory4 respectively. See API references for full details on provided operations.

Polytopic constructions API

осторожно

Sorry, the section is currently under construction.