BIOARQUITECTURA RICARDO SÁNCHEZ VILLANUEVA
EDIFICIO GENERATIVO DOCUMENTO DE REGLAS ELEMENTOS CUBO, PRISMA DE COLORES RGB,CMY REGLAS
construir
duplicar-mover hacia arriba - rotar 90
supervivencia celular:
el. Actual
vecino
acción
cubo/prisma cubo/prisma cubo cubo prisma cubo/prisma
vacío complementario igual prisma igual otros casos
=muere =muere =prisma =prisma =prisma =vive
Regresar Al Punto 2
12 FUNCIONES fn Rojo X Y Z s= ( ancho=(s/20) as float pos=(s-ancho) as float medio=(s/2) as float --base base=box width:medio length:s height:ancho base.pos=[(-medio/2),0,0] move base [x,y,z] base.material=meditMaterials[9] --balcon!!!! piso=box width:medio length:medio height:ancho piso.pos=[medio/2,(-medio/2),0] move piso [X,Y,Z] techo=box width:medio length:medio height:ancho techo.pos=[(medio/2),(-medio/2),pos] move techo [x,y,z] paredi=box width:ancho length:medio height:s paredi.pos=[(pos/2),(-medio/2),0] move paredi [x,y,z]
paredd=box width:ancho length:medio height:s paredd.pos=[(ancho/2),(-medio/2),0] move paredd [x,y,z] piso.material=meditMaterials[7] techo.material=meditMaterials[7] paredi.material=meditMaterials[7] paredd.material=meditMaterials[7] entrepiso=box width:(medio-2*ancho) length:medio height:(ancho/2) entrepiso.pos=[(medio/2),(-medio/2),medio] move entrepiso [x,y,z] entrepiso.material=meditMaterials[9] --masa bloque=box width:(medio*3/2) length:medio height:s bloque.pos=[(medio/4),(medio/2),0] move bloque [X,Y,Z] techito=box width:(medio/2) length:(medio) height:(ancho/2) techito.pos=[(-medio*3/4),(medio/2),(s-ancho/2)] move techito [X,Y,Z] bloque.material=meditMaterials[9] techito.material=meditMaterials[9] --celocia for I=0 to 19 do ( barra1=box width:(medio/2) length:(ancho/4) height:(ancho/4) barra1.pos=[(-medio+medio/4),0,ancho+ancho*I-ancho/4] move barra1 [X,Y,Z] barra2=box width:(ancho/4) length:(medio) height:(ancho/4) barra2.pos=[(-medio+ancho/8),medio/2,ancho+ancho*I-ancho/4] move barra2 [X,Y,Z]
)
)
barra1.material=meditMaterials[8] barra2.material=meditMaterials[8]
fn Verde X Y Z s= ( ancho=(s/20) as float pos=(s-ancho) as float medio=(s/2) as float --cinta!!! piso=box width:medio length:s height:ancho piso.pos=[(medio/2),0,pos] move piso [X,Y,Z] piso.material=meditMaterials[7] piso2=box width:medio length:medio height:ancho piso2.pos=[(-medio/2),(-medio/2),pos] move piso2 [X,Y,Z] piso2.material=meditMaterials[7] techo=box width:medio length:s height:ancho techo.pos=[(medio/2),0,0] move techo [X,Y,Z]
techo.material=meditMaterials[7] techo2=box width:medio length:medio height:ancho techo2.pos=[(-medio/2),(medio/2),0] move techo2 [X,Y,Z] techo2.material=meditMaterials[7] entrepiso=box width:(medio+ancho/2) length:s height:ancho entrepiso.pos=[(-medio/2+ancho/4),0,(pos/2)] move entrepiso [X,Y,Z] entrepiso.material=meditMaterials[7] pared1=box width:ancho length:medio height:medio pared1.pos=[0,medio/2,medio] move pared1[X,Y,Z] pared1.material=meditMaterials[7] pared2=box width:ancho length:medio height:medio pared2.pos=[0,-medio/2,0] move pared2[X,Y,Z] pared2.material=meditMaterials[7] --cubos de vidrio vidrio1=box width:medio length:medio height:(medio-ancho) vidrio1.pos=[(-medio/2),(medio/2),ancho] move vidrio1 [X,Y,Z] vidrio1.material=meditMaterials[13]
)
vidrio2=box width:medio length:medio height:(medio-ancho) vidrio2.pos=[(-medio/2),(-medio/2),medio] move vidrio2 [X,Y,Z] vidrio2.material=meditMaterials[13]
fn Azul X Y Z s= ( ancho=(s/11) as float pos=(s-ancho) as float medio=(s/2) as float for I=0 to 5 do ( tubo1=box width:s length:ancho height:ancho tubo1.pos=[0,-medio+ancho/2,I*ancho*2] move tubo1 [X,Y,Z] tubo2=box width:ancho length:s height:ancho tubo2.pos=[medio-ancho/2,0,I*ancho*2] move tubo2 [X,Y,Z] tubo3=box width:ancho length:s height:ancho tubo3.pos=[-medio+ancho/2,0,I*ancho*2] move tubo3 [X,Y,Z] tubo4=box width:s length:ancho height:ancho tubo4.pos=[0,medio-ancho/2,I*ancho*2] move tubo4 [X,Y,Z]
)
)
tubo1.material=meditMaterials[8] tubo2.material=meditMaterials[8] tubo3.material=meditMaterials[8] tubo4.material=meditMaterials[8]
fn Cyan X Y Z s= ( ancho=(s/10) as float pos=(s-ancho) as float for I=0 to 2 do ( plano1=box width:ancho length:s height:s plano1.pos=[-ancho*3+ancho*3*I,0,0] move plano1 [X,Y,Z] plano2=box width:s length:ancho height:s plano2.pos=[0,-ancho*3+ancho*3*I,0] move plano2 [X,Y,Z]
)
plano1.material=meditMaterials[9] plano2.material=meditMaterials[9]
) fn Magenta X Y Z s= ( ancho=(s/11) as float pos=(s-ancho) as float medio=(s/2) as float for I=0 to 5 do ( tubo1=box width:s length:ancho height:ancho tubo1.pos=[0,-medio+ancho/2,I*ancho*2] move tubo1 [X,Y,Z] tubo2=box width:ancho length:s height:ancho tubo2.pos=[medio-ancho/2,0,I*ancho*2] move tubo2 [X,Y,Z] tubo3=box width:ancho length:s height:ancho tubo3.pos=[-medio+ancho/2,0,I*ancho*2] move tubo3 [X,Y,Z] tubo4=box width:s length:ancho height:ancho tubo4.pos=[0,medio-ancho/2,I*ancho*2] move tubo4 [X,Y,Z]
)
tubo1.material=meditMaterials[8] tubo2.material=meditMaterials[8] tubo3.material=meditMaterials[8] tubo4.material=meditMaterials[8]
) fn Amarillo X Y Z s= ( ancho=(s/20) as float pos=(s-ancho) as float medio=(s/2) as float --cinta!!!! piso=box width:s length:s height:ancho piso.pos=[0,0,0] move piso [X,Y,Z]
entrepiso=box width:s length:s height:ancho entrepiso.pos=[0,0,(pos/2)] move entrepiso [x,y,z] techo=box width:s length:s height:ancho techo.pos=[0,0,pos] move techo [x,y,z] paredi=box width:ancho length:s height:medio paredi.pos=[(pos/2),0,0] move paredi [x,y,z] paredd=box width:ancho length:s height:medio paredd.pos=[(-pos/2),0,(pos/2)] move paredd [x,y,z] piso.material=meditMaterials[7] entrepiso.material=meditMaterials[7] techo.material=meditMaterials[7] paredi.material=meditMaterials[7] paredd.material=meditMaterials[7]
for I=0 to 8 do ( varilla1=box width:(ancho/2) length:medio height:(ancho/2) varilla1.pos=[(medio/3-ancho+ancho/4),0,ancho*I] move varilla1 [X,Y,Z+(medio+ancho/2)] varilla1.material=meditMaterials[8] varilla2=box width:(s*2/3-ancho) length:(ancho/2) height:(ancho/2) varilla2.pos=[(-medio/3),(medio-ancho/2)-(medio/2-ancho/4),(ancho*I)] move varilla2 [X,Y,Z+(medio+ancho/2)] varilla2.material=meditMaterials[8]
)
varilla3=box width:(s*2/3-ancho) length:(ancho/2) height:(ancho/2) varilla3.pos=[(-medio/3),-(medio-ancho/2)+(medio/2-ancho/4),(ancho*I)] move varilla3 [X,Y,Z+(medio+ancho/2)] varilla3.material=meditMaterials[8]
for I=0 to 8 do ( varilla1=box width:(ancho/2) length:medio height:(ancho/2) varilla1.pos=[(-medio/3+ancho-ancho/4),0,ancho*I] move varilla1 [X,Y,Z+ancho] varilla1.material=meditMaterials[8] varilla2=box width:(s*2/3-ancho) length:(ancho/2) height:(ancho/2) varilla2.pos=[(medio/3),(medio-ancho/2)-(medio/2-ancho/4),(ancho*I)] move varilla2 [X,Y,Z+ancho] varilla2.material=meditMaterials[8]
)
)
varilla3=box width:(s*2/3-ancho) length:(ancho/2) height:(ancho/2) varilla3.pos=[(medio/3),-(medio-ancho/2)+(medio/2-ancho/4),(ancho*I)] move varilla3 [X,Y,Z+ancho] varilla3.material=meditMaterials[8]
--prismas............................................................................ fn RojoP X Y Z s= ( ancho=(s/10) as float pos=(s-ancho) as float
)
cubo1=box width:s length:s height:s move cubo1 [X,Y,Z] cubo1.material=meditMaterials[14]
fn VerdeP X Y Z s= ( ancho=(s/10) as float pos=(s-ancho) as float medio=(s/2) as float plano1=box width:s length:s height:ancho plano1.pos=[0,0,0] move plano1 [X,Y,Z] plano2=box width:s length:s height:ancho plano2.pos=[0,0,pos] move plano2 [X,Y,Z] plano3=box width:medio length:ancho height:s plano3.pos=[0,pos/2,0] move plano3 [X,Y,Z] plano4=box width:medio length:ancho height:s plano4.pos=[0,-pos/2,0] move plano4 [X,Y,Z] vidrio=box width:medio length:pos height:pos vidrio.pos=[0,0,0] move vidrio [X,Y,Z]
)
plano1.material=meditMaterials[9] plano2.material=meditMaterials[9] plano3.material=meditMaterials[9] plano4.material=meditMaterials[9] vidrio.material=meditMaterials[14]
fn AzulP X Y Z s= ( ancho=(s/10) as float pos=(s-ancho) as float medio=(s/2) as float plano1=box width:s length:s height:ancho plano1.pos=[0,0,0] move plano1 [X,Y,Z] plano2=box width:s length:s height:ancho plano2.pos=[0,0,pos] move plano2 [X,Y,Z] plano3=box width:medio length:ancho height:s plano3.pos=[0,pos/2,0] move plano3 [X,Y,Z] plano4=box width:medio length:ancho height:s
plano4.pos=[0,-pos/2,0] move plano4 [X,Y,Z] vidrio=box width:medio length:pos height:pos vidrio.pos=[0,0,0] move vidrio [X,Y,Z] plano1.material=meditMaterials[9] plano2.material=meditMaterials[9] plano3.material=meditMaterials[9] plano4.material=meditMaterials[9] vidrio.material=meditMaterials[14] ) fn CyanP X Y Z s= ( ancho=(s/10) as float pos=(s-ancho) as float medio=(s/2) as float plano1=box width:s length:s height:ancho plano1.pos=[0,0,0] move plano1 [X,Y,Z] plano2=box width:s length:s height:ancho plano2.pos=[0,0,pos] move plano2 [x,y,z] plano3=box width:medio length:ancho height:s plano3.pos=[0,pos/2,0] move plano3 [X,Y,Z] plano4=box width:medio length:ancho height:s plano4.pos=[0,-pos/2,0] move plano4 [X,Y,Z] vidrio=box width:medio length:pos height:pos vidrio.pos=[0,0,0] move vidrio [X,Y,Z]
)
plano1.material=meditMaterials[8] plano2.material=meditMaterials[8] plano3.material=meditMaterials[8] plano4.material=meditMaterials[8] vidrio.material=meditMaterials[13]
fn MagentaP X Y Z s= ( ancho=(s/10) as float pos=(s-ancho) as float medio=(s/2) as float plano1=box width:s length:s height:ancho plano1.pos=[0,0,0] move plano1 [X,Y,Z] plano2=box width:s length:s height:ancho plano2.pos=[0,0,pos] move plano2 [X,Y,Z] plano3=box width:medio length:ancho height:s
plano3.pos=[0,pos/2,0] move plano3 [X,Y,Z] plano4=box width:medio length:ancho height:s plano4.pos=[0,-pos/2,0] move plano4 [X,Y,Z] vidrio=box width:medio length:pos height:pos vidrio.pos=[0,0,0] move vidrio [X,Y,Z]
)
plano1.material=meditMaterials[9] plano2.material=meditMaterials[9] plano3.material=meditMaterials[9] plano4.material=meditMaterials[9] vidrio.material=meditMaterials[14]
fn AmarilloP X Y Z s= ( cubo1=box width:s length:s height:s move cubo1 [X,Y,Z] cubo1.material=meditMaterials[14] )
SUSTITUCION include "12fun_richie.ms" for obj in objects do ( print obj.material --obtenemos la posicion X Y Z del objeto a sustituir X=obj.pos.x+30 Y=obj.pos.y Z=obj.pos.z s=1.0 sizeX=obj.length sizeY=obj.width sizeZ=obj.height if obj.material == meditMaterials[1] then ( --el cubo rojo if sizeX < sizeZ then RojoP X Y Z s else Rojo X Y Z s ) if obj.material == meditMaterials[3] then ( --el cubo verde if sizeX < sizeZ then VerdeP X Y Z s else Verde X Y Z s )
)
if obj.material == meditMaterials[2] then ( --el cubo azul if sizeX < sizeZ then AzulP X Y Z s else Azul X Y Z s ) if obj.material == meditMaterials[6] then ( --el cubo mag if sizeX < sizeZ then MagentaP X Y Z s else Magenta X Y Z s ) if obj.material == meditMaterials[4] then ( --el cubo cyan if sizeX < sizeZ then CyanP X Y Z s else Cyan X Y Z s ) if obj.material == meditMaterials[5] then ( --el cubo amarillo if sizeX < sizeZ then AmarilloP X Y Z s else Amarillo X Y Z s )
RASCACIELO GENERADO CON SCRIPT
-----variables s=1 as float x=0 as float y=0 as float z=0 as float valor=0 ------generando rasca cielo for x=0 to 7 do ( for y=0 to 7 do ( zz=1 for z=0 to 29 do ( ----valor casual valor=random 1 40 if zz==0 then valor=40
if valor <=18 do ( cubo1= box length:s width:s height:s cubo1.pos=[x,y,z] cubo1.material=meditmaterials[1] ) if valor >18 and valor <38 do ( prisma= box length:(s/2) width:(s/2) height:s prisma.pos=[x,y,z] prisma.material=meditmaterials[2] )
)
)
if valor >=38 do ( zz=0 ) )
FERRATE MAXScript --FUNCION PUENTE-fn ext2 X Y Z s= ( sY=random s 8 altura=random s 11 ancho=(s/10) as float pos=(s-ancho) as float medio=(s/2) as float largo=(s*4) as float --MODULO----plano1= box width:ancho length:sY height:altura plano1.pos=[(-largo+ancho)/2,0,0] move plano1 [X,Y,Z] plano1.material=meditMaterials[1] plano2= box width:ancho length:sY height:altura plano2.pos=[(largo-ancho)/2,0,0] move plano2 [X,Y,Z] plano2.material=meditMaterials[1] techo= box width:largo length:sY height:ancho techo.pos=[0,0,(altura-ancho)] move techo [X,Y,Z] techo.material=meditMaterials[1]
)
--PARED-----caso=random 0 2 if caso == 0 do ( pared1=box width:(largo/2) length:ancho height:altura pared1.pos=[(largo/4),(sY/2),0] move pared1 [X,Y,Z] pared1.material=meditMaterials[2] ) if caso == 2 do ( pared2=box width:(largo/2) length:ancho height:altura pared2.pos=[(-largo/4),(-sY/2),0] move pared2 [X,Y,Z] pared2.material=meditMaterials[2] )
SUSTITUCION include "3.ms" numext2=random 3 7 for Y=0 to numext2 do ( numext=random 4 9 for I=0 to numext do ( dis=random 2 10 s=3.0 ext2 (I*largo+dis*2) (Y*s) 0 s ) )
FERRATE L-SYSTEM
ARBOLES