Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Tree
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Viper




PostPosted: Thu Oct 06, 2005 8:05 am   Post subject: Tree

i have 2 make a tree using recursion we have to start with the trunk n make branches on it(branch=limb with 2 half lenght limbs on it..prog stops when length of limb<=10)but i have no idea where to start could someone point me in right direction plz n thx

p.s recursion tutorial didnt help so dont like me 2 it
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Thu Oct 06, 2005 8:45 am   Post subject: (No subject)

have a function that draws a single branch. Then after drawing it, call the same function twice for each additional limb, specifying that its length is half. Stop calling functions when the length gets to be too small.
Viper




PostPosted: Thu Oct 06, 2005 5:27 pm   Post subject: (No subject)

yeah i know but how do i have it see where to put the branches n how do i make it look and see if it has to make more branches on a limb or to move on to put 2 on a smaller limb
zylum




PostPosted: Thu Oct 06, 2005 5:59 pm   Post subject: (No subject)

did you read the whole tutorial? theres a large section of it devoted to trees and even has 4 different examples...
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: