{ Navigation } | { Deutsch | English } | |||
NeuigkeitenSpieleMinesweeperMastermindSchiebepuzzleMemoryTic Tac ToeTetrisSokobanSnakePacmanOthelloSameGameRoadBlocksLichter ausHighscoresCool StuffTeamTeam - MiselTeam - LXJS-Games FAQGästebuchRechtliches |
coolstuff/play.txt//usual stuff
#include "colors.inc"
camera { location <10,10,-10>
look_at <0,0,0>
}
light_source {
<-8, 8, 8>
color White
shadowless
}
light_source {
<8, -8, 8>
color White
shadowless
}
light_source {
<-8, -8, 8>
color White
shadowless
}
light_source {
<8, 8, -8>
color White
shadowless
}
light_source {
<-8, 8, -8>
color White
shadowless
}
light_source {
<-8, -8, -8>
color White
shadowless
}
//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 number_holes = union
{
//1********
sphere { <-4 ,0 , 0>,0.75}
//2********
sphere { <-1.5,-1.5, -4>,0.75}
sphere { < 1.5, 1.5, -4>,0.75}
//3********
sphere { <-2, -4, -2>,0.75}
sphere { < 2, -4, 2>,0.75}
sphere { < 0, -4, 0>,0.75}
//4********
sphere { <-2, 4, -2>,0.75}
sphere { <-2, 4, 2>,0.75}
sphere { < 2, 4, -2>,0.75}
sphere { < 2, 4, 2>,0.75}
//5********
sphere { <-2, -2, 4>,0.75}
sphere { < 2, 2, 4>,0.75}
sphere { < 0, 0, 4>,0.75}
sphere { <-2, 2, 4>,0.75}
sphere { < 2, -2, 4>,0.75}
//6********
sphere { < 4,-2.25,-1.5>,0.75}
sphere { < 4,-2.25, 1.5>,0.75}
sphere { < 4, 0,-1.5>,0.75}
sphere { < 4, 0, 1.5>,0.75}
sphere { < 4, 2.25,-1.5>,0.75}
sphere { < 4, 2.25, 1.5>,0.75}
texture {pigment {color hole_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>}
object {number_holes}
}
#declare dice = union
{
box { <-4,-4,-4>
< 4, 4, 4>
texture {pigment {color dice_color}
finish {phong 0.5}
}
}
}
//object {bg}
difference
{
object {dice}
object {cutoff}
rotate < -clock*360, -clock*360-120, -clock*360-240>
}
|
|||