1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-01-16 21:58:26 +01:00
dotSCAD/docs/lib3x-vx_bezier.md

36 lines
547 B
Markdown
Raw Permalink Normal View History

2020-12-15 17:28:27 +08:00
# vx_bezier
Given 4 control points, returns voxel-by-voxel points of Bézier Curve .
2020-12-20 10:25:48 +08:00
**Since:** 2.5
2020-12-15 17:28:27 +08:00
## Parameters
- `p1` : The 1st control point.
- `p2` : The 2nd control point.
- `p3` : The 3rd control point.
- `p4` : The 4th control point.
## Examples
2022-06-06 13:11:46 +08:00
use <voxel/vx_bezier.scad>
2020-12-15 17:28:27 +08:00
t_step = 0.05;
width = 2;
p1 = [0, 0, 0];
p2 = [30, 15, 25];
p3 = [-35, 20, -20];
p4 = [10, 40, 9];
points = vx_bezier(
p1, p2, p3, p4
);
for(p = points) {
translate(p)
cube(1);
}
2021-02-24 21:09:54 +08:00
![vx_bezier](images/lib3x-vx_bezier-1.JPG)