- コース紹介
- 講師紹介
- 事例紹介
- Rhino / Grasshopper の基本操作
- ブログ登録
- Ghpython 基礎
ジェネラティヴ とは?
ジェネラティヴ な表現?
ジェネラティヴ デザイン?
python code 1:
import rhinoscriptsyntax as rs import Rhino.Geometry as rg import random for i in range(500): x = random.randint(-10,10) y = random.randint(-10,10) p1 = rg.Point3d(x,y,0) dist = rs.Distance(p1,[0,0,0]) z = random.randint(1,20) p2 = rg.Point3d(x,y,z) line = rs.AddLine(p1,p2) rs.AddPipe(line,0,0.5,0,2)
python code 2:
import rhinoscriptsyntax as rs import Rhino.Geometry as rg import random random.seed(1) objs = [] for i in range(int(x)): x = random.randint(-10,10) y = random.randint(-10,10) p1 = rg.Point3d(x,y,0) dist = rs.Distance(p1,[0,0,0]) z = random.randint(1,20) p2 = rg.Point3d(x,y,z) line = rs.AddLine(p1,p2) pipe = rs.AddPipe(line,0,0.5,0,2) objs.extend(pipe) a = objs
Comments are closed.