3 ms·
I was able to get it working, I think: axiom: a rules: a = +b|-a|a-|b+ b = -a|+b|b+|a- initial angle: 90 angle change: 90 scale: 1 simulation depth: 4
by SomeDaysBe 3y ago
I was able to get it working, I think:
axiom: a
rules:
a = +b|-a|a-|b+
b = -a|+b|b+|a-
initial angle: 90
angle change: 90
scale: 1
simulation depth: 4
- dalke 3y agoThat did the trick - thanks! I couldn't figure out what the [] meant in this context and thought it was to make a recursive call. (I've been working on basic space-filling curves, and came across that Wikipedia page last week, which is about all I know about L-systems.)
- SomeDaysBe 3y agoWow never heard of space filling curves. Yet another rabit hole to go into.
- dalke 3y agoJust posted my code as a "Show HN" at https://news.ycombinator.com/item?id=36762283 https://news.ycombinator.com/item?id=36762283 . The actual project is at https://hg.sr.ht/~dalke/rectfillcurve https://hg.sr.ht/~dalke/rectfillcurve . I've implemented a few space-filling curves and wrapped them into an iterator API.