1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-09-01 02:33:00 +02:00
This commit is contained in:
Justin Lin
2020-03-25 17:45:16 +08:00
parent b12f6ee0d8
commit 33d2da45ad
5 changed files with 53 additions and 6 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

42
docs/lib2x-ptf_x_twist.md Normal file
View File

@@ -0,0 +1,42 @@
# ptf_x_twist
Twist a point along the x-axis. You can use it to create something such as a [twisted maze](https://github.com/JustinSDK/dotSCAD/blob/master/examples/maze/twisted_maze.scad).
![ptf_x_twist](images/lib2x-ptf_x_twist-2.JPG)
**Since:** 2.3.
## Parameters
- `size` : 2 value array `[x, y]`, rectangle with dimensions `x` and `y`.
- `point` : The point to be twisted.
- `angle` : The number of degrees.
## Examples
use <hull_polyline3d.scad>;
use <ptf/ptf_x_twist.scad>;
size = [20, 10];
rows = [
for(y = [0:size[1]])
[for(x = [0:size[0]]) [x, y]]
];
columns = [
for(x = [0:size[0]])
[for(y = [0:size[1]]) [x, y]]
];
for(line = rows) {
twisted = [for(p = line) ptf_x_twist(size, p, 90)];
hull_polyline3d(twisted, thickness = .1);
}
for(line = columns) {
twisted = [for(p = line) ptf_x_twist(size, p, 90)];
hull_polyline3d(twisted, thickness = .1);
}
![ptf_x_twist](images/lib2x-ptf_x_twist-1.JPG)