Squeak Class Documentation category index | class index  
 
TreeTurtle
  category: StarSqueak-Worlds
  superclass: StarSqueakTurtle
  subclasses:

No comment. Sorry.

instance methods
  commands
  tree1
tree2

  variables
  depth
depth:
length
length:

class methods
  no messages
 

instance methods
  commands top  
 

tree1

Draw a recursive tree whose trunk length is determined by my depth instance variable. Stop when depth is < 1.


 

tree2

Draw a recursive tree whose trunk length determined by my length instance variable. Stop when depth is < 1. This version uses randomness to create a more natural looking, asymmetric tree. It also changes the turtle's hue a little each generation.


  variables top  
 

depth


 

depth:


 

length


 

length:


class methods
  no messages top