mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-01-17 06:08:31 +01:00
fixed typos
This commit is contained in:
parent
ed0271cc8c
commit
e127d0194f
@ -11,7 +11,7 @@ An OpenSCAD implementation of Turtle Graphics. It moves on the xy plane. You can
|
||||
- `"angle"` : Sets or gets the angle of a turtle. If you provide a turtle data and the angle, such as `turtle2d("angle", turtle, 45)`, it will sets the angle. Giving a turtle data only will return the angle.
|
||||
- `"pt"` : Sets or Gets `[x, y]` of a turtle. If you provide a turtle data and the coordinates, such as `turtle2d("pt", turtle, [10, 20])`, it will sets the coordinates. Giving a turtle data only will return the coordinates.
|
||||
- `"forward"` : Forwards a turtle. The command needs two arguments. The first one is a turtle data, and the second one is the length. For example, `turtle2d("forward", turtle, 100)`.
|
||||
- `"forward"` : Turns a turtle. The command needs two arguments. The first one is a turtle data, and the second one is the angle. For example, `turtle2d("turn", turtle, 180)`.
|
||||
- `"turn"` : Turns a turtle. The command needs two arguments. The first one is a turtle data, and the second one is the angle. For example, `turtle2d("turn", turtle, 180)`.
|
||||
|
||||
## Examples
|
||||
|
||||
|
@ -1,36 +0,0 @@
|
||||
include <line2d.scad>;
|
||||
include <turtle2d.scad>;
|
||||
|
||||
module turtle_spiral(t_before, side_leng, d_step, min_leng, angle, width) {
|
||||
$fn = 24;
|
||||
if(side_leng > min_leng) {
|
||||
t_after = turtle2d("forward", turtle2d("turn", t_before, angle), side_leng);
|
||||
|
||||
line2d(
|
||||
turtle2d("pt", t_before),
|
||||
turtle2d("pt", t_after),
|
||||
width,
|
||||
p1Style = "CAP_ROUND",
|
||||
p2Style = "CAP_ROUND"
|
||||
);
|
||||
|
||||
|
||||
turtle_spiral(t_after, side_leng - d_step, d_step, min_leng, angle, width);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
side_leng = 50;
|
||||
d_step = 1;
|
||||
min_leng = 1;
|
||||
angle = 90;
|
||||
width = 1;
|
||||
|
||||
turtle_spiral(
|
||||
turtle2d("create", 0, 0, 0),
|
||||
side_leng,
|
||||
d_step,
|
||||
min_leng,
|
||||
angle,
|
||||
width
|
||||
);
|
Loading…
x
Reference in New Issue
Block a user