Height limit according to the surrounding


Categories: Tutorials

Tagged with: | | | | | | | | | |

We need more apartments, offices, factories, schools…. we need more of everything. So let’s see how much we can fit in! What if we densifying Prague on its empty spaces as much as we can, while preserving Prague’s unesco value and its oh-so-“important” skyline.

Let’s make a scenario of such a project. so that the new Prague buildings use their full potential in their height but at the same time do not disturb the horizon and the monuments.

All theoretically possible new urban construction

taller buildings in the valleys and smaller ones on hill where is more prominent view for UNESCO.

so the view from Prague Castle is untouchable

So how do we do it… theoretically, we first need to create a building outline and urban design on the land/area where we want to build. So we have the horizontal limits, now we need to create the vertical limits, which is the main part. this limit is created by two inputs. first we need a point from where to shoot the “visibility rays”, and secondly several points on the new buildings (one floor at a time for example) to shoot the rays at. Therefore, points that are not hit by the beam are not visible from the base point of the beam. This then determines how tall the building can be.

Urbanism structure

Let’s start with creating the basic shape of the building. you can choose whatever you want. for clarity and versatility, here we’ll use a basic square defined by a rectangle with a plane created by a construction point so we can move it wherever we need it.

With the shape defined, we can move on to the array. Array is used here as an urban typology because we are looking at the more schematic, volume defying and universal project. If you want a more realistic urbanism or want to play with it more, I can recommend the great addon DeCodingSpaces Toolbox.

DeCodingSpaces Toolbox | Computational analysis and generation of STREET NETWORKS, PLOTS and BUILDINGS

To achieve an array, we must first find the distance from the center of the shape to the vertical on the edge. To do this, we use the distance array group with which we create line between center and corner of the shape and measure it. With help of a multiplier we set the distance that goes into the series of components for the X and Y axes, which are combined using a cross-reference. This creates a defined grid of the desired shapes.

Now that we have a grid, we can filter shapes by the land we want to build on. We find the centers of the shapes (polygon center component) and, thanks to the components point in the curves and largel than, we find which point belongs inside the selected curves and filter out all the others using a cull pattern whose output is fllaten to simplify the computation but is not nessecery (here I used curves imported from QGIS that are outlying empry plots and have same coordinates as Prague model).

Oriental direction is not necessary for a functional final output, but it does make it a bit more interesting. Here again, we use polygon center to find the center of the shapes (you can also use a area, but it’s much more CPU intensive). We use the point defined here by Prague Castle as the orientation point for the rectangles, and later also used as a viewpoint for the upper height boundary.

Note that the Z-axis should be the same as the plane of the rectangle component at the beginning of the script. otherwise the rectangle will be slanted, which is fine, but in the end with the towers it can be very distorted at this scale. so be careful.

Box rectangle make it finally 3D. The height is not that important, as we only need a basic 3D box for later reconstruction.

Now let’s build the tower!

First we simplified the original shape to a bounding box with the origin at the button, here defined as 0 in parameter W. The project component should allow us to move the base where we want. Here we use a simple plane, because the script can still be very demanding, but in different sceneries it can be replaced by terrain, for example.

Grafted points (so we can work with them separately) should be deconstructed and keep just the X and Y coordinates with added Z coordinates, with the series defined by the number of steps as the floor height and the count number limited by the maximum height (500m/3.5m=143m).

When we have a spine of towers, we need to shorten it to the required height so that it does not overhang the surroundings. To do this, we need a “wall” that defines the surroundings. So we mesh join the terrain and buildings and set as input for a mesh/ray component that “shoots” rays from point A (here the point set on Prague Castle) to points B (the points of the floors on the tower spine created a step before).

Now that we know when the rays are hitting the points on the spine, we can determine the height of the buildings and just keep the intact points.

Okay, we have everything we need to build the tower. We take the box from two steps before and again create a bounding box that we deconstruct so that, along with the highest invisible point that we find using the list item, and along with the construct domain with the domain start set to 0, we can define the Z volume of the new domain box that we will eventually use as the target for box morph of the original box.


Then we can easily calculate what the capacity of such a project could be. With input of the new buildings and terrain into the mesh difference we can use split list to select the top part of the buildings (remember that the base point of the building is on the plane, which we create at the start and is below the terrain in this scenario, so we need to get rid of this underground parts of buildings to calculate the volume correctly). The Mass additons component will allow us to add up all the building volumes into one number.


In the end, the script looks like this. Be aware that it is very CPU intensive for a larger area. In this tutorial I pick some of the steps which make it lighter but still I would recomended to us it in max scale of district. For whole city as I needed, I advise to do it in multiple parts. For me 1/8 of Prague took something around 8 hours to calculate. From my experience, I would say that a lot of time can be taken up by component point in curves, if you have a large grid and a LOT of curves.

This method can also be used when designing buildings or just for more detailed work in urban planning. for example, creating clear views in the streets or some type of building composition where we can shape the building according to the visibility of the building behind it or otherwise. Good luck and have a fun!

Rhino file (3GB) and script:

Ununesco rhino file