designcoding
About Table of Contents Keywords Monthly Archive
Support designcoding!

Algorithms

259 posts

Low Poly Trees in Grasshopper

November 30, 2022

Let’s make some nostalgia. I thought of a very simple and useful algorithm that I can generate with Grasshopper. At the concept stage in architectural projects, I tried to derive figures that could symbolize the trees on the land. To make random low poly trees in Grasshopper we need several lists of random numbers first. The Facet Dome component will meet all our needs. In the code I shared on this page, I arranged the data tree structure to handle…

Strange Start Startling Stop

November 26, 2022

“Strange Start Startling Stop” was designed by Mary Purdy at the State University of New York in 1985. The composition is based on a hexagonal lattice (above figure). There are four prototiles, marking the four key moments in the shape-shifting process. The first prototile is a regular hexagon, which is also the first tile of the composition. This prototile morphs into a shape that is a composition of four smaller hexagons, creating the second prototile. This morphing process finishes at…

Fourier Series

November 14, 2022

This is my first experiment with the Fourier Series in Grasshopper using Python. This is a technique to decompose functions into their frequency components. Fourier series have a wide range of applications in physics and engineering. What makes it especially fascinating, however, is the visual intuition it offers. It looks like a kind of mathematical “magic” that emerges from the geometry of frequency. I explored several excellent visual explanations online, including those by Coding Train, 3Blue1Brown, and Mathologer, each offering…

Vector Projection and Angle

December 21, 2021

In this session, I will add two new methods to the Vector class. I think this will finish the basics for the vectors. In the future, we are going to need several new methods like adding multiple vectors and interpolation. But for now, I think this would be sufficient to further advance into parametric curves and surfaces. These new methods will be based on the dot product method we created in the last post. I will add the vector projection…

Vector Normalization and Dot Product

October 29, 2021

This is the continuation of the Vector class we started here, and further advanced here, here, and here. This new Rhino Python implementation is mostly educational and partially a hobby. Before this session, we have developed display, magnitude, add, multiply, reverse, and subtract methods. This time, I am adding the vector normalization and dot product methods and seeing the utilizations of the dot product. Line Explanation 1-26 Already explained in the previous posts. 27 Define a new method called “normalize”….

Curve Equations Revisited

October 14, 2021

This is the continuation of the previous post on parametric curve equations. In this new version, the script picks a NURBS curve from the user. Then, it analyses the curve’s degree and control points. Unfortunately, only the curves with degree+1 number of control points can be processed. In the future, I hope that I will be able to extend this script to include multi-span curves with more than degree +1 control points. Finally, the script creates the three functions for…

Vector Magnitude Method in Rhino Python

October 12, 2021

Today, I am going to make only one addition to the Vector class we recently started in Rhino Python. The magnitude of a vector can be easily calculated by assuming that the axes (2 or 3 axes) of it are perpendicular to each other. This gives us an opportunity to assume a right triangle visually, and calculate the magnitude (length) of a vector by using the Pythagorean Theorem. In short, if you square and add the components of a vector,…

Parametric Curve Equations

September 19, 2021

The parametric curve equations are good examples to demonstrate the bridge between computer-aided design and mathematics. Although useless and pointless, it is a good exercise to extract the curve equations. In this Rhino Python code, I present a generalized equation extractor for Rhino. Rhino curves are good examples de Casteljau and Bézier curves. You can see the mathematical underpinnings of Rhino curves with this exercise: This code asks the user the degree of the curve. By default, Rhino’s curves are…

More Vector Operations in Rhino Python

September 1, 2021

This is the continuation of my new project of re-creating the parametric curve and surface methods of Rhino via Python scripting. If you remember, I started with the building block of vector operations, here and here. Then, I defined vector addition and multiplication, before going deeper into the geometric calculations. In fact, they are using the previously defined addition and multiplication methods. New Vector Operations: Subtraction and Reversing In the future, we are going to need to reverse a vector,…

Vector Arithmetics in Rhino Python

August 20, 2021

Today, I am going to advance the Vector class a bit more. Firstly, I will improve the display method I introduced recently. Then, I will add two new methods which handle the fundamental vector arithmetics in Rhino Python. Improving the Display Method In the previous attempt, I displayed vectors on the origin of the Rhino viewport. The coordinates of the tail of a vector are not stored within the object attributes. Normally, I can store two coordinates, one for the…

« 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 … 24 25 26 »
  • Chapters

    • Algorithms
    • Discourses
    • Fabrications
    • Studios
  • Explore

    • All Keywords
    • Table of Contents
    • Monthly Archive
    • #ice-ray
    • #unity
    • #bezier-curve
    • #tree
    • #tiling
    • #fractal
    • #escher
    • #gyroid
    • #hoopsnake
    • #geodesic
    • #wave
    • #minimal-surface
    • #buckyball
    • #interlocking
    • #logic
    • #terrain
    • #moebius
    • #visualization
    • #revit
    • #voronoi
  • Search

  • Support designcoding!

  • Enjoying designcoding? Support me on Patreon to keep it growing. Thank you!

  • copyright 2026 designcoding.net | about | privacy policy | end user license agreement