Jump to content

[Beginner] L-System / Branches


primzahl

Recommended Posts

Hello,

I'm following the Tutorials from this site and Workshop No.8 is a nice introduction for L-Systems. In exercise No. 3 you should try get the given shape. Well, I think, I set up the rules to get close to the sample, but I couldn't find out one thing. I read the help-files and played around with some variable, but I couldn't find a Solution:

As you can see the branch 'C' scales down and decreases by (in?) generation. But as in the sample, it should only scales down. How can I do that?

primzahl

post-3305-1237200563_thumb.jpg

post-3305-1237200620_thumb.jpg

post-3305-1237200727.jpg

Edited by primzahl
Link to comment
Share on other sites

As you can see the branch 'C' scales down and decreases by (in?) generation. But as in the sample, it should only scales down. How can I do that?

FWIW, i can't duplicate the original Lsystem either, but I'm no Lsystem pro.

anyway, a few "observations" :

if you zoom in really tightly to the source pix, you will notice that "C" in the source does, in fact, decrease over "time" (generations). it just doesn't decrease as fast as as yours. ;)

i see the "dimensions" of the source shape to be approx 5 grid squares tall and 7 grid squares wide. whereas yours starts off fitting entirely inside one of those squares!! technically 0.25 of one square! this might not apply to any of this, but it might help.

here's a doozy! they never mention that "C" needs to grow over time. in other words, why not create it with a few generations ( pre-grow it ) and then open up the comments and copy the "Lysystem string?" OK OK you can do this rather easily by hand copying and pasting the original rule, but if you want you can also go to a textport and use "opinfo." you can even drag and drop the Lsystem node rather than typing in its path.

my guess is, it is a variant of this. probably a couple repeated "iterations" and then the call back to "C" again.

other than that, you might try emailing the author / instructor.

lastly, please keep posting your results.

good luck. peace & 42

Link to comment
Share on other sites

  • 4 weeks later...

Primzahl,

As odforceuser42 said, it is just a matter of size. My "C" also "decrease", not just scaling down. However, I used larger number of generation and smaller "Angle", so it looks like just scaling down.

Attach my file. I also tried your rules (in lsystem5). If you really want "C" to scale down without decrease, may be you can try "nested lsystem"? I tried it in lsystem6 and lsystem7.

Kam

09_ex03.hipnc

Link to comment
Share on other sites

  • 1 month later...

I guess you cannot use X to replace G, as G is a special symbol and it will move forward, but X will not. That's why primzahl's final version lost all the notches. sam.h's method looks closer to the original example.

BTW, the help page of Lsystem SOP mentioned that it supports context-sensitive syntax, but I have never tried:

[left_context<] symbol [>right_context] [:condition]=replacement [:probability]

Link to comment
Share on other sites

  • 3 weeks later...

Sorry for my late answer, at the end of June there is always stress at University.

Thank you both for your Inputs and for the file icelab, it help me a lot. and you're right, "G" can't easily replaced, I was in some way aware of it, but I had to much twistSOPs in my brain. :D

I used both ideas to get the shape.

post-3305-1246616814_thumb.jpg

Edited by primzahl
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...