Skip to content

3.10.0

Compare
Choose a tag to compare
@ianmackenzie ianmackenzie released this 07 Jun 02:17

This (long-delayed!) release adds several small new functions:

  • Polygon2d.regular for constructing regular polygons (triangles, squares, pentagons, hexagons etc.) (thanks @gampleman in #148)
  • Axis2d.intersectionPoint for finding the intersection point between two 2D axes
  • Axis3d.intersectionWithTriangle, and Axis3d.intersectionWithRectangle (thanks @w0rm in #146)
  • BoundingBox2d.interpolate and BoundingBox3d.interpolate for interpolating within bounding boxes
  • LineSegment2d.axis and LineSegment3d.axis for getting the axis that a given line segment lies on
  • Several functions for multiplying and dividing Vector2d and Vector3d by Float or Quantity Float Unitless values (functionally the same thing, but different in the eyes of the type system): multiplyBy, divideBy, timesUnitless and overUnitless for both Vector2d and Vector3d
  • RationalQuadraticSpline3d.approximate and RationalCubicSpline3d.approximate for generating polyline approximations to rational splines in 3D (useful for 3D rendering)

Adding the rational spline approximate functions (the last bullet point above) also required adding a bunch of lower-level functionality that is less likely to be useful outside of elm-geometry internals:

  • New VectorBoundingBox2d and VectorBoundingBox3d types/modules, equivalent to BoundingBox2d and BoundingBox3d but for bounds on vectors instead of points
  • Several functions for computing derivatives and bounding boxes on derivatives of different spline types (also added to elliptical arcs, for completeness)