Simplifying a complex algorithm

Hi all,

Struggling to find a way of avoiding a repeated pattern and simplifying this algorithm.

Please help!!


help.gh (8.9 KB)

help.gh (11.4 KB)

2 Likes

Dear @Ray_Harli
what you re doing here is called recursion.

a lot of fractals are based on this principle.
In short: the results of a function will be used as input for the next go of the same function.
this can be implemented by a function calling itself.
or within a loop.

both is hard or not to accomplish in native grasshopper - especially if you want a dynamic depth of the recursion

check this forum for grasshopper and recursion - there is anemone- plug-in allowing loops:

more or less it might be implemented like this.
i am not 100% sure if the points are on a logarithmic spiral - or if it is just an approximation.

spiral.gh (10.0 KB)

changing parameters will show your curve - or other other “polygonal” spirals:


kind regards -tom

5 Likes

native gh, dynamic depth of the recursion.

maths is everything.
I personally had not used any 3rd party plugin in gh for 14 years. so far so good. :crazy_face:

Do you think we will learn more by reconstructing your code from a screen image? Not gonna happen.

sometime I am just being lazy :stuck_out_tongue_closed_eyes:

Hi Deer, I get an error at the rotate plane component as no geometry has been created?

Hello
Deer just post a picture and you just say that it didn’t work. What is it ? A guessing game ? Do you want a dumb answer?
So post a script and you will have an answer in some minutes.
Did you forget the X ?

2 Likes

that is clever

If you failed to reconstruct correctly according to my image, which is only 12 components.

I think you must have missed some components.
How about check again? It has only 12 components after all.

My fault, I always upload gh file, only this time it has too little components and I was just kind of lazy.
I did not expect anyone would fail to copy it.