More spam

I feel like i’m spamming the chat today… :expressionless:
But… I wanna know :smiley:

I’m working my way through the wiki page trying to reproduce all the L-systems in Dynamo.

I’m on the Sierpinski triangle now… >> L-system - Wikipedia << Example #5

I feel that somehow I’ve halved the line or something, or reversed something. I’ve tried every variation I can think of and made some lovely patterns. But not the one I want to!

I have tried swapping the F + G , I’ve tried swapping the + and - vectors, I’ve tried different input vectors.

I even tried drawing both F and G (see below)
image

But even this doesn’t give me lines in the correct places.

It should look something like these:

image

Well that’s a first… It wasn’t me :astonished:

Turns out that Dynamo doesn’t seem to like + and - as strings in the Python code! I changed it to L and R and it works great!!

Anyone working for Dynamo explain why this may be the case?

5 Likes

Aaand one more before bed :laughing: :crazy_face:

It’s meant to look like this…
image

But, I’ve gone wrong somewhere…

1 Like

Such a person doesn’t exist, as Dynamo’s open source contributors work for other companies… someone who works ON dynamo might be able to chime in though. :slight_smile:

While I don’t work on Dynamo, I can possibly provide some insight.

My guess is that the + and/or - values originate from a document edited using something other than the native Dynamo Python editor - meaning a copy/paste was used at some point. And that copied + and/or - wasn’t the same Unicode character as what you get when you type + and/or -. They look exactly the same, but they aren’t - kinda like twins. Try to extract the Unicode character from each and see what you get.

4 Likes

Can you explain that in a different way please?

I typed the + and the - manually into Dynamo for the creation of my strings.

Then I typed + and - again straight into Dynamo when writing the code to read the strings.

After realising the + and - didn’t work I tried L and R and it did work.

I only used Dynamo Python editor.

Or are you talking about some other document that was used when creating Dynamo under the hood?

Can you post the .dyn file with the two python codes? (either the LR or the ± version). Easier to show than tell here.

SierpinskiTriangle1.dyn (7.6 KB)

:slight_smile:

Seems to work for me just fine, but I’m using CPython 3 instead of IronPython 2.7…


With sign symbols insted of LR.dyn (8.6 KB)

1 Like

It may shock you (not that I have mentioned it 100x) but I’m mainly still in Revit 21 so Dynamo 2.6.1 with IronPython 2… :astonished: :expressionless:

Maybe that’s the reason?

Tbh, I did find L and R much easier to understand. I felt + should be going right not left!

I may see if it works in R23 on my machine. :slight_smile:

1 Like

Didn’t know you were limiting yourself to 2021 (note that you’re in the last 5 months of support so start running that coming issue up the chain of command and get things rolling on updating everything).

I’ll try Dynamo 2.6 shortly.

1 Like

Ok, 2.6 works for me as well.

My guess is the likely culprit was a faux - or + character.

Interesting stretch goal: Make the triangles on the outside edges of each subdivision a surface, and the center triangle a cut out.

1 Like

Do you mean make the red bits a solid surface?
image

More or less, yes.

It may shock you (not that I have mentioned it 100x) but I’m mainly still in Revit 21 so Dynamo 2.6.1 with IronPython 2…

@Alien deffo time for an upgrade! Shouldn’t you be in Revit 23 by now :cowboy_hat_face: ?

1 Like

What I was thinking of:

6 Likes

Still upgrading our scripts to R23 after my sidekick buggered off to another country :stuck_out_tongue_closed_eyes:

I hope it’s raining a lot :grin:

On the bright side… I have let the moose out and they are running wild!

3 Likes

take the lad away from dynamo, but you can’t take dynamo out of the lad.

2 Likes

Cannot express how stoked I am on this one. :smiley:

5 Likes