2 years ago
20100717
Thesis Midreview
Posted by Jonathon Stahl at 7/17/2010 Labels: devyn weiser, exsite, peter testa, thesis 0 comments20100709
20100620
Cellstacker rev01.
Posted by Jonathon Stahl at 6/20/2010 Labels: python, scripting 0 comments
I think this is my first from-scratch script back when I was learning under Roland Snooks for a second. This only half of it, the rest is on a different machine, which I will update when I get a chance. It's a fun one, though. Harmless face splitting and randomizing.
import maya.cmds as mc
from random import *
from math import *
def cellStacker():
splits = 7
#create a tower
tower = mc.polyCube(w=10, d=60, h=13)
gens = 1
mc.select(cl=True)
mc.select(tower[0] +'.e[6]', r=True)
mc.select(tower[0] +'.e[7]', add=True)
mc.select(tower[0] +'.e[10]', add=True)
mc.select(tower[0] +'.e[11]', add=True)
mc.polySplitRing(stp=2, div= splits, sma=0.0)
#recursively toss in edge loops at controlled random
#find new max number of edges and create selection set, kink up the edges
maxEdges = 12 + (splits*8)
for i in range (0,maxEdges):
mc.select(cl=True)
edge = mc.select(tower[0] + '.e[%d]' % randint(0,(0.5*maxEdges)), r=True)
mc.move(random(), random(), 0.125, r=True)
mc.select(cl=True)
#add divisions to panelize new faces, triangulate, quadrangulate, then triangulate random?
mc.select(tower, r=True)
mc.polyTriangulate()
mc.polySubdivideFacet(m=0)
#calculate another new number of max.Edges (after triangulations, then after quads)
#newMaxEdges = maxEdges + 2 + (4 * (splits + 1)) <---for 3x, after 3x*4x -----> newMaxEdges = maxEdges + 16 + (64 * (splits +1))
finalMaxEdge = (2 * maxEdges) + 16 + (32 * (splits +1))
#calculate number of maxFaces to modify now (after triangulations + quads), mult. factor determines ratio
maxFaces = (finalMaxEdge)/2
maxFaceRatio = maxFaces * 0.6
#print finalMaxEdge
#print maxFaceRatio
for j in range(0,maxFaceRatio):
if (j > 0):
face = mc.select(tower[0] + '.f[%d]' % randint(0,(maxFaces)), r=True)
ranDiv = randint(1,2)
mc.polySubdivideFacet(m=1, dv=ranDiv)
#double extrusion on faces to create lattice work
#sub-d, then select edges at random, partial smooth
print 'end function'
cellStacker()
import maya.cmds as mc
from random import *
from math import *
def cellStacker():
splits = 7
#create a tower
tower = mc.polyCube(w=10, d=60, h=13)
gens = 1
mc.select(cl=True)
mc.select(tower[0] +'.e[6]', r=True)
mc.select(tower[0] +'.e[7]', add=True)
mc.select(tower[0] +'.e[10]', add=True)
mc.select(tower[0] +'.e[11]', add=True)
mc.polySplitRing(stp=2, div= splits, sma=0.0)
#recursively toss in edge loops at controlled random
#find new max number of edges and create selection set, kink up the edges
maxEdges = 12 + (splits*8)
for i in range (0,maxEdges):
mc.select(cl=True)
edge = mc.select(tower[0] + '.e[%d]' % randint(0,(0.5*maxEdges)), r=True)
mc.move(random(), random(), 0.125, r=True)
mc.select(cl=True)
#add divisions to panelize new faces, triangulate, quadrangulate, then triangulate random?
mc.select(tower, r=True)
mc.polyTriangulate()
mc.polySubdivideFacet(m=0)
#calculate another new number of max.Edges (after triangulations, then after quads)
#newMaxEdges = maxEdges + 2 + (4 * (splits + 1)) <---for 3x, after 3x*4x -----> newMaxEdges = maxEdges + 16 + (64 * (splits +1))
finalMaxEdge = (2 * maxEdges) + 16 + (32 * (splits +1))
#calculate number of maxFaces to modify now (after triangulations + quads), mult. factor determines ratio
maxFaces = (finalMaxEdge)/2
maxFaceRatio = maxFaces * 0.6
#print finalMaxEdge
#print maxFaceRatio
for j in range(0,maxFaceRatio):
if (j > 0):
face = mc.select(tower[0] + '.f[%d]' % randint(0,(maxFaces)), r=True)
ranDiv = randint(1,2)
mc.polySubdivideFacet(m=1, dv=ranDiv)
#double extrusion on faces to create lattice work
#sub-d, then select edges at random, partial smooth
print 'end function'
cellStacker()
Fun with arduinos!
Posted by Jonathon Stahl at 6/20/2010 0 comments
Interesting class last semester, really opened my eyes up to physical computing and its potentials for interactive design, new modes of interfacing, sensors, etc.
Playing with the brownians.
Posted by Jonathon Stahl at 6/20/2010 Labels: scripting 0 comments
Brownian movement can sometimes become exciting. Old script tinkering...and one might ask themselves, "Is that DOf on a screenshot?!" Oh yeah!
Subscribe to:
Posts (Atom)






















