# Vertical slats gradient with min distance

Hi there,

I am trying to define a routine for a vertical slats facade. The slats rotate based on a central point in such a way that it is symmetrical relative to this point. However, I want to use slats of a certain length that have a minimum 0.9m distance between them so to let a person to go through them. The slat length is the same for the entire facade, but several options are to be tested between 0.4-0.7m.
Here is an example of what I want to achieve:

Rutina lamas orientadas a punto rotando en punto central_JFA1.gh (26.5 KB)

I am very confused about how to maintain these two conditions in such a way that the distance between slats and the number adapt for different slats lengths.
Thanks

I did this with an Anemone loop (white group, Anemone 0.4) but got confused about what to do beyond the middle point so created a plane there and mirrored the first half. The width of that middle gap is undefinedâ€¦

slats_2024Apr14a.gh (26 KB)

1 Like

use a circle (r = 0.9m) centered on the end of the slat (closest to the guide point far from the curve) and intersect it with your curve to get the insertion point of the next slat. calculate the vector between that insertion point to your guide point and use it to get the next slat. repeat until youâ€™ve covered the curve

Thatâ€™s the trick, eh?

â€śIn theory, there is no difference between theory and practice. But, in practice, there is.â€ť

itâ€™s basically a for loop â€¦ i guess youâ€™ve done that with anemone and you also tried to deal with the exception

but opâ€™s request is invalid architecturally. in reality heâ€™d also want to calculate the position of his next slat by generating the line starting from his point and tangent to the 0.9m circle. that circle is sometimes centered on one end of the slat, sometimes on the other - whichever end is closer to that point

1 Like

Mere words of advice are not as helpful as you think. Code is where the rubber meets the road, so to speak.

true, but i think op can understand the concept and translate it into code himself. maybe iâ€™m overly optimistic

Iâ€™m pretty sure that @julioamodia89 gave it a lot of thought and understood the basic idea, before he asked for help.

i guess youâ€™re also overly optimistic

This workaround is great. I believe it is the same principle of what @adel.albloushi was proposing.
However, my goal is to keep a minimum distance of 0.9m in any situation, I believe in this case there are two situations and the closer we get to the center the condition changes as @adel.albloushi commented. I am afraid I donâ€™t know how to address these two conditions with Anemone. Do you have any recommendations on how to do this?

I have tried doing it myself but I get an error:

slats_2024Apr14a_JFA.gh (30.7 KB)

Thanks

slats_2024Apr14b.gh (21.5 KB)

Fyi. The solution gets trivially easy if 1. You use the curve to determine the middle of the slat, and 2. You divide the curve by length using L= slat_width+ clearance.

The drawback is that the spacing will be a little uneven, but it will always be larger than 0.9m

It gets tricky when you want the clearance to be exactly 0.9m.

I see. I understand the minimum distance keep changing and it is not coincident with the start or end points of the curve of the slats. I wonder if is possible to include a condition into the Anemone loop so that if the min distance between one slat and the next is <0.9 then add the difference until 0.9m.

Thanks again

According to @adel.albloushi this is â€śtrivially easyâ€ť.

1 Like

It is

@Joseph_Oster try it. You donâ€™t even need anemone.

Prove it. Nothing but talk from you so far.

Less is possible

hint: you would most likely want to cull the last slat

1 Like

Thank you @adel.albloushi. That is very helpful. However, my goal is to get as close as 0.9m as possible.