File: tree.turtle

package info (click to toggle)
kturtle 4%3A25.04.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 9,392 kB
  • sloc: cpp: 7,717; ruby: 2,217; xml: 243; makefile: 3; sh: 3
file content (21 lines) | stat: -rw-r--r-- 375 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
kturtle-script-v1.0
@(learn) tree $s@(,) $l {
  @(if) $s > 0 {
		@(penwidth) $l/5
		@(pencolor) 50@(,) 200-$l*2@(,) 50
    @(forward) $l
    @(turnleft) 60
    tree $s-1@(,) 0.7*$l
		@(turnright) 120
    tree $s-1@(,) 0.7*$l
		@(turnleft) 240
    @(forward) $l
		@(turnleft) 180
  }
}

@(reset)
@(spritehide)
@(backward) 100
@(canvascolor) 160@(,) 180@(,) 250
tree 10@(,) 100