mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-09-03 11:43:09 +02:00
added bezier
This commit is contained in:
BIN
docs/images/lib-bezier-1.JPG
Normal file
BIN
docs/images/lib-bezier-1.JPG
Normal file
Binary file not shown.
After Width: | Height: | Size: 20 KiB |
28
docs/lib-bezier.md
Normal file
28
docs/lib-bezier.md
Normal file
@@ -0,0 +1,28 @@
|
||||
# bezier
|
||||
|
||||
Given a set of control points, the bezier function returns points of the Bézier path. Combined with the `polyline`, `polyline3d` or `hull_polyline3d` module defined in my lib-openscad, you can create a Bézier curve.
|
||||
|
||||
## Parameters
|
||||
|
||||
- `t_step` : The distance between two points of the Bézier path.
|
||||
- `points` : A set of `[x, y, z]` control points.
|
||||
|
||||
## Examples
|
||||
|
||||
If you have four control points and combine with the `hull_polyline3d` module:
|
||||
|
||||
t_step = 0.05;
|
||||
width = 2;
|
||||
|
||||
p0 = [0, 0, 0];
|
||||
p1 = [40, 60, 35];
|
||||
p2 = [-50, 90, 0];
|
||||
p3 = [0, 200, -35];
|
||||
|
||||
points = bezier(t_step,
|
||||
[p0, p1, p2, p3]
|
||||
);
|
||||
|
||||
hull_polyline3d(points, width);
|
||||
|
||||

|
Reference in New Issue
Block a user