{ Navigation } | { Deutsch | English } | |||
NewsGamesMinesweeperMastermindSliding Tiles PuzzleMemoryTic Tac ToeTetrisSokobanSnakePacmanOthelloSameGameRoadBlocksLights OutHighscoresCool StuffTeamTeam - MiselTeam - LXJS-Games FAQGuestbookDisclaimer |
coolstuff/tetris.txt//usual stuff
#include "colors.inc"
camera { location <18,14,-20>
look_at <0,3,0>
}
light_source { < 20, 20, 20> White}
light_source { < 20, 20,-20> White}
light_source { < 20,-20, 20> White}
light_source { < 20,-20,-20> White}
light_source { <-20, 20, 20> White}
light_source { <-20, 20,-20> White}
light_source { <-20,-20, 20> White}
light_source { <-20,-20,-20> White}
//the white background
#declare bg = union
{
plane { y, -200}
plane { z, 200}
plane { x, -200}
pigment { color White}
}
//a coordinate system for a better orientation
#declare cood = union
{
//y
cylinder { <0,-5,0>
<0,5,0>
0.005
pigment { color Blue}
}
//x
cylinder { <-5,0,0>
<5,0,0>
0.005
pigment { color Green}
}
//z
cylinder { <0,0,-5>
<0,0,5>
0.005
pigment { color Red}
}
}
#declare dice_color = color Blue;
#declare hole_color = color Magenta;
#declare cutoffside = difference
{
box { <-5,-0.5,-0.5>
< 5, 0.5, 0.5>
texture {pigment {color hole_color}}
}
cylinder { <-6,-0.5,0.5>
< 6,-0.5,0.5>
0.5
texture {pigment {dice_color}
finish {phong 0.5}}
}
}
#declare cutoffcorner = difference
{
box { <-0.5,-0.5,-0.5>
< 0.5, 0.5, 0.5>
texture {pigment {color hole_color}}
}
sphere { < 0.5,-0.5,0.5>
0.5
texture {pigment {color dice_color}
finish {phong 0.5}}
}
}
#declare cutoff = union
{
object {cutoffside rotate < 0, 0, 0> translate < 0, 4,-4>}
object {cutoffside rotate <-90, 0, 0> translate < 0,-4,-4>}
object {cutoffside rotate < 90, 0, 0> translate < 0, 4, 4>}
object {cutoffside rotate <180, 0, 0> translate < 0,-4, 4>}
object {cutoffside rotate < 0, 90, 0> translate <-4, 4, 0>}
object {cutoffside rotate <-90, 90, 0> translate <-4,-4, 0>}
object {cutoffside rotate < 90, 90, 0> translate < 4, 4, 0>}
object {cutoffside rotate <180, 90, 0> translate < 4,-4, 0>}
object {cutoffside rotate < 0,180, 90> translate <-4, 0, 4>}
object {cutoffside rotate < 0, 0, 90> translate <-4, 0,-4>}
object {cutoffside rotate < 0,180, -90> translate < 4, 0, 4>}
object {cutoffside rotate < 0, 0, -90> translate < 4, 0,-4>}
object {cutoffcorner rotate < 0,180, 0> translate < 4, 4, 4>}
object {cutoffcorner rotate < 0,-90, 0> translate < 4, 4,-4>}
object {cutoffcorner rotate < 0,180,-90> translate < 4,-4, 4>}
object {cutoffcorner rotate <-90,-90, 0> translate < 4,-4,-4>}
object {cutoffcorner rotate < 0, 90, 0> translate <-4, 4, 4>}
object {cutoffcorner rotate < 0, 0, 0> translate <-4, 4,-4>}
object {cutoffcorner rotate < 0, 90, 90> translate <-4,-4, 4>}
object {cutoffcorner rotate < 0, 0, 90> translate <-4,-4,-4>}
}
#declare dice = union
{
box { <-4,-4,-4>
< 4, 4, 4>
texture {pigment {color dice_color}
finish {phong 0.5}
}
}
}
#declare wuerfel = difference
{
object {dice}
object {cutoff}
}
object {bg}
object {wuerfel}
object {wuerfel translate <-8,0,0>}
object {wuerfel translate <-8,8,0>}
object {wuerfel translate <8,0,0>}
|
|||