Fractal Cow
The Fractal Cow projects the contradictory vision of contemporary architecture that fractal spaces of nature are being replaced by the artificial fractal spaces of our society.
The conditions of our world’s interconnected, hyperactive and dense space can be explored as we perceive it, with its inherent fractal dimensions and qualities exceeding the Cartesian concept of space that has dominated architecture and sculpture.
The underlying structure and labyrinthine networks of the city’s architecture are artificial representations of the forms of nature and threaten to obliterate natural environments and vegetation at the same time.
Fractal Cow was our entry for the CowParade Budapest 2006, but it didn’t get chosen.
Source Code
The Fractalize Blender script developed to create the fractal structure is released under the GPL license. The script was created for Blender version 2.41.
from Blender import *
def getChildren(obj):
return filter(lambda x: x.parent==obj, Object.Get())
def duplicate_linked(orig):
scene = Scene.getCurrent()
type = orig.getType()
dup = Object.New(type)
dup.shareFrom(orig)
scene.link(dup)
dup.setMatrix(orig.getMatrix())
scene.update(1)
return dup
def info(obj):
euler = obj.getEuler()
invmat = obj.getInverseMatrix()
loc = obj.getLocation()
worldmat = obj.getMatrix('worldspace')
localmat = obj.matrixLocal # getMatrix('localspace')
print 'euler:', euler
print 'loc:', loc
print 'worldmat:', worldmat
print 'localmat:', localmat
print 'invmat:', invmat
def add_level(obj_list, level):
if level <= 0:
return
for o in obj_list:
o_invmat = o.getInverseMatrix()
o_size = o.getSize()
children = getChildren(o)
for base in children:
i = 1
base_mat = base.getMatrix()
base_size = base.getSize()
base_name = base.getName()
for c in children:
d = duplicate_linked(o)
d.setName(base_name + '.%03d' % i)
i += 1
c_mat = c.getMatrix()
c_size = c.getSize()
r = o_invmat*c_mat
s_size = (c_size[0]/o_size[0], c_size[1]/o_size[1],
c_size[2]/o_size[2])
d.setMatrix(base_mat*r)
d.setSize(base_size[0]*s_size[0], base_size[1]*s_size[1],
base_size[2]*s_size[2])
c.makeParent([d], 0, 1)
add_level(children, level-1)
def fractalize():
obj_list = Object.GetSelected()
if not obj_list:
raise ValueError, 'no selected object'
add_level(obj_list, 2)
fractalize()
Credits
idea: Gábor Csordás, Gábor Papp
modelling & programming: Gábor Papp
This work is licensed under a Creative Commons Attribution-NonCommercial 3.0 Unported License.