# Mapping pyramids(different in height) on a curvy surface

Hi there guys,

here is a Grasshopper newbie. I’ve been involved in Grasshopper for a while now, but I can’t really code by myself, I rather copy codes from other people and try to get them to work in my case.

Here’s the thing. There is this subject at my university where we are assigned a famous building and we need to recreate it in Rhino. We’re given bonus points if we manage to code some interesting part of it in Grasshopper. So far so good, I’m doing pretty well with Rhino and by far I am happy with the results I’ve achieved with modelling the given building.

Harbin Opera House by MAD is the building I’m trying to model. There is one particular surface:
I’ve built this surface in Rhino and now I’m trying to map pyramids on it. Not only have the pyramids to be different in height, but their height has to be dependent on the curvature of the surface.

I’m getting some results but it seems to be exactly the opposite of what I need. I want to have higher/spikier pyramids where my curvature analysis shows red/blue and lower/slopier pyramids where the analysis shows green colour.

At the moment I’m not really sure how the code I have works, but it seems that the height of the pyramids is dependent on a distance from a point in space to the projection of the cap-point of a pyramid.

Here’re my Rhino and Grasshopper files:
surface1.gh (17.3 KB)
surface1.3dm (953.8 KB)

I’d be grateful if someone of you guys could handle my problem. I’ve got one more issue with this surface, but once I get a solution to the first 1 will let know what the second one is.

Thanks in advance and keep well!

Hi,
I would rather build another surface to represent the upper boundary of your pyramids.
It allows you to control your pyramid’s heights inside rhino. Grasshopper will only generate the grid dispatching and each pyramid.
surface1.gh (8.3 KB)
surface1.3dm (1.0 MB)

What do you think ?

1 Like

Hi Baptiste,

this is a simple, yet perfect solution for me. Works great! Thank you so much!

May I ask you for one more thing?
I need to take the grid on which the pyramids are based and offset each line in both directions on the surface. With all offset lines I then need to create a surface and extrude it so that I get a solid.

I can see that the grid is contained by the Simplify box.

Here is what the building looks like from inside:

Ideally the lines which are going to create a to-be-extruded surface have to be from 2nd or 3rd degree (at the moment they’re lines/polylines which means they’re from 1st degree).

Once again thank you so much for the solution of my initial question!

Hi,
I don’t have any solution from scratch right now. But I may have a look on it next week.
To go further, I think you should try to isolate every single segment, and then

• either rebuild your principal curves, offset and extrude normal to the primary surface, then union breps.
• either offset on the primary surface every single rectangle, use this to make holes on the basis surface, then extrude the new surface
You could also find other solutions.
Good luck

I couldn’t wait
Have a look on this :
surface1.3dm (1.1 MB)
surface1.gh (24.0 KB)

I finally chose to sweep a rectangle along the curves. You still have to deal with intersections.