Interface AffineSpace<V>
- All Known Subinterfaces:
EuclideanSpace<V>
public interface AffineSpace<V>
Represents an affine space.
An affine space is a geometric structure that generalizes properties of Euclidean spaces in which parallel lines remain parallel. It consists of points and vectors, where vectors can be added to points to get new points, and two points can be subtracted to get a vector.
Key properties: - Points can be translated by vectors - The difference of two points is a vector - Linear combinations (interpolation) are supported
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Method Summary
Modifier and TypeMethodDescriptiondefault Vbarycenter(V[] points, Real[] weights) Computes a weighted average (barycentric combination) of points.difference(V a, V b) Computes the vector from point a to point b.interpolate(V a, V b, Real t) Computes a linear combination (interpolation) between two points.Translates a point by a vector.
-
Method Details
-
translate
-
difference
-
interpolate
-
barycenter
Computes a weighted average (barycentric combination) of points.Returns: wâ‚Â*pâ‚ + wâ‚‚*pâ‚‚ + ... + wâ‚™*pâ‚™ where Σwáµ¢ = 1
- Parameters:
points- the pointsweights- the weights (must sum to 1)- Returns:
- the barycentric combination
-