Skip to content

gregoryneal/ArcFrame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ArcFrame

ArcFrame is a C# library for generating, evaluating, and composing arc-length-parameterized curves in 2D, 3D, and higher dimensions. It centers on intrinsic descriptions of curves (curvature as a function of arc length) and integrates moving frames on SO(N) to recover position and orientation with stable, adaptive numerics. The library includes robust clothoid utilities based on the Bertolazzi–Frego formulations for G1 interpolation and extensions toward G2 spline construction.

What it provides

Unified curve model

IArcLengthCurve with Evaluate(s) → (P, R, k) where P is position, R is an orthonormal frame [T, N, …], and k are principal curvatures. This contract ensures the curve can be embedded in any spatial dimension.

Intrinsic curves

IntrinsicCurve builds curves from a CurveSpec that couples initial pose (ND), frame model (Frenet or Bishop), and a curvature law (N-1 components). IntrinsicCurveDemo

Lie-group frame stepping

A midpoint integrator on SO(N) with adaptive step control for stable propagation of pose over arc length. TODO: implement RK4 frame stepping.

Constraint Solver

Uses the Levenberg-Marquardt algorithm to solve a CompositeCurveProblem given a set of constraints. Example_BuildBoundedClothoid 3ArcClothoidSolver3D

Clothoids and curvature laws

Linear curvature laws and generalized Fresnel integral evaluators support accurate clothoid construction and sampling.

Native Spline model

A generalized matrix based Spline object, works as a native IArcLengthCurve by caching an ArcLengthTable on creation. Works with any matrix based spline model.

Position found via right-multiplication: P(t) = GBt' where G is the control point window, B is the basis matrix and t' is the power monomial vector [1, t, t^2, ...]^T

Built in cubic B-Splines include: CatmullRomSpline, BezierSpline, BSpline, HermiteSpline. Native support for any degree: linear, quadratic, cubic, quartic, and beyond. CatmullRomSpline

Composition and transforms

CompositeCurve concatenates segments with automatic G1 alignment. TransformedCurve, RigidTransform, and PromotedCurve embed and position curves across dimensions.

Performance helpers

CachedIntrinsicCurve checkpoints along arc length for fast re-evaluation and uniform sampling.

Use cases

Path planning and motion primitives for robotics and vehicles

Track, road, and rail geometry design

Game and simulation tooling that needs smooth, controllable splines

CAD/CAM workflows that benefit from curvature-aware construction

About

Generate and solve arc length parameterized curves in any dimension.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages