Grasshopper

algorithmic modeling for Rhino

Hi everyone!

I have the following surface, it's something like grass meadows on a park:

What i want to do, is that when the surface approaches the streets and existing buildings, it's height becomes 0.

I tried doing it using curve cp, and projecting the points closer to the curves to de base plane, and I get this:

how can I change the definition so i get a smoother transition? What i mean is, i want points directly on top of the attractor curves to move to the ground, but points farther away from it should move less and less.

Thanks a lot!

Views: 3979

Attachments:

Replies to This Discussion

The earlier code (the one with the spheroids you mention) was the solution I found when trying to use the graph mapper.

The problem I found was that I couldn't quite get the shape I was looking for, that's why I decided to draw the curve myself and just revolve it.

Also, from a design perspective the intersecting ripples gave the existing buildings to much importance, this new way, the most important part of the design is the sphere in the center, and I just "make way" for the existing buildings by pulling the points to the floor.

Let's clear thing up a bit:

The output of the graph mapper is not the surface. It is a list with the Z values of all the points.

What I did in the first example was to create a second list with values from 0 to 1 and multiply those two lists.

So if a point is close to the attractors (building and blocks outlines) then its Z value is multiplied by 0 (or something close to 0) and so the surface becomes flat at this point.

Likewise, if a point is away from the attractors it's Z value is multiplied by 1 and so the surface is left unchanged at this point.

Now, if you already have a surface, you can do (more or less) the same. But instead of having all your starting points at z=0 and move them on Z, you now have to get each point's coordinates, multiply it's Z value with the same list (from 0 to 1) and rebuild the points with this new Z value:

Now, if you want some more control over the "flattening" effect, you could add a single expression component after the Distance output of [Pull], with 3 inputs (X=Distance, Y=slider for min distance, Z=slider for max distance) and the expression: If(x<y, y, if(x>z, z, x))

This is similar to what both you and Joseph did at some part of your definitions.

So with the expression component you keep the areas near the attractor curves flat and the areas away from them unchanged and with the graph mapper you create a smooth transition in between.

Hope this is clear,

cheers,

Nikos

Attachments:

Yep, clear.  And I think we've shown pretty well that there's more than one way to get the job done.  Thanks again for sharing your insights.

"there's more than one way to get the job done"

exactly!

Thank you very much Nikos!

It was fairly simple to adapt my previous code to this ripple pattern; the only problem I had was that your ripple curve was too short to reach the corners, which caused null points in the grid - so I stretched the last control point of the line to make it a little longer.  And I had to move it up slightly (0.1) to keep it from going below the flat surface grid points.  (internalized 'ripple' curve param)

Instead of 'Pull', I needed to use 'Project Point' to keep the grid aligned.

I see your latest post Nikos but am distracted once again by other matters so can't look at it or respond at the moment; will get back to you.

Attachments:

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service