1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-01-17 14:18:13 +01:00
dotSCAD/docs/lib3x-vx_curve.md

39 lines
991 B
Markdown
Raw Normal View History

2020-12-16 13:44:04 +08:00
# vx_curve
2021-02-24 21:09:54 +08:00
Draws a voxel-by-voxel curve from control points. The curve is drawn only from the 2nd control point to the second-last control point. It's a voxel version of [curve](https://openhome.cc/eGossip/OpenSCAD/lib3x-curve.html).
2020-12-16 13:44:04 +08:00
2020-12-20 10:25:48 +08:00
**Since:** 2.5
2020-12-16 13:44:04 +08:00
## Parameters
- `points` : A list of `[x, y]` or `[x, y, z]` control points.
2021-02-24 21:09:54 +08:00
- `tightness` : You can view it as the curve tigntness if you provide a value between 0.0 and 1.0. The default value is 0.0. See [curve](https://openhome.cc/eGossip/OpenSCAD/lib3x-curve.html) for details.
2020-12-16 13:44:04 +08:00
## Examples
2022-06-06 13:11:46 +08:00
use <voxel/vx_curve.scad>
use <polyline_join.scad>
2020-12-16 13:44:04 +08:00
pts = [
[28, 2, 1],
[15, 8, -10],
[2, 14, 5],
[28, 14, 2],
[15, 21, 9],
[2, 28, 0]
];
for(pt = vx_curve(pts)) {
2022-04-06 17:44:11 +08:00
translate(pt)
cube(1);
2020-12-16 13:44:04 +08:00
}
#for(pt = pts) {
translate(pt)
sphere(1);
}
2021-12-04 10:57:29 +08:00
#polyline_join(pts)
sphere(.05);
2020-12-16 13:44:04 +08:00
2021-02-24 21:09:54 +08:00
![vx_curve](images/lib3x-vx_curve-1.JPG)