Rotate and scale geometry based on proximity to curve

Hello. I am new to grasshopper.
I am trying to manipulate this script to scale and rotate the buildings based on proximity to the curve you can see in the rhino file. How can I do it?
Besides this, I would like to reduce the density (eliminate some of the buildings) progresively towards the curve.
I’m attatching both files and I really appreciate your help!

grasshopper base for urban design - digum2 (1).gh (25.0 KB)
new rhino model base for Targil 1 - Hadar neighborhood (1).3dm (486.4 KB)

missing

Doesn’t appear to be used though?

So far, it looks like you used the boundary curve only for culling a grid… So there is a lot to do :exclamation:

I got the files from uni, if you close the window it works normally!
The first part of the script gives me the culled grid, from there I get the center points and then the surfaces. What I want is to rotate + scale + remove some of the surfaces to achieve what I wrote before: the buildings are facing the curve, they become smaller the closer they get to the curve, and on top of that some of them are removed (density decreases)
I have some ideas on how this could be done, I have worked with atractor point and orient direction before but not sure how can I use a curve instead

I got the buildings rotated to face the closest point on the boundary curve (white group). Also added cull of lots that intersect the boundary (purple group).


urban design_2024Feb8a.gh (31.9 KB)

Crv CP ‘D’ (Distance) is there for other purposes…

P.S. Added orange group to scale buildings (reduce number of floors) based on distance.


urban design_2024Feb8b.gh (27.1 KB)

Two significant changes:

  1. Fixed an issue that caused some buildings to “face” their short side to the boundary instead of their long side. Needed to connect “base plane” to Angle component (white group).

  2. Disabled the purple group that was culling grid squares that intersected the boundary. Replaced by culling buildings that are less than ‘MinD’ slider (Minimum Distance, white group). As you can see, this leaves some squares without buildings but there are more buildings than before. (87 vs. 71)


urban design_2024Feb8c.gh (38.1 KB)

thank you so much!

The title of your DUPLICATE THREAD!!! suggests that “proximity to curve” will be the criteria for “progressively” removing buildings (points) but the text there says “as it gets closer to the point”. So which criteria is it, proximity to a curve or proximity to a point?

I’ve done several threads recently on “gradient points” and could apply that method here.

By the way, I think it’s odd and not optimal that size of lots (and therefore buildings) are affected by the slider ‘alignment to defined area’. It would work just as well (better!) to rotate a fixed grid so grid size can be defined independent of grid alignment.

Did you consider asking me about code you didn’t understand?

Not much code really and all of it is in these two groups:

Hi, I’ve started to look at the script and I have a few questions. Why do you add the graph mapper in the orange part?

Good question. Wish you had asked me four days ago when this was fresh on my mind.

It’s optional, the code will work without it:


urban design_2024Feb12a.gh (33.5 KB) (without Graph Mapper)

The reason for using it is to avoid a linear transition between low to high. Shaping the Bezier curve to be flat on top and bottom causes a gradual transition at the extremes which can be seen in a front view of the buildings. Without Graph Mapper looks like this:

EDIT: I messed up and made both images the same. Now corrected below.

With Graph Mapper looks like this: (or how you shape the graph)


urban design_2024Feb12b.gh (38.2 KB) (with Graph Mapper)

IMPORTANT: While doing this reply (which takes longer than you might think), I realized that the output should be rounded to an integer because it is the number of floors, which can’t be a fraction! So I made that change in both versions ‘a’ (without Graph Mapper) and ‘b’ (with Graph Mapper) in this post.

P.S. Other shapes of theGraph Mapper curve:


P.P.S. One more to show why a Graph Mapper is ever used, With a curve like this, there is only one tallest building and one shortest building: