Import std.math.curves
Curve3
class
Public Class Curve3
A curve in 3D from a Function of t from 0 to 1, which it goes along by length too, from a table of samples' lengths, its straight lines' between them, so more samples follow its bends closer.
-
The curve
pointgives for t from 0 to 1, measured atsamplesplaces along it. Fewer than one sample panics. -
@PanicsAtCaller Public Static Method CatmullRom(points: Vec3[], closed: Bool = False, samples: Int = 64): Curve3static method #The Catmull-Rom spline through the
points, each of them on it, around to the first whenclosed, measured atsamplesplaces along each segment. Fewer than twopoints, or than one sample, panics. -
@PanicsAtCaller Public Static Method BSpline(points: Vec3[], closed: Bool = False, samples: Int = 64): Curve3static method #The uniform cubic B-spline the
pointsshape, near them rather than through them: an open one starts and ends at its ends, and a closed one goes around. It's measured atsamplesplaces along each segment. Fewer than twopoints, or than one sample, panics. -
@PanicsAtCaller Public Static Method Bezier(points: Vec3[], samples: Int = 64): Curve3static method #The cubic Beziers one after another, each from the last one's end: a start, then two control
pointsand an end for each, so 3n + 1pointsin all, measured atsamplesplaces along each. Any other count ofpoints, or fewer than one sample, panics. -
How long the curve is, as its samples measure it.
-
The point the curve's Function gives for
t, kept from 0 to 1. A NaNtpanics. -
The point so far along the curve, kept from 0 to its Length. A NaN
distancepanics. -
countpoints along the curve the same distance apart, from its start to its end. Fewer than two panics.
Report an issue with this page or with FutureBlitz on GitHub.