COMPAS CRA — Coupled Rigid-Block Analysis

COMPAS CRA — Open Source Release

I am excited to open source our latest exciting research in Python — Coupled Rigid-Block Analysis (CRA) for the COMPAS framework. CRA is a new method to measure structural stability statically and can be used to design complex discrete-element assemblies. It can be applied to many research fields like designing architecture, furniture, 3D puzzles, toys, or even robotic assembly planning. You are welcome to use our code, star our repo, cite our work, and contribute! ...

September 2, 2022 · 1 min · Gene Ting-Chun Kao
Rhino PyCharm autocomplete

Rhino Mac PyCharm autocomplete

Here is how I set up my PyCharm IDE to program in Rhino Mac, so I can have a nice autocompletion functionality for the RhinoCommon and rhinoscriptsyntax. First, I install the python stubs to my created conda environment. This makes sure that we will have the autocomplete for the RhinoCommon API. $ conda create -n your-env-name $ conda activate your-env-name $ pip install Rhino-stubs To use specific environment in PyCharm, we will have to select the right environment for the project. This can be set in PyCharm -> Preferences -> Project: your-project-name -> Python Interpreter. Normally, our environment python is located at ~/anaconda3/envs/your-env-name/bin/python. ...

November 6, 2020 · 1 min · Gene Ting-Chun Kao
Robotic Force Printing

Robotic Force Printing - MIT Design-Build Workshop 2019

I was part of the teaching team at MIT Design-Build Workshop 2019 in Shanghai for a month, a joint workshop from MIT Architecture, ETH Zurich Block Research Group, and Tongji University. The workshop explores robotic additive manufacture and assembly of novel shell structures. More information can be found here on the BRG website. Teaching materials can also be found on our GitHub repo. With students from both Massachusetts Institute of Technology (MIT) and Tongji University, we built two projects. ...

February 1, 2019 · 1 min · Gene Ting-Chun Kao
Video thumbnail

ICD/ITKE Research Pavilion 2015-16 - development and implementation demo

I was in the computational design team while designing the ICD/ITKE Research Pavilion 2015-16 and was mainly in charge of developing computational tools. Here is the demonstration video to show the geometrical implementation. One of the input parameters from the plugin is a mesh surface, and the output parameters are all tree data structure thus some double-layer light weight structure as well as some planar plates can be generated (Planar plate wasn’t realized due to the decision making and scheduling during the development). All the geometries are labeled in the right sequence so they can be fabricated directly: ...

October 30, 2016 · 1 min · Gene Ting-Chun Kao
Rhino.Python Swarm Bridge

Rhino.Python

These are my Rhino.Python practice while I studied at Stuttgart University. Rhino.Python - 1D 2D 3D Rhino.Python - Swarm bridge Rhino.Python - tessellation and subdivision Rhino.Python - Boy Surface and subdivision Rhino.Python - 1D 2D 3D """ #################################################################### Computational Design Assignment 02 Kao, Ting-Chun Assignment to use for loop #################################################################### """ from scriptcontext import doc, escape_test import rhinoscriptsyntax as rs import Rhino.Geometry as rg import Rhino.DocObjects as rd import Rhino import time import System.Guid as guid import System.Drawing as sd import math import random dimension = rs.GetInteger("give me one to three dimension: ", 2, 1, 3) print(dimension) # some functions def PtMat(x, y, z): pt = rg.Point3d(x, y, z) materialIndex = doc.Materials.Add() material = doc.Materials[materialIndex] if dimension == 2: if x > 0 and y>0 and z>0: material.DiffuseColor = sd.Color.FromArgb(y/5*255*0.5, y/5*255*0.5, y/5*255) else: material.DiffuseColor = sd.Color.FromArgb( 255, abs(math.sin(x))*255, 255) material.CommitChanges() attr = Rhino.DocObjects.ObjectAttributes() attr = rd.ObjectAttributes() attr.MaterialSource = Rhino.DocObjects.ObjectMaterialSource.MaterialFromObject attr.MaterialIndex = materialIndex if dimension == 2: sphere = rg.Sphere(pt, (y+5)/5) elif dimension == 3: sphere = rg.Sphere(pt, 0.2) else: sphere = rg.Sphere(pt, 2) if doc.Objects.AddPoint(pt, attr) != guid.Empty: doc.Objects.AddSphere(sphere, attr) return pt def noneLoopPt(): pt = PtMat(i*math.sin(5*i), i*math.cos(5*i), i) return pt def oneLoopCrv(): pts = [] for x in range(50): y = math.sin(x) * math.sin(i) pts.append(PtMat(5*x, 5*y, 5*i)) crv = rs.AddCurve(pts) return crv def twoLoopCrv(): pts = [] crvs = [] for x in range(30): for y in range(40): a = ( i + math.cos(x/2)*math.sin(y) - math.sin(x/2)*math.sin(2*y) ) * math.cos(x) b = ( i + math.cos(x/2)*math.sin(y) - math.sin(x/2)*math.sin(2*y) ) * math.sin(x) c = 10*math.sin(x/2)*math.sin(y) - math.cos(x/2)*math.sin(2*y) pts.append(PtMat(a, b, c)) crv = rs.AddCurve(pts) crvs.append(crv) return crvs def threeLoopSrf(): # haven't getten any idea to having a good one. return 0 def drawTime(): FPS = 30 last_time = time.time() # setup variables global i i = 3 curves = [] pts = [] # whatever the loop is... while True: # draw animation if dimension == 3: i += 3 else: i += 1 # pause so that the animation runs at 30 fps new_time = time.time() # see how many milliseconds we have to sleep for # then divide by 1000.0 since time.sleep() uses seconds sleep_time = ((1000.0 / FPS) - (new_time - last_time)) / 1000.0 if sleep_time > 0: time.sleep(sleep_time) last_time = new_time if dimension == 2: crv = oneLoopCrv() curves.append(crv) if i > 20: rs.AddLoftSrf(curves) break elif dimension == 3: curves = twoLoopCrv() escape_test() else: pt = noneLoopPt() pts.append(pt) if i > 80: #rs.AddLoftSrf(curves) rs.AddCurve(pts) break escape_test() def main(): drawTime() if __name__ == "__main__": main() Rhino.Python - Swarm Bridge Swarm Behavior + Attractor : Agent methods: 1. Align : Move in the same direction as your neighbours. 2. Cohesion : Remain close to your neighbours. 3. Seperation : Avoid collisions with your neighbours. Attractor methods: (Controlling the shape) From starting points move to target points to create bridge. Using swarm simulation in Grasshopper is in this post: Swarm Python GH Component ...

November 30, 2014 · 11 min · Gene Ting-Chun Kao
Swarm Python Component

Swarm Python Component

Swarm in Grasshopper using GH_Python component. Testing swarm behaviour in Rhino is in this post: Rhino.Python Swarm Bridge For more discussion please visit my post in grasshopper example forum. GH_Python Code: ### --Written by Gene Ting-Chun Kao-- ### ghenv.Component.Message = "written by +GENEATCG" import rhinoscriptsyntax as rs import Rhino as rc from random import * rectX = 600 rectY = 600 class Runner: def __init__(self, p, v): self.p = p self.v = v self.a = rs.VectorCreate( (0,0,0),(0,0,0) ) def ptRun(self): self.v = rs.VectorAdd(self.v, self.a) v = rs.VectorLength(self.v) if v > 2: self.v = rs.VectorScale(rs.VectorUnitize(self.v), 2) self.p = rs.VectorAdd(self.p, self.v) self.a = rs.VectorCreate( (0,0,0),(0,0,0) ) # ... (full code on GitHub)

June 25, 2014 · 1 min · Gene Ting-Chun Kao
LEGO Component for 3D Printing

LEGO Component for 3D Printing

在Rhino3D軟體裡用python程式語言 創造客制化的樂高原件。 LEGO customised components developed through Python script using Rhino 3D software. We can design our own LEGO components via 3D printer. Mouse left click → make LEGO up part Mouse right click → make LEGO down part How it works: Replace any surface with a LEGO unit. Dimensions reference here. Trim a hole. Extrude surfaces. Join all faces.

December 14, 2013 · 1 min · Gene Ting-Chun Kao