FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Topics & Contributions
   Simulation, Artificial Life
(Moderator: REAS)
   Processing Tree Generator
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: Processing Tree Generator  (Read 1624 times)
naztafari

WWW
Processing Tree Generator
« on: Aug 16th, 2003, 8:16pm »

Hi. New here. Picked up processing at Decode (http://decode.ateneo.edu) last May via Martin Gomez.  
 
Made a tree generator using a throwback on Binary (or trinary occasionally) trees in classical Data Structures & Algorithms.
 
I guess this falls under L-systems, basically recursed the iteration of a tree, creating sub-trees with random slight random variations until you arrive at a tree-like drawing.
 
Due to the insane amounts of nodes due to recursion, I opted not to do realtime tree generation. It just generates trees 1 at a time for now.
 
http://www.object404.com/lab/bTreeBomb
 
Click to generate "Tree-bombs". I call 'em tree bombs cause the end results also remind me of Mushroom Cloud explosions. And Broccoli.
 
To do:  
*Implement tree branch/trunk thickness.
*Create separate routine for drawing leaves
 
Pardon the spaghetti code... haven't cleaned it up nor touched it in months... been busy.
« Last Edit: Aug 17th, 2003, 8:35pm by naztafari »  

-Naz
http://www.object404.com
Martin

122417302122417302martingomez_listsmg1ph WWW Email
Re: Processing Tree Generator
« Reply #1 on: Aug 17th, 2003, 9:07am »

hi naz, great to have you here. looking forward to what you have in store for everyone.
 
whisperstorm

trip004 WWW
Re: Processing Tree Generator
« Reply #2 on: Aug 28th, 2003, 9:34pm »

Hey this is nice. I wonder if anyone has experimented with using l-systems and things like this in say a side-scrolling game -- it could eliminate the need for many tiles/images.
 
Glen Murphy

WWW Email
Re: Processing Tree Generator
« Reply #3 on: Aug 29th, 2003, 10:57am »

This is great, I love it.
 
naztafari

WWW
Re: Processing Tree Generator
« Reply #4 on: Sep 5th, 2003, 9:33am »

on Aug 28th, 2003, 9:34pm, whisperstorm wrote:
Hey this is nice. I wonder if anyone has experimented with using l-systems and things like this in say a side-scrolling game -- it could eliminate the need for many tiles/images.

 
Probably for generating starfields. This IS very processor-intensive though, so for sidescrollers it would be better to go tile-based.
 
As for other genre's... Soldier of Fortune 2's terrain generation via the random mission generator's really cool.
 

-Naz
http://www.object404.com
mKoser

WWW Email
Re: Processing Tree Generator
« Reply #5 on: Sep 5th, 2003, 11:50am »

very nice indeed... i wonder if this is a bug or a feature:
 
if you click multiple times (FAST) it will only build ONE huge tree... it will just keep adding to the top of the tree. (Yes, I do enjoy trying to break things!)
 
+ mikkel
 

mikkel crone koser | www.beyondthree.com | http://processing.beyondthree.com
naztafari

WWW
Re: Processing Tree Generator
« Reply #6 on: Nov 10th, 2003, 9:33pm »

Naw, it's not a bug.
 
The screen doesn't refresh, it just keeps drawing over the old image.
 
I tried doing a realtime version where you could see all the nodes branch/grow, but it became too bloody slow once the number of nodes started increasing.
 

-Naz
http://www.object404.com
Pages: 1 

« Previous topic | Next topic »