• You are not logged in. | Login

Post a reply

#1    February 5, 2010 8:22 am

Ron
Member
Ranks
United States
Gender:
From: Los Angeles
Registered: May 28, 2008
Posts: 39
Reputation :   

Scripted LSystem

Hello,

It's been a while since I posted anything on here.  I've been concentrating on writing/researching a grid based fluid solver for a while.  All the coding and math is done and I just need to do allot of debugging.

So I put that away (because of debugging frustration) to start coding a L-System in RealFlow with python.  The first results only print out to the message window.  There is no drawing to the scene.

The test inputs are:

number of generations = 6
premise = B
rule 1: B = A
rule 2: A = AB

The first test was successful (see the last 7 lines in the image of the message window) .

I hope you like it.  I will update as progress is made.

Thanks,
Ron



Last edited by Ron (February 5, 2010 8:29 am)


 

 

#2    February 5, 2010 12:11 pm

shaun_michael
Moderator
Moderator
United Kingdom
Gender:
Registered: September 10, 2006
Posts: 4778
Reputation :   95 

Re: Scripted LSystem

This is looking very interesting Ron.  I'm not fully up to speed on L-Systems but from what I do know, this is VERY interesting indeed.

What's the next move?

As always, thanks for sharing.

Shaun


 

 

#3    February 5, 2010 6:48 pm

bitSeq
Member
Ranks
United Kingdom
Gender:
From: +447845129516
Registered: July 10, 2008
Posts: 331
Reputation :   

Re: Scripted LSystem

OOO! now this is interesting!

Cant wait to see more


 

 

#4    February 5, 2010 8:47 pm

Ron
Member
Ranks
United States
Gender:
From: Los Angeles
Registered: May 28, 2008
Posts: 39
Reputation :   

Re: Scripted LSystem

shaun_michael wrote:

This is looking very interesting Ron.  I'm not fully up to speed on L-Systems but from what I do know, this is VERY interesting indeed.

What's the next move?

As always, thanks for sharing.

Shaun

Hi Shaun,

The next move is to figure out how to make the code as simple as possible.  Then I will implement the symbol interpretation.  Then hopefully draw something to the scene.  As soon as I can get it to draw something I will post it.

Thanks
Ron


bitSeq, I'm glad you like the idea, thanks.  Hopefully I can get some interesting results.


 

 

#5    February 5, 2010 11:21 pm

shaun_michael
Moderator
Moderator
United Kingdom
Gender:
Registered: September 10, 2006
Posts: 4778
Reputation :   95 

Re: Scripted LSystem

As soon as I can get it to draw something I will post it

Watching with more than a little interest.

Shaun


 

 

#6    February 9, 2010 3:06 am

Ron
Member
Ranks
United States
Gender:
From: Los Angeles
Registered: May 28, 2008
Posts: 39
Reputation :   

Re: Scripted LSystem

Well that was allot easier than I thought to get something.  I attached three generations of the following L-System

alpha = 90 deg
delta = 90 deg

Premise: F-F-F-F
Rule 1: F=F-F+F+FF-F-F+F

I will post more examples and will start to add 3D capability soon.

Later,
Ron

PS:  Is there an easy and free way to capture the screen to post a video?  I'd like to animate these.



Last edited by Ron (February 9, 2010 3:08 am)


 

 

#7    February 9, 2010 5:35 am

Ron
Member
Ranks
United States
Gender:
From: Los Angeles
Registered: May 28, 2008
Posts: 39
Reputation :   

Re: Scripted LSystem

Here are some more.

I think RealFlow has a string size limit, because it crashes if the number of generations is too big. But there are only a couple of thousand particles.

Thanks
Ron




 

 

#8    February 9, 2010 7:10 am

Ron
Member
Ranks
United States
Gender:
From: Los Angeles
Registered: May 28, 2008
Posts: 39
Reputation :   

Re: Scripted LSystem

Here are a couple more before I go to bed.

Later
Ron



Last edited by Ron (February 9, 2010 7:35 am)


 

 

#9    February 9, 2010 7:45 pm

ranxerox
Member
Ranks
Registered: January 9, 2007
Posts: 323
Reputation :   

Re: Scripted LSystem

hey Ron,  this stuff is really cool.  I was wondering if you had a chance to check out houdini.  There is an lsystem node built in which is pretty complete.  There's even a very generous 'apprentice' version for free.

-ranxx


 

 

#10    February 9, 2010 9:22 pm

Ron
Member
Ranks
United States
Gender:
From: Los Angeles
Registered: May 28, 2008
Posts: 39
Reputation :   

Re: Scripted LSystem

ranxerox wrote:

hey Ron,  this stuff is really cool.  I was wondering if you had a chance to check out houdini.  There is an lsystem node built in which is pretty complete.  There's even a very generous 'apprentice' version for free.

-ranxx

Hi ranxx,

I'm glad you like it.  Hopefully I can get a 3D implementation done easily.  I do have Houdini apprentice.  Its L-System is great and FREE which is the best part.  Houdini is the inspiration for what I am doing with this script, I would like it to be very similar to it.

Thanks
Ron

Last edited by Ron (February 9, 2010 9:23 pm)


 

 

#11    February 10, 2010 4:53 pm

bitSeq
Member
Ranks
United Kingdom
Gender:
From: +447845129516
Registered: July 10, 2008
Posts: 331
Reputation :   

Re: Scripted LSystem

Great results Ron!

I have been trying to recreate frost propagating over objects at macro level using image sequences but its very labour intensive, this script could possibly solve a few things. How feasible would it be to perhaps have them follow a 3d surface and also introduce noise to randomise the growth?


 

 

#12    February 10, 2010 9:19 pm

Ron
Member
Ranks
United States
Gender:
From: Los Angeles
Registered: May 28, 2008
Posts: 39
Reputation :   

Re: Scripted LSystem

bitSeq wrote:

Great results Ron!

I have been trying to recreate frost propagating over objects at macro level using image sequences but its very labour intensive, this script could possibly solve a few things. How feasible would it be to perhaps have them follow a 3d surface and also introduce noise to randomise the growth?

Hi bitSeq,

That would be a very cool application.  I'm sure that there is a way to propagate it along a surface.  Once I can get past a couple of bugs and then implement 3D rotation.  I will try to do that.

Thanks again
Ron


 

 

#13    February 10, 2010 9:45 pm

shaun_michael
Moderator
Moderator
United Kingdom
Gender:
Registered: September 10, 2006
Posts: 4778
Reputation :   95 

Re: Scripted LSystem

bitSeq wrote:

I have been trying to recreate frost propagating over objects at macro level

If you can excuse the pun, that's a very cool idea.

Shaun


 

 

#14    February 12, 2010 2:48 am

Ron
Member
Ranks
United States
Gender:
From: Los Angeles
Registered: May 28, 2008
Posts: 39
Reputation :   

Re: Scripted LSystem

Here is another one.  Still working out a persistent issue.  So no 3D yet.

Thanks
Ron



Last edited by Ron (February 12, 2010 2:48 am)


 

 

#15    February 19, 2010 6:23 am

Ron
Member
Ranks
United States
Gender:
From: Los Angeles
Registered: May 28, 2008
Posts: 39
Reputation :   

Re: Scripted LSystem

Finally I fixed the bug.  It was so simple, I was making it a much bigger problem then it really was.

I attached a picture of the following L-System:

Number of generations = 2
Premise = F+F+F+F

Rule 1: F=F+f-FF+F+FF+Ff+FF-f+FF-F-FF-Ff-FFF
Rule 2: f=ffffff

Also I have implemented the following symbols so far:
F
f
+
-

I am going to implement the branching symbols next.  Hope you like it.

Ron



Last edited by Ron (February 19, 2010 6:26 am)


 

 

#16    February 20, 2010 10:51 pm

Ron
Member
Ranks
United States
Gender:
From: Los Angeles
Registered: May 28, 2008
Posts: 39
Reputation :   

Re: Scripted LSystem

Branching works now.  Here are some 2D trees/bushes.  Now I can start to implement 3D.

Thanks
Ron




 

 

#17    February 20, 2010 10:52 pm

Ron
Member
Ranks
United States
Gender:
From: Los Angeles
Registered: May 28, 2008
Posts: 39
Reputation :   

Re: Scripted LSystem

Here are some more 2D trees/bushes.

Ron




 

 

#18    February 21, 2010 12:37 pm

shaun_michael
Moderator
Moderator
United Kingdom
Gender:
Registered: September 10, 2006
Posts: 4778
Reputation :   95 

Re: Scripted LSystem

Ridiculously nice Ron smiley-smile  Excellent work.

Shaun


 

 

#19    February 21, 2010 10:00 pm

bitSeq
Member
Ranks
United Kingdom
Gender:
From: +447845129516
Registered: July 10, 2008
Posts: 331
Reputation :   

Re: Scripted LSystem

Wowee! Cant wait to see the 3d ones Ron!


 

 

#20    February 22, 2010 2:17 am

Ron
Member
Ranks
United States
Gender:
From: Los Angeles
Registered: May 28, 2008
Posts: 39
Reputation :   

Re: Scripted LSystem

shaun_michael wrote:

Ridiculously nice Ron smiley-smile  Excellent work.

Shaun

bitSeq wrote:

Wowee! Cant wait to see the 3d ones Ron!

Thanks for the kind words guys.  I'm glad you like it so far.  I'm having an issues with trying to import the Transformation.py script that comes with the realflow install.  I think my paths are messed up in the environment variables.  So I have a little bit of work to do with that.  I really don't have any idea why its giving me so much trouble. 

Thanks again,
Ron


 

 

#21    February 24, 2010 4:32 pm

shaun_michael
Moderator
Moderator
United Kingdom
Gender:
Registered: September 10, 2006
Posts: 4778
Reputation :   95 

Re: Scripted LSystem

Keep going Ron, this is cool work.

Shaun


 

 
  • Actions
  • Rules
  • Top