MCPcopy Index your code

hub / github.com/dorianprill/stroke / functions

Functions296 in github.com/dorianprill/stroke

↓ 70 callersMethodsquared_norm
(&self)
src/point.rs:46
↓ 43 callersMethodeval
Compute a point on the curve at `t` using iterative de boor algorithm. The parameter **must** be in the inclusive range of values returned by `knot_do
src/bspline.rs:146
↓ 36 callersMethodeval
Evaluate a point on the curve at point 't' which should be in the interval \[0, 1\] (unchecked!) This is implemented using De Casteljau's algorithm (o
src/bezier.rs:91
↓ 32 callersMethodlen
Return the number of segments currently stored.
src/path.rs:60
↓ 30 callersMethodpush
Push a segment, returning false if the path is at capacity.
src/path.rs:75
↓ 27 callersMethodknot_domain
Returns the knot domain of the B-Spline. The knot domain is the range of values over which the B-Spline is defined. The knot domain is defined as the
src/bspline.rs:214
↓ 23 callersMethodeval
Evaluate a CubicBezier curve at t by direct evaluation of the polynomial (not numerically stable)
src/cubic_bezier.rs:46
↓ 17 callersMethodeval
Evaluates the quadratic bezier curve at 't' using direct evaluation, which may not be numerically stable
src/quadratic_bezier.rs:32
↓ 12 callersMethodeval
Evaluate a point along the path for `t` in `[0, 1]`. Values outside the range are clamped. Returns None for empty paths.
src/path.rs:101
↓ 11 callersMethodeval
Evaluate a point along the path for `t` in `[0, 1]`. Values outside the range are clamped. Returns None for empty paths.
src/bspline_path.rs:95
↓ 11 callersMethodpush_line
Push a line segment, returning false if the path is at capacity.
src/path.rs:85
↓ 10 callersMethodeval
Evaluate a point along the segment for `t` in `[0, 1]`.
src/line.rs:51
↓ 10 callersMethodpush
Push a segment, returning false if the path is at capacity.
src/bspline_path.rs:84
↓ 9 callersMethodeval_casteljau
Evaluate a CubicBezier curve at t using the numerically stable De Casteljau algorithm
src/cubic_bezier.rs:62
↓ 8 callersMethodderivative
Return the derivative curve. The derivative is also a bezier curve but of degree n-1. In the case of a quadratic derivative it is just a line segment
src/quadratic_bezier.rs:106
↓ 8 callersMethodderivative
Return the derivative curve. The derivative is also a bezier curve but of degree n-1 (cubic->quadratic) Since it returns the derivative function, eval
src/cubic_bezier.rs:185
↓ 8 callersMethodeval_casteljau
Evaluates the quadratic bezier curve at t using the numerically stable De Casteljau algorithm
src/quadratic_bezier.rs:44
↓ 6 callersMethodderivative
Returns the derivative curve of self which has N-1 control points. The derivative of an nth degree Bezier curve is an (n-1)th degree Bezier curve, wit
src/bezier.rs:252
↓ 5 callersMethodarclen
Approximates the arc length of the curve by flattening it with straight line segments. Remember arclen also works by linear approximation, not the int
src/cubic_bezier.rs:105
↓ 5 callersMethodinto_iter
(self)
src/bezier.rs:42
↓ 4 callersMethodbounding_box
Return the bounding box of the line as an array of (min, max) tuples for each dimension (its index)
src/line.rs:192
↓ 4 callersMethodderivative
Returns the derivative curve of self which has C-1 control points and K-2 knots. The derivative of an nth degree B-Spline curve is an (n-1)th degree (
src/bspline.rs:1039
↓ 4 callersMethodsegment_parameter
(&self, t: P::Scalar)
src/bspline_path.rs:268
↓ 4 callersMethodsegment_parameter
(&self, t: P::Scalar)
src/path.rs:242
↓ 3 callersMethodarclen
Approximates the arc length of the curve by flattening it with straight line segments. This works quite well, at ~32 segments it should already provid
src/bezier.rs:345
↓ 3 callersMethodbounding_box
Return the bounding box of the curve as an array of (min, max) tuples for each dimension.
src/bezier.rs:441
↓ 3 callersMethodderivative_roots
Find parameter values where the derivative crosses zero for a given axis.
src/bezier.rs:394
↓ 3 callersMethoddomain_contains
Return true if `t` lies within the inclusive knot domain. # Examples ```rust use stroke::{BSpline, PointN}; let knots: [f64; 4] = [0.0, 0.0, 1.0, 1.
src/bspline.rs:236
↓ 3 callersMethodeval
Evaluate the segment at `t` in `[0, 1]`.
src/bezier_segment.rs:24
↓ 3 callersMethodknot_span
Return the knot span index for `t`. The span index `i` satisfies `knots[i] <= t < knots[i + 1]`, with the conventional special-case that `t == domain
src/bspline.rs:258
↓ 3 callersMethodlen
Return the number of segments currently stored.
src/bspline_path.rs:69
↓ 3 callersMethodt_at_length_approx
Approximate parameter `t` at arc length `s`.
src/line.rs:141
↓ 2 callersMethodarclen
Approximates the arc length of the curve by flattening it with straight line segments. This works quite well, at ~32 segments it should already provid
src/quadratic_bezier.rs:204
↓ 2 callersMethodarclen
Approximates the arc length of the curve by flattening it with straight line segments. This approximation is unfeasable if desired accuracy is greater
src/bspline.rs:906
↓ 2 callersMethodarclen_partial
(&self, t: P::Scalar, nsteps: usize)
src/bspline_path.rs:290
↓ 2 callersMethodarclen_partial
(&self, t: P::Scalar, nsteps: usize)
src/path.rs:264
↓ 2 callersMethodare_points_colinear
Determines if, given some tolerance, all of the control points are colinear This private function is wrapped publically by is_linear()
src/quadratic_bezier.rs:426
↓ 2 callersMethodare_points_colinear
(&self, tolerance: P::Scalar)
src/cubic_bezier.rs:415
↓ 2 callersMethodcurvature
Return the curvature magnitude at `t`.
src/quadratic_bezier.rs:130
↓ 2 callersMethodcurvature
Return the curvature magnitude at `t`. Lines have zero curvature, so this always returns `0`.
src/line.rs:123
↓ 2 callersMethodderivative_curve
( &self, )
src/bspline.rs:1177
↓ 2 callersMethodderivative_roots_with_tolerance
Find parameter values where the derivative crosses zero for a given axis using a tolerance.
src/bezier.rs:407
↓ 2 callersMethoddistance_to_point
Approximate the minimum distance between given `point` and the curve using a default sampling resolution.
src/cubic_bezier.rs:333
↓ 2 callersMethodknot_span_start_for_t
(&self, t: P::Scalar)
src/bspline.rs:773
↓ 2 callersMethodpoint_at_length_approx
Evaluate the point at arc length `s`.
src/line.rs:164
↓ 2 callersMethodreal_roots
this is math, get over it
src/cubic_bezier.rs:444
↓ 2 callersMethodroot_newton_axis
Find a root for a particular axis using Newton-Raphson on the scalar axis function.
src/bezier.rs:485
↓ 2 callersMethodroot_newton_axis
Find a root for a particular axis using Newton-Raphson on the scalar axis function.
src/bspline.rs:1189
↓ 2 callersFunctionroot_newton_raphson
Find a single (any) root of the function f(x) = 0 close to a given a start value, f and its derivative f'. This function cannot predict which root is
src/roots.rs:18
↓ 2 callersFunctionsegment_control_bounds
( segment: &BSpline<P, K, C, D>, )
src/bspline_path.rs:331
↓ 2 callersMethodt_at_length_approx
Approximate parameter `t` at arc length `s`.
src/bezier.rs:162
↓ 2 callersMethodt_at_length_approx
Approximate parameter `t` at arc length `s`.
src/quadratic_bezier.rs:349
↓ 2 callersMethodt_at_length_approx
Approximate parameter `t` at arc length `s`.
src/cubic_bezier.rs:341
↓ 2 callersMethodt_at_length_approx
Approximate parameter `t` at arc length `s`.
src/bspline_path.rs:182
↓ 2 callersMethodt_at_length_approx
Approximate parameter `t` at arc length `s`.
src/bspline.rs:973
↓ 2 callersMethodt_at_length_approx
Approximate parameter `t` at arc length `s`.
src/bezier_segment.rs:163
↓ 2 callersMethodt_at_length_approx
Approximate parameter `t` at arc length `s`.
src/path.rs:157
↓ 2 callersMethodtangent
Return the unit tangent direction at `t`.
src/line.rs:106
↓ 2 callersFunctionvalue_to_row
(value: f64, min: f64, max: f64, height: usize)
examples/bspline_signal_1d.rs:80
↓ 1 callersMethodarclen_partial
(&self, t: P::Scalar, nsteps: usize)
src/bezier.rs:365
↓ 1 callersMethodarclen_partial
(&self, t: P::Scalar, nsteps: usize)
src/quadratic_bezier.rs:224
↓ 1 callersMethodarclen_partial
(&self, t: P::Scalar, nsteps: usize)
src/cubic_bezier.rs:125
↓ 1 callersMethodarclen_partial
(&self, t: P::Scalar, nsteps: usize)
src/bspline.rs:942
↓ 1 callersFunctionarrow_from_vec
(x: f64, y: f64)
examples/tangent_normal_curvature.rs:29
↓ 1 callersMethodaxis_derivative
(&self, t: P::Scalar, axis: usize)
src/bezier.rs:591
↓ 1 callersMethodaxis_value
(&self, t: P::Scalar, axis: usize)
src/bezier.rs:587
↓ 1 callersMethodaxis_value
(&self, t: P::Scalar, axis: usize)
src/bspline.rs:1224
↓ 1 callersMethodbaseline
Returns the line segment formed by the curve's start and endpoint
src/quadratic_bezier.rs:403
↓ 1 callersMethodbaseline
Returns the line segment formed by the curve's start and end points.
src/cubic_bezier.rs:395
↓ 1 callersMethodbasis_functions
Evaluate the non-zero basis functions for a given `span` and `t`. Returns the `D + 1` basis values `N_{i,p}(t)` for the active span, ordered from `i
src/bspline.rs:286
↓ 1 callersMethodbisect_axis_root
( &self, derivative: &BSpline<P, { K - 2 }, { C - 1 }, { D - 1 }>, axis: usize,
src/bspline.rs:588
↓ 1 callersMethodbounding_box
Return the bounding box of the curve as an array of (min, max) tuples for each dimension (its index)
src/quadratic_bezier.rs:487
↓ 1 callersMethodbounding_box
Return the bounding box of the curve as an array of (min, max) tuples for each dimension (its index)
src/cubic_bezier.rs:566
↓ 1 callersMethodbounding_box
Return a conservative bounding box based on all control points. Returns None for empty paths.
src/bspline_path.rs:242
↓ 1 callersMethodbounding_box
Return the bounding box of the curve as an array of (min, max) tuples for each dimension.
src/bspline.rs:489
↓ 1 callersMethodbounding_box
Return the bounding box across all segments. Returns None for empty paths.
src/path.rs:212
↓ 1 callersMethodcontrol_points
Return the control points array.
src/bezier.rs:67
↓ 1 callersMethodcurvature
Return the curvature magnitude at `t`.
src/bezier.rs:276
↓ 1 callersMethodcurvature
Return the curvature magnitude at `t`.
src/cubic_bezier.rs:210
↓ 1 callersMethodcurvature
Return the curvature magnitude at `t`.
src/bspline_path.rs:152
↓ 1 callersMethodcurvature
Return the curvature magnitude at `t`. Requires `D >= 2` so that the second derivative exists.
src/bspline.rs:1105
↓ 1 callersMethodcurvature
Return the curvature magnitude at `t`.
src/bezier_segment.rs:137
↓ 1 callersMethodcurvature
Return the curvature magnitude at `t`.
src/path.rs:137
↓ 1 callersMethodde_boor_iterative
Iteratively compute de Boor's B-spline algorithm, this computes the recursive de Boor algorithm tree from the bottom up. At each level we use the resu
src/bspline.rs:705
↓ 1 callersMethodderivative
Return the derivative vector of the segment.
src/line.rs:101
↓ 1 callersMethodderivative_axis_control_points
(&self, axis: usize)
src/bezier.rs:500
↓ 1 callersMethoddistance_to_point
Approximate the minimum distance between given `point` and the curve using a default sampling resolution.
src/quadratic_bezier.rs:341
↓ 1 callersMethoddistance_to_point_approx
Approximate the minimum distance between given `point` and the curve. Uses a coarse sampling pass over the full domain and a local search around the b
src/bezier.rs:108
↓ 1 callersMethoddistance_to_point_approx
Approximate the minimum distance between given `point` and the curve. Uses a coarse sampling pass over the full domain and a local search around the b
src/quadratic_bezier.rs:295
↓ 1 callersMethoddistance_to_point_approx
Approximate the minimum distance between given `point` and the curve. Uses a coarse sampling pass over the full domain and a local search around the b
src/cubic_bezier.rs:287
↓ 1 callersMethoddistance_to_point_approx
Approximate the minimum distance between given `point` and the curve. Uses a coarse sampling pass over the knot domain and a local search around the b
src/bspline.rs:637
↓ 1 callersMethoddot
(&self, other: &Self)
src/point.rs:31
↓ 1 callersFunctiongaussian_elimination
Solve the dense system in-place with Gauss-Jordan elimination.
examples/bspline_signal_1d.rs:125
↓ 1 callersFunctionhedgehog_line
(x: f64, arrow: char)
examples/tangent_normal_curvature.rs:39
↓ 1 callersFunctioninterpolate_cubic_uniform
Solve for control points P so the cubic B-spline interpolates the samples. For uniform knots, interior samples satisfy: P_{i-1} + 4 P_i + P_{i+1} = 6
examples/bspline_signal_1d.rs:103
↓ 1 callersMethodis_a_point
Determines if, given some tolerance, the control points of the curve can be considered equal. If true, the curve is just a singular point
src/quadratic_bezier.rs:436
↓ 1 callersMethodis_a_point
Returs if the whole set of control points can be considered one singular point given some tolerance. TODO use machine epsilon vs squared norm OK? Chec
src/cubic_bezier.rs:428
↓ 1 callersMethodknot_domain_clamped
Returns the knot domain for a clamped B-Spline where the first and last knot has multiplicity D+1
src/bspline.rs:473
↓ 1 callersMethodknot_domain_clamped_end
(&self)
src/bspline.rs:466
↓ 1 callersMethodknot_domain_clamped_start
(&self)
src/bspline.rs:461
next →1–100 of 296, ranked by callers