The dwg format maps in Turkey are often problematic. You need to clean these for architectural studios. Maps mostly contain height information of buildings. But the contours of the buildings are distorted and polylines are generally exploded. The map of the region where we worked in the studio I conducted in the Fall 2021 term was also problematic. I created a Map Cleaner Script in Rhino Python and converted the […]
Posts with the keyword rhinopython
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 […]
I realized this method of constructing basis splines from given control points while searching for a way to teach students about basis splines. I couldn’t find an easy and visual method to create clamped basis splines by connecting simple cubic Bézier spans. It is a tough job and requires lots of complex equations. However, I suddenly realized that there is a special way of doing that. So I decided to […]
Below is the Python code you can run in Rhino, that draws a cubic Bézier curve (degree 3). As you can see, the Rhino Python code is very slow and inefficient because we calculate every point with lots of computations. Instead, we can use the spline formulae to make this quicker but I wanted to show that the mathematical construction is parallel to the geometric one. This is a nested […]
Studied earlier in Grasshopper here, creating a cycloid-like curve actually mimics the physical process of rotating disks on a path. Below is a test in Rhino Python. # Drawing Cycloid-like Curves # 07.08.2017 www.designcoding.net – Tugrul Yazar import rhinoscriptsyntax as rs curv = rs.GetObject(“Select curve”) qual = rs.GetInteger(“Quality”,100) radi = rs.GetReal(“a radius”,4) radi2 = rs.GetReal(“Circle radius”,4) cua = rs.OffsetCurve(curv,[1,1,0],radi2) cevre = 2 * 3.1415 * radi mimi = [] for […]
We will see a simple Rhino Python exercise here. I called these Polygon Fractals (or Pentaflakes sometimes). It is both educational and fun to play with them. In Rhino, it can be a good exercise for basic CAD commands and transformations such as move, copy, and scale, and precision drawing operations such as object snapping. Also, in Grasshopper, it can be a good challenge for looping. In Rhino Python, it […]
A simple Rhino Python script that generates fractal curves. An example is a test with the Gosper-Peano curve. However the script is not supporting segment directions, which is why the result is not the intended curve. Curve directions could be implemented in the future. # Drawing Simple Fractal Curves # 31.07.2017 www.designcoding.net – Tugrul Yazar import rhinoscriptsyntax as rs import copy initials = rs.GetObject(“Select Initial Shape”,4) referenceA = rs.GetPoint(“Place Reference […]
Studied earlier in Grasshopper here, the sunflower spiral or Phyllotaxis, or Fibonacci’s spiral could be drawn as an exercise of looping in Rhino Python. According to ChatGPT: Phyllotaxis is the arrangement or patterning of leaves, flowers, or other plant parts around a stem or axis. Thus, it refers to the specific geometric arrangement of these structures in plants. The term “phyllotaxis” comes from the Greek words “phyllon” (meaning “leaf”) and […]