44. DESCRIPTION
55 Draws a simple Bezier curve.
66. EXAMPLE
7- turtle BezierCurve 0 -100 100 -100 save ./b .svg
7+ turtle BezierCurve 0 -100 100 -100 save ./b1 .svg
88. EXAMPLE
99 turtle BezierCurve 0 -100 100 -100 BezierCurve 100 100 100 100 save ./b2.svg
10- . EXAMPLE
10+ . EXAMPLE
1111 turtle @(
1212 'BezierCurve', 0, -100, 100, -100
1313 'BezierCurve', 100, 100, 100, 100
1818 'BezierCurve', 0, -100, 100, -100
1919 'BezierCurve', 100, 100, 100, 100
2020 'BezierCurve', 0, 100, -100, 100
21- 'BezierCurve', -100, -100, -100, -100
21+ 'BezierCurve', -100, -100, -100, -100
2222 ) save ./b4.svg
2323. LINK
2424 https://en.wikipedia.org/wiki/B%C3%A9zier_curve
@@ -42,16 +42,15 @@ $DeltaY
4242)
4343
4444
45-
4645if ($DeltaX -or $DeltaY ) {
47- $this.Position = $DeltaX , $DeltaY
46+ $this.Position = $DeltaX , $DeltaY
4847 # If the pen is down
4948 if ($this.IsPenDown ) {
5049 # draw the curve
51- $this.Steps.Add (" s $ControlX $ControlY $DeltaX $DeltaY " )
50+ $this.Steps.Add (" s $controlX $controlY $deltaX $deltaY " )
5251 } else {
5352 # otherwise, move to the deltaX/deltaY
54- $this.Steps.Add (" m $DeltaX $DeltaY " )
53+ $this.Steps.Add (" m $deltaX $deltaY " )
5554 }
5655}
5756
0 commit comments