sneaky Posted April 13, 2020 Share Posted April 13, 2020 Hey guys, I am currently experimenting in 2D with L-system. I am wondering if there is a way to prevent branches to intersect / cross ? Like I would rather has my branch to stop than crossing another one / itself like in the picture Quote Link to comment Share on other sites More sharing options...
toadstorm Posted April 13, 2020 Share Posted April 13, 2020 L-systems aren't self-aware like that... they handle all their substitution iterations internally, so you have no way of crafting rules based on the previous iteration's geometry. You're better off either using a particle system / solver SOP instead, or handle overlaps after the L-system is done via detangle or some other solver that could clip or displace overlapping polylines. 1 Quote Link to comment Share on other sites More sharing options...
sneaky Posted April 14, 2020 Author Share Posted April 14, 2020 Hum ok I see that is what I was thinking just wanted to be sure thank you! And is there a way to check the current orientation of the turtle ? Like say X:($(x,y,z)=(x,y,z))=F or even simpler X:($(x)=x)=F I know this is not good at all just wanna illustrate my words Quote Link to comment Share on other sites More sharing options...
toadstorm Posted April 14, 2020 Share Posted April 14, 2020 Hmm, I don't think there's any direct way to check the orientation. Maybe acos/asin? There aren't a ton of supported expressions in L-system rules. Quote Link to comment Share on other sites More sharing options...
Librarian Posted April 14, 2020 Share Posted April 14, 2020 I had a similar problem and find that fusing with the power of 2 grid solves the problem, in my case. Here you have some interesting examples. I'm just curious about what you do in 2d ? @sneaky benvan.co.uk/lsys/ 1-file to notice P L Rule 1 L = S Rule 2 S = F”+[f-Y]F;G Rule 3 Y = –[|F-F–FY]- Rule 4 G = FGF[+F]+Y Angle -3832 Generations 30 1 Quote Link to comment Share on other sites More sharing options...
sneaky Posted May 6, 2020 Author Share Posted May 6, 2020 Hey @Librarian thank you for your answer I am a bite late by now ahah been quite busy! I wanted to create a plane surface, kind of a motherboard if u want! I have to say I don't really understand ur notice and how it could help me ? If you have time to explain your point I would be interested for sure. Few very interesting examples on this website but they all seem to intersect if I am not wrong! To explain my self a little further I searched an example for you. Even if I know the guys from Panoply (tremendous work by the way in here) didn't used L-system it is the kind of structure I would like to achieve. Quote Link to comment Share on other sites More sharing options...
Librarian Posted May 6, 2020 Share Posted May 6, 2020 @sneaky that solution it's already posted .. a million ways to do this in solver... have fun ... just find file "13 fun" ( endless possibility) solver... first file 1 Quote Link to comment Share on other sites More sharing options...
sneaky Posted May 6, 2020 Author Share Posted May 6, 2020 Oh ok ahah didn't search with the good key words thank a lot! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.