This page is for AI assistant context only. To use this package, visit community.ntop.com.
Community submission — not verified by nTop. This package was submitted by an outside community member and has not been reviewed or verified by nTop. Treat its accuracy, safety, and compatibility claims with appropriate caution.
Summary
Distribute points and frames non-uniformly along a spline, packing more into high-curvature regions and fewer into flat sections.Package Details
Generates a set of points (and matching reference frames) distributed non-uniformly along a spline, packing more points into high-curvature regions and fewer into flat/straight regions.
Why not just space points evenly?
Evenly-spaced points either waste density on straight sections or under-resolve sharp bends. This block instead builds a curvature-weighted arc-length reparameterization, so point density tracks local geometric complexity.How it works
- Sample curvature densely along the curve (step size =
Increment). - Convert curvature into a weight list (higher curvature → higher weight, with a floor so flat regions still get some density).
- Build a running total of the weights — a discrete integral.
- Normalize that into a monotonic 0→1 curve — effectively a CDF (cumulative distribution function) over arc length, weighted by curvature.
- Pick
Target Pointsevenly-spaced levels in that 0→1 range. - For each level, invert the CDF to find the actual arc-length distance it corresponds to.
- Evaluate the curve at each resulting distance to get the final point/frame outputs.
Installation
Clone this repo or copy the package folder into your nTop workspace:packages/ajayprasad97/points-or-frames-based-on-curvature/.
Usage
- Open the provided
.ntopfile in nTop 5.47+. - Input a spline.
- Set
Target Pointsto the total number of points/frames to generate.
Inputs & outputs
Tuning
Increment: controls sampling resolution of the underlying curvature scan. Smaller = more accurate but slower. Should scale with curve length rather than staying a fixed absolute value.- The internal weight ramp (currently 0.2 → 1.0) controls how aggressively curvature pulls in extra points vs. how much minimum density flat sections retain. Raise the floor for more even coverage; lower it for more aggressive clustering at bends.
Known limitations
- Very short or near-straight curves may need a smaller
Incrementto resolve curvature accurately. - Cumulative sum is computed with an O(n²) custom block, fine at the ~400-500 sample counts used by default; revisit if curvature sampling resolution grows much finer.

