You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, the following rules generate different results in BrowserSynth and StructureSynth:
{ s 8 ry 30} crate
rule crate {
box
{ s 0.5 x 0.9 z 0.9 y -0.9 h 22} crate2
{ s 0.5 x -0.9 z 0.9 y -0.9 h 44 } crate2
{ s 0.5 x 0.9 z -0.9 y -0.9 h 66} crate2
{ s 0.5 x -0.9 z -0.9 y -0.9 h 88} crate2
}
rule crate2 {
box
{ s 0.5 x 0.9 z 0.9 y -0.9 h 22} crate
{ s 0.5 x -0.9 z 0.9 y -0.9 h 44 } crate
{ s 0.5 x 0.9 z -0.9 y -0.9 h 66} crate
{ s 0.5 x -0.9 z -0.9 y -0.9 h 88} crate
}
StructureSynth (expected behavior)
BrowserSynth
Clearly, only one of the four branches are executed. Note that crate and crate2 do the same thing - but the result is correct only when a single rule is used.
I wonder if this is a bug or an undocumented intentional change?
The text was updated successfully, but these errors were encountered:
BrowserSynth is based on a slighly older version of eisenscript here on GitHub.
There is a difference in how the rules are "interpreted"
The original StructureSynth is strictly width-first then depth - BrowserSynth/eisenscript is depth first then width.
That means in StructureSynth first all your commands for crate would be executed, then all for crate two ..... but always staying at the same level or depth.
BrowserSynth would go to the first crate command, then execute the crate2 for that first one, then the crate again .... - but - as it stands it would go into an infinite loop on the first corner and never get to the second corner.
The termination is only done by a default limit to prevent too many crashed by limiting the default number of objects.
This is not how the original works, I know, but I am not able to understand the eisenscript code enough to change that.
There are two simple things you can do.
Just add those two lines at the top of the script set maxobjects 6000 set maxdepth 7
Generally BrowserSynth is limited to 1000 objects so bump that up to 6000 and limit the recursion depth to e.g. 6 or 7
Then you get the same image in BrowserSynth
maxdepth and maxobjects are the only termination criteria in BrowserSynth
I understand, this is a good workaround. Thank you!
If compatibility with StructureSynth is a goal then it should be properly fixed though - I'll investigate the eisenscript interpreter and keep you updated. Also might be worth teaming up with @after12am
Hi, the following rules generate different results in BrowserSynth and StructureSynth:
Clearly, only one of the four branches are executed. Note that
crate
andcrate2
do the same thing - but the result is correct only when a single rule is used.I wonder if this is a bug or an undocumented intentional change?
The text was updated successfully, but these errors were encountered: