Learn To Model a Double Twisted Tower in Grasshopper

Hi there,

In the last edition of the Newsletter, we modeled a single twisting tower which helped expose us to Grasshopper for the first time and hopefully got you better acquainted with the program.

Today, we look at an extension of the single twisting tower by modeling two towers. We can use the same mentality as last time but introducing another tower would mean we have to also add some data management elements to the script.

Modeling double-twisting towers may sound abstract but there is a tower in Taipei that uses this structure as it was inspired by the structure of DNA. You can read more about it here.

Figure 1: Taipei’s Twisted tower, photo by Inhabitat

Learning Features of the Script

  • A bit of data management
  • Curve referencing

Modeling

1. Create a circle for the floor profiles to revolve around

So, I start off different than before, instead of creating the base floor profile, I start off by creating the circle that our floor profiles will revolve around. This is because the circle that the floors revolve around is what drives this model.

2. Create the base floor profile

Then I create the floor profiles. To do this, I create a rectangle and move it in two opposite directions from the origin. I also take into account the radius of the circle, so that the floors always stay outside the circle.

You will also notice that I am using a square now, we can change this later, I just want to get the logic of the script up and running.

3. Creating the Floors

Then similarly to what we did before, we can move the squares upwards using the LinearArray component.

And now we come to what is different from the previous script, the data management part of it. Up until now, we never had to worry about it because, we have been dealing with a single list, now that we have two lists, we are introduced to Grasshopper’s data tree structure. I can see how Grasshopper has done this with the Param Viewer component. You can also right-click and set it to Tree View to visualize the data better.

Notice that by passing in two rectangles instead of one into the LinearArray component, Grasshopper has returned with a data tree that has two branches, with each branch containing 14 items. This means that each branch of our data tree responds to a single tower. We can actually view this by using the Tree Branch component and feeding in the first branch.

4. Apply Rotation

Like before, we can apply the rotation to the floors by using the range component and following the exact steps as we did before

Grasshopper is performing its operations on a list/branch level. In other words, it is applying the list of rotations to each branch of the data tree.

As long as each branch has the same number of items as the list of angles we are feeding in, we won’t encounter any weird problems. Watch what happens when I change the number of angles in the list.

Notice that the rotation only gets applied to the first 5 floors because Grasshopper by default will match the last item of input with every access item of another input. I hope this shows how crucial it is to manage your data well, right from the beginning.

5. Loft and Extrude the middle circle

Now all that is left is to loft the floors and extrude the circle upwards. I want the height of the circle to match the end of all the floors, so the extrude height needs to be based on the number of floors and the floor height.

Final Thoughts

That was a little peek into the world of data management inside Grasshopper. If that was confusing, try experimenting around with different data structures, use 3 or 4-floor profiles instead of 2. I find experimenting on my own helps me learn better.

Not to mention you will have plenty of opportunities to see data management in action as we look into different and more complex types of models later on.

You can also find the Youtube version of this Newsletter below along with the Grasshopper script that I use to create the double-twisting towers.

If you found this helpful and enjoyed it, consider subscribing to the Newsletter and the Youtube channel, it does help me out.

but as always,

Thanks for reading and I’ll see you in the next one.

Braden

You can find the Youtube version of this Newsletter here :

You can find the Grasshopper Script for this model for free here

(Just Set a Price of 0 dollars)

Read the Previous Edition here :

Originally published at https://allthingscomputational.substack.com on March 29, 2022.

--

--

--

Connecting the world of geometry, programming, and engineering. Come learn about this hidden world that lives in plain sight.

Recommended from Medium

Be like a Doraemon — combine skills to write even better tests

Caught on the spot

How to Upload Your Python Package to PyPI

From Workspaces to Organizations, Templates, Projects, and Environments

Calling Out A0 Devs

Azure Logic Apps Anywhere — Develop & Run Locally in VS Code

Python Data Structures 📚

[LeetCode]#193. Valid Phone Numbers

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Bradenkoh

Bradenkoh

Engineer. Programmer. Computational Designer. Currently in Sydney.

More from Medium

Learn To Model a Twisted Tower in Grasshopper

MATLAB analysis of working fluids for Organic Rankine Cycles — ORC

PhD 8 months in — some notes

Application of Drone Technology in Agriculture 🚁