Download the PHP package alto/bezier without Composer
On this page you can find all versions of the php package alto/bezier. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Vendor alto
Package bezier
Short Description Precision PHP toolkit for evaluating, splitting, and measuring quadratic, cubic, quintic and N-order Bezier curves
License MIT
Homepage https://github.com/phpalto/bezier
Package bezier
Short Description Precision PHP toolkit for evaluating, splitting, and measuring quadratic, cubic, quintic and N-order Bezier curves
License MIT
Homepage https://github.com/phpalto/bezier
Please rate this library. Is it a good library?
Informations about the package bezier
Alto Bezier
Alto\Bezier is a precision PHP toolkit for evaluating, splitting, and measuring quadratic, cubic, quintic, and N-order Bézier curves using immutable value objects and a numerically stable De Casteljau core.
Features
- Quadratic, cubic, quartic, quintic, and arbitrary N-order curves that all share the same API
- Point evaluation:
pointAt(t)and constant-speedpointAtDistance(distance)helpers - Curve subdivision with
split(t)for tessellation or editing workflows - Differential geometry helpers: derivatives, tangents, normals
- Arc-length calculation and arc-length parameterization with configurable sampling
- Intersection detection between any two curves
- Bounding boxes and evenly spaced point generators for export to SVG, canvas, or WebGL
- Immutable, readonly classes with no external dependencies
Installation
Usage
Create and inspect a cubic curve
Instantiate quadratic and N-order curves
Exporting control points to SVG
Advanced
- Arc length & constant-speed motion:
length($samples)returns the numerical arc length, whilepointAtDistance($distance, $samples)maps real distances back to coordinates. - Intersections:
$curveA->intersections($curveB, tolerance: 0.25, maxDepth: 18)delivers intersection points along with theirtparameters on each curve. - Numeric tuning: increase sampling (default 100) for long or intricate paths to improve accuracy for arc-length and parameterization routines.
- Bounding boxes and grids:
boundingBox()exposes width/height/corners, andpoints($interval)streams evenly spaced points for tessellation or hit-testing.
Documentation
Read the Alto Bezier documentation for installation, curve types, operations, and recipes.
Testing
License
This project is licensed under the MIT License.
All versions of bezier with dependencies
PHP Build Version
Package Version
Requires
php Version
>=8.3.0
The package alto/bezier contains the following files
Loading the files please wait ...