Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
5
Task/Fractal-tree/Smalltalk/fractal-tree-1.st
Normal file
5
Task/Fractal-tree/Smalltalk/fractal-tree-1.st
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
Object subclass: #FractalTree
|
||||
instanceVariableNames: ''
|
||||
classVariableNames: ''
|
||||
poolDictionaries: ''
|
||||
category: 'RosettaCode'
|
||||
25
Task/Fractal-tree/Smalltalk/fractal-tree-2.st
Normal file
25
Task/Fractal-tree/Smalltalk/fractal-tree-2.st
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
tree: aPoint length: aLength angle: anAngle
|
||||
| p a |
|
||||
|
||||
(aLength > 10) ifTrue: [
|
||||
p := Pen new.
|
||||
p up.
|
||||
p goto: aPoint.
|
||||
p turn: anAngle.
|
||||
p down.
|
||||
5 timesRepeat: [
|
||||
p go: aLength / 5.
|
||||
p turn: 5.
|
||||
].
|
||||
a := anAngle - 30.
|
||||
3 timesRepeat: [
|
||||
self tree: p location length: aLength * 0.7 angle: a.
|
||||
a := a + 30.
|
||||
]
|
||||
].
|
||||
|
||||
draw
|
||||
Display restoreAfter: [
|
||||
Display fillWhite.
|
||||
self tree: 700@700 length: 200 angle: 0.
|
||||
]
|
||||
1
Task/Fractal-tree/Smalltalk/fractal-tree-3.st
Normal file
1
Task/Fractal-tree/Smalltalk/fractal-tree-3.st
Normal file
|
|
@ -0,0 +1 @@
|
|||
FractalTree new draw.
|
||||
Loading…
Add table
Add a link
Reference in a new issue