++++ culagovski.net

Rhinos and pythons, oh my.

27 June 2009

capture.PNG

#using Rhino5 WIPfrom rhino import curve
from rhino import surface
import math

def pnt(i,j,k):
   x = math.sin(i)*100
   y = math.cos(i+k)*100
   return [x,y,k*5]
crvs=[]
for z in range(0,100,15):
  pts = [pnt(i,j,z) for i in range(10)]
  crvs.append(rhino.AddInterpCurve(pts))

surface.AddLoftSrf(crvs)
rhino.Redraw()

Rhino + Grasshopper + Python

6 October 2008

Have been trying some things using the latest Grasshopper Beta with scripting support, using Python. It’s an interesting middle ground between the simplicity and straightforwardness of Grasshopper’s interface and the flexibility and power of Python.

The example is a simple parametric surface paneller, that recursively divides a surface according to its Gaussian curvature. The more curved areas get progressively smaller divisions. I use scripting to handle recursion, and Grasshopper component for all the geometry, sliders, etc.

Requires the version of GH Beta that supported Python (not sure what number it was). Files: gauss.zip

screenhunter_06-oct-06-0955.jpg

Grasshopper canvas

from RMA.OpenNURBS import *
A = []
B = []
C = []
D = []

def sub(u,v, depth, ud, vd):
  if u>=maxu or v>=maxv:
    return ""
  if depth < 2:
    A.append(On3dPoint(u,v,0))
    B.append(On3dPoint(u+ud,v,0))
    C.append(On3dPoint(u+ud,v+vd,0))
    D.append(On3dPoint(u,v+vd,0))
  else:
    ud/=2
    vd/=2
    for center in ((u,v),(u+ud,v),(u+ud,v+vd),(u,v+vd)):
      u,v = center
      sub(u,v,depth-1, ud, vd)

u = uv.x
v = uv.y
depth = int(G*j)
ud=(maxu-minu)/i
vd=(maxv-minv)/i
sub(u,v,depth,ud,vd)

Maya2008 + Pymel

7 July 2008

Pymel fixes Maya’s python API.

A first simple experiment, populating a NURBS surface using its UV coordinates.

capt_1.jpg

capt_4.jpg

from __future__ import division

usub = 7
vsub = 20
usize = 8
vsize = 1
depth = 0.5

surfs = selectedNodes()

def pt(surf,u,v):
	return pointOnSurface( surf, u=usize*u/usub, v=vsize*v/vsub)

for surf in surfs:
	for u in range(usub):
		for v in range(vsub):
			pt1 = pt(surf,u,v)
			pt2 = pt(surf,u+1,v)
			pt3 = pt(surf,u+1,v+1)
			pt4 = pt(surf,u,v+1)
			c=curve(p=[pt1,pt2,pt3,pt4,pt1])
			extrude (c, et = 0, upn=True, l= depth)

Much simpler than MEL or the native Python implementation, easier to learn than RhinoScript and more powerful than MaxScript.

Some ideas

3 January 2008

1

genetic housing layout system. Would create and distribute houses on a 3d landscape, mutating and mixing parameters such as:

  • plan layout
  • height/plan surface
  • size
  • orientation
  • etc.

The fitness function would be a mix of some cost/area calculation and a measure of the negative externalities created by each house, sort of a neighborhood good will indicator. It would be more expensive to be too far away from other houses (urbanization costs), which should create some sort of balance.

Posted in Uncategorized

3d Isovist Paper

19 December 2007

I recently published a paper on 3d isovist analysis at the 2007 SIGraDi conference in Mexico. The illustrations are in greyscale and they screwed up some of the notation (basically, not rendering any sub- or super-scripts).

As the paper points out, this is not a configurational analysis or a complete one, but the fact that it uses a sample of the possible lines of sight allows it to run in polynomial time O(n2).

The paper can be downloaded here or read online using Issuu:

Thesis in online reader thingie.

12 December 2007

If you wish, you can read my thesis online using this little Issuu widget (yeah, I know, stupid 2.0 name, it’s still pretty slick). You can page through the tiny version using the arrows, or click on a page to pop open a full reader (which can even be put into fullscreen mode).

Posted in gadget, thesis

Thesis!

19 October 2007

Finished writing my thesis (!). PDF here. In spanish.

It’s basically about:

  • Definition of “weak heritage” as the elements of a city that make up its character but aren’t part of its “strong” heritage such as churches, avenues, etc. The weak heritage of a city includes individual houses, public spaces, small shops and other anonymous elements that make up the fabric of the city.
  • A three dimensional visibility graph analysis model,written in maxscript and python, that allows one to input a 3d mesh of the area one wishes to study and produces a series of graph centrality and clustering measurements.
  • An application of points 1 & 2 to Valparaíso, Chile.

con_11.jpg

Data correlation graphs on ‘many eyes’

30 August 2007

many eyes visualization

A graph I made on many eyes that lets you visualize the correlation between the number of flickr photos per node and visibility graph network centrality measurements for Valparaiso. It’s interactive, you can change the X and Y axes content, etc. Fairly cool.

GeoTagCloud

26 August 2007

A geolocated tag-cloud for all the flickr photographs that have been placed within Valparaiso, Chile. The size of the text relates to the frequency of use of each tag in each position (not the overall frequency). This is part of my MArch thesis, and makes use of James Clarke’s flicker.py to retrieve the data.

geotagcloud, valparaiso

If you look at the full size version, you can make out the streets in a light grey line. The light-blue area is the bay.

What I think is interesting is the way this constitutes a distributed, spontaneous semantic layer in actual space. It would be cool if you could have people generate these tags in real time, without photographs as intermediaries.

My next step is to correlate this data with the 3D Visibility Graph Analysis.

Cited in Brazil

10 August 2007

I just found an online reference to one of my papers (co-written with Sebastián Guevara), in Portuguese: “Sigradi 2006 - Santiago de Chile Um novo paradigma para o uso da informática na arquitetura“.

Posted in cite