|
|
The glass shape is kinda strange because it's supposed to have a handle on
it, but I never got around to doing that since I wanted the glass to
begenerated by a couple dimensions (everything I did CSG back then was like
that). The way it is now though are the same dimensions as the one I got
for being a groomsman for a friend (minus 1 or 2 details).
Since you all like the tile surface so much here's the code for that.
#declare side = 4;
#declare R1 = seed(19);
#declare tile=
object{
#if(!quick_render)
superellipsoid{<.05,.05>}
#else
box {<-1,-1,-1>,<1,1,1>}
#end
scale <side/2,.125,side/2>*.99
}
#declare m_tile=
material{
texture{
T_Stone26
finish{
Phong_Shiny
reflection { 0.5 , 1.0
fresnel on
metallic 0.8
}
conserve_energy
}
translate rand(R1)*10 scale 2
}
}
#macro Tile_Surface (xdir,zdir)
#local CountX=0;
#while (CountX<xdir)
#local CountZ=0;
#while (CountZ<zdir)
object{
tile
translate <((xdir-1)/2)*(side+.1)-CountX*(side+.1)
,0,((zdir-1)/2)*(side+.1)-CountZ*(side+.1)>
#if (!quick_render)
material{m_tile}
#else
pigment{Red}
#end
}
#local CountZ=CountZ+1;
#end
#local CountX=CountX+1;
#end
box{ // grouting
<-((xdir)/2)*(side+.1),0,-((zdir)/2)*(side+.1)>,
<((xdir)/2)*(side+.1),.09,((zdir)/2)*(side+.1)>
pigment{Gray}
#if(!quick_render)
normal{granite scale .1} finish{Phong_Shiny}
#end
}
#end
#declare x_tiles=10;
#declare z_tiles=10;
#declare tbl_srfc=
union{
intersection{
union{
Tile_Surface(x_tiles,z_tiles) translate <0,-.12376,0>
}
cylinder{<0,-2,0>,<0,2,0>,1 // bounding for table surface
scale <x_tiles*side/2,1,z_tiles*side/2>
}
}
torus{5*side,.15 scale <1,2,1> translate y*-.3 texture{T_Wood24}} // edge
}
#if (obj_table)
object{
tbl_srfc
pigment{Black}
translate <-.5,80,-1>
}
#end
Post a reply to this message
|
|