2020-03-26 13:38:55 +08:00
# ptf_y_twist
Twist a point along the y-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 ).
2021-02-24 21:09:54 +08:00
![ptf_y_twist ](images/lib3x-ptf_y_twist-2.JPG )
2020-03-26 13:38:55 +08:00
2020-03-27 20:06:19 +08:00
**Since:** 2.3
2020-03-26 13:38:55 +08:00
## 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
2022-06-06 13:11:46 +08:00
use < polyline_join.scad >
use < ptf / ptf_y_twist . scad >
2020-03-26 13:38:55 +08:00
size = [10, 20];
rows = [
2021-12-04 12:16:20 +08:00
for(y = [0:size.y])
[for(x = [0:size.x]) [x, y]]
2020-03-26 13:38:55 +08:00
];
columns = [
2021-12-04 12:16:20 +08:00
for(x = [0:size.x])
[for(y = [0:size.y]) [x, y]]
2020-03-26 13:38:55 +08:00
];
for(line = rows) {
twisted = [for(p = line) ptf_y_twist(size, p, 90)];
2021-12-04 10:57:29 +08:00
polyline_join(twisted)
sphere(.05);
2020-03-26 13:38:55 +08:00
}
for(line = columns) {
twisted = [for(p = line) ptf_y_twist(size, p, 90)];
2021-12-04 10:57:29 +08:00
polyline_join(twisted)
sphere(.05);
2020-03-26 13:38:55 +08:00
}
2021-02-24 21:09:54 +08:00
![ptf_y_twist ](images/lib3x-ptf_y_twist-1.JPG )