home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 16
/
CD_ASCQ_16_0994.iso
/
news
/
4613
/
solitair.rrt
< prev
next >
Wrap
Text File
|
1980-01-10
|
7KB
|
435 lines
// Real Ray Tracer
// un jeu de solitaire
// Jean-Guillaume HAMELIN
#include "colors.inc"
#include "textures.inc"
#include "shapes.inc"
//=============================================
// DEFINITION DU PLATEAU
//=============================================
#declare Neuf_Trous = union {
union {
union {
union {
sphere { <-2 0 0.75> 0.5 }
sphere { < 0 0 0.75> 0.5 }
}
union {
sphere { < 2 0 0.75> 0.5 }
sphere { <-2 2 0.75> 0.5 }
}
}
union {
union {
sphere { < 0 2 0.75> 0.5 }
sphere { < 2 2 0.75> 0.5 }
}
union {
sphere { <-2 -2 0.75> 0.5 }
sphere { < 0 -2 0.75> 0.5 }
}
}
}
sphere { < 2 -2 0.75> 0.5 }
}
object {
bound {
difference {
difference {
union {
torus { <+0 +0 +0> <+0 +0 +1> 12 0.5 }
intersection {
Cylinder_Z
slab { <+0 +0 +1> -1 1 }
scale <12 12 0.5>
}
}
union {
torus { <+0 +0 +0.75> <0 0 1> 10 0.5 }
Neuf_Trous
}
}
union {
union {
object { Neuf_Trous translate <-6 0 0> }
object { Neuf_Trous translate < 6 0 0> }
}
union {
object { Neuf_Trous translate <0 -6 0> }
object { Neuf_Trous translate <0 6 0> }
}
}
}
}
by box { <-12.5 -12.5 -0.5> <+12.5 +12.5 +0.5> }
texture {
Jade
ambient 0.2
diffuse 0.6
}
}
//=====================================================
// FIN DE LA DEFINITION DU PLATEAU
//=====================================================
//=====================================================
// DEFINITION DES BILLES
//=====================================================
//=============================
// ligne x=-8
//=============================
object {
bound {
object {
sphere { <-8 -2 +0.75> 0.5 }
texture { Sapphire_Agate }
}
object {
sphere { <-8 +0 +0.75> 0.5 }
texture { Sapphire_Agate }
}
object {
sphere { <-8 +2 +0.75> 0.5 }
texture { Sapphire_Agate }
}
}
by box { <-8.5 -2.5 0.25> <-7.5 2.5 1.25> }
}
//=============================
// ligne x=-6
//=============================
object {
bound {
object {
sphere { <-6 -2 +0.75> 0.5 }
texture { Blood_Marble }
}
object {
sphere { <-6 +0 +0.75> 0.5 }
texture { Blood_Marble }
}
object {
sphere { <-6 +2 +0.75> 0.5 }
texture { Blood_Marble }
}
}
by box { <-6.5 -2.5 0.25> <-5.5 2.5 1.25> }
}
//=============================
// ligne x=-4
//=============================
object {
bound {
object {
sphere { <-4 -2 +0.75> 0.5 }
texture { Pink_Granite }
}
object {
sphere { <-4 +0 +0.75> 0.5 }
texture { Pink_Granite }
}
object {
sphere { <-4 +2 +0.75> 0.5 }
texture { Pink_Granite }
}
}
by box { <-4.5 -2.5 0.25> <-3.5 2.5 1.25> }
}
//=============================
// ligne x=-2
//=============================
object {
bound {
object {
sphere { <-2 -8 +0.75> 0.5 }
texture { White_Marble }
}
object {
sphere { <-2 -6 +0.75> 0.5 }
texture { White_Marble }
}
object {
sphere { <-2 -4 +0.75> 0.5 }
texture { White_Marble }
}
object {
sphere { <-2 -2 +0.75> 0.5 }
texture { White_Marble }
}
object {
sphere { <-2 +0 0.75> 0.5 }
texture { White_Marble }
}
object {
sphere { <-2 +2 +0.75> 0.5 }
texture { White_Marble }
}
object {
sphere { <-2 +4 +0.75> 0.5 }
texture { White_Marble }
}
object {
sphere { <-2 +6 +0.75> 0.5 }
texture { White_Marble }
}
object {
sphere { <-2 +8 +0.75> 0.5 }
texture { White_Marble }
}
}
by box { <-2.5 -8.5 0.25> <-1.5 8.5 1.25> }
}
//=============================
// ligne x=0
//=============================
object {
bound {
object {
sphere { <+0 -8 +0.75> 0.5 }
texture { Gold_Metal }
}
object {
sphere { <+0 -6 +0.75> 0.5 }
texture { Gold_Metal }
}
object {
sphere { <+0 -4 +0.75> 0.5 }
texture { Gold_Metal }
}
object {
sphere { <+0 -2 +0.75> 0.5 }
texture { Gold_Metal }
}
object {
sphere { <+0 +0 +0.75> 0.5 }
texture { Gold_Metal }
}
object {
sphere { <+0 +2 +0.75> 0.5 }
texture { Gold_Metal }
}
object {
sphere { <+0 +4 +0.75> 0.5 }
texture { Gold_Metal }
}
object {
sphere { <+0 +6 +0.75> 0.5 }
texture { Gold_Metal }
}
object {
sphere { <+0 +8 +0.75> 0.5 }
texture { Gold_Metal }
}
}
by box { <-0.5 -8.5 0.25> <+0.5 8.5 1.25> }
}
//=============================
// ligne x=2
//=============================
object {
bound {
object {
sphere { <+2 -8 +0.75> 0.5 }
texture { Chrome_Metal }
}
object {
sphere { <+2 -6 +0.75> 0.5 }
texture { Chrome_Metal }
}
object {
sphere { <+2 -4 +0.75> 0.5 }
texture { Chrome_Metal }
}
object {
sphere { <+2 -2 +0.75> 0.5 }
texture { Chrome_Metal }
}
object {
sphere { <+2 +0 +0.75> 0.5 }
texture { Chrome_Metal }
}
object {
sphere { <+2 +2 +0.75> 0.5 }
texture { Chrome_Metal }
}
object {
sphere { <+2 +4 +0.75> 0.5 }
texture { Chrome_Metal }
}
object {
sphere { <+2 +6 +0.75> 0.5 }
texture { Chrome_Metal }
}
object {
sphere { <+2 +8 +0.75> 0.5 }
texture { Chrome_Metal }
}
}
by box { < 1.5 -8.5 0.25> < 2.5 8.5 1.25> }
}
//=============================
// ligne x=4
//=============================
object {
bound {
object {
sphere { <+4 -2 +0.75> 0.5 }
texture { Brass_Metal }
}
object {
sphere { <+4 +0 +0.75> 0.5 }
texture { Brass_Metal }
}
object {
sphere { <+4 +2 +0.75> 0.5 }
texture { Brass_Metal }
}
}
by box { < 3.5 -2.5 0.25> < 4.5 2.5 1.25> }
}
//=============================
// ligne x=6
//=============================
object {
bound {
object {
sphere { <+6 -2 +0.75> 0.5 }
texture { Red_Marble }
}
object {
sphere { <+6 +0 +0.75> 0.5 }
texture { Red_Marble }
}
object {
sphere { <+6 +2 +0.75> 0.5 }
texture { Red_Marble }
}
}
by box { < 5.5 -2.5 0.25> < 6.5 2.5 1.25> }
}
//=============================
// ligne x=8
//=============================
object {
bound {
object {
sphere { <+8 -2 +0.75> 0.5 }
texture { Blue_Agate }
}
object {
sphere { <+8 +0 +0.75> 0.5 }
texture { Blue_Agate }
}
object {
sphere { <+8 +2 +0.75> 0.5 }
texture { Blue_Agate }
}
}
by box { < 7.5 -2.5 0.25> < 8.5 2.5 1.25> }
}
//=====================================================
// FIN DE LA DEFINITION DES BILLES
//=====================================================
object {
plane { <+0 +0 +1> -0.5 }
texture {
Gold_Metal
}
}
camera {
location <+0 -10 +25>
point_at <+0 +0 +0>
angle 30
}
object {
light_source { <+0 -10 +25> intensity 16
color White }
}
end.