Python Resources

3m 56s

In this course, David Tracy will teach you how to use the Python programming language with Rhino to automate tasks, create complex forms, and simulate physical phenomena. This course will serve as a gentle introduction to programming to unlock capabilities for generative computational design with Rhino, Python, and Grasshopper.

First, you will be introduced to the core concepts of using Python in Rhino, such as drawing shapes with code, transformation, and variables. Then you will learn how to use classes and object oriented programming. Finally, you will learn how to integrate Grasshopper into your Python and Rhino workflow.

When we’re done, you will understand the core concepts of programming with Python, be able to author your own scripts, and create custom components in Grasshopper.

you're undoubtedly going to run into some walls, you're gonna encounter errors, and sometimes that can be pretty frustrating. But it doesn't have to be, there are some really good resources out there to help you ease into the process of learning Python, and then also using Python in Rhino. So the first resource that is a great place to start is the RhinoPython primer. And so you can get this on And it's just a pdf, it's free to download, and it is very in-depth.

It's based on the original Rhinoscripting primer that was for vbScript. This one has been rewritten in Python and it goes more in-depth than we have time to in this course. But it's a great resource in general to get you started, and also give you some extra context for what you're doing, and what's going on behind the scenes with Python. This is a great resource, and it also has some excellent examples.

So use this as a resource for yourself, because this is great to come back to, and also to extend beyond the scope of this course. So another really great resource that isn't entirely architecture-related, actually it's not architecture-related at all, but it is Python-related, and that's Codeacademy. And so Codeacademy is a great interactive tool and resource that's free for learning code, and there is a pretty solid Python course here.

And so the way that Codeacademy works is that it has a window on the left side of the screen that kind of gives you some text-based instruction, and then it has an in-browser code editor, and you can save and submit your code. And when you successfully execute your code, it will move you on to the next lesson. This is a pretty pain-free way to start learning Python, but again, it's not architecture-related at all.

So another resource that is oftentimes very helpful is Stack Exchange, Stack Overflow. So oftentimes when you search for an issue that you're having in Python in Google, so let's say, Python (typing) boolean (typing) variant (typing) variable. So oftentimes the very first result will be something from Stack Overflow. And Stack Overflow is a forum where people ask questions mostly pertaining to code.

Sometimes it can be a really great resource to answer questions quickly, I rely on it very often. One of the tricks that you'll learn after using Stack Overflow for a while is that you learn how to filter through the good responses and the bad ones. It's kind of more of an art than a science. But there are thousands, millions of questions, and there's a good chance that your question has already been answered hundreds of times over. So Stack Overflow is a really great resource as well.

Another very good resource to get started with creative coding applications, and also natural simulation algorithms, is The Nature of Code (typing) by Daniel Shiffman. And so this is a free online book, you can donate to the author, but you can read the entire book online for free. And this introduces a lot of important concepts in writing code for natural simulations, and there are a lot of interactive, in-browser examples.

So this is all written for processing but it's fairly easy to read, and after this course, you should be able to translate this fairly easily from Java to Python.

Log in to access files

From the course:
Introduction To Python In Rhino

Level 1

Duration: 3h 23m

Author: David Tracy