Skip to content

soypat/geometry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

geometry

go.dev reference Go Report Card codecov Go sourcegraph

Stackful, correct, lean and performant library ideal for any use case. From embedded systems to GPU usage.

Features

  • Vector and matrices that map to GPU alignment
  • Quaternions
  • 2D/3D Grid generation and traversal
  • Heapless 3D Octree implementation
    • Is stupid fast.
  • Performant 3x3 SVD and QR decomposition
  • 2D/3D Triangles
    • Closest point to a triangle algorithm
  • Tetrahedrons!
  • Bounding boxes
  • Polygon generation with arc and chamfering
  • 2D splines with support for Quadratic and cubic modes
    • Provided splines are: Cubic/quadratic Bezier, Hermite spline, Basis spline, Cardinal spline, Catmull-Rom spline
  • 2D/3D Basic geometries like Line, Plane and their algorithms
  • Few 1D math conveniences

Module structure

  • ms3..ms1 contain 32-bit (float32) spatial geometrical primitives.
  • md3..md1 contain 64-bit (float64) spatial geometrical primitive. This code is identically duplicated from ms* packages using code generation, including tests.

Development

Code developed is exclusively float32. float64 code is generated automatically from the float32 code by running gen.go.

The internal package serves as a place to store data that is dependent on whether the implementation is 64 or 32 bit.

About

1D/2D/3D Geometrical primitives and specialized 3D linear algebra.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages