March 2014 update
This commit is contained in:
parent
09687c4926
commit
a25938f123
1846 changed files with 21876 additions and 5203 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