home *** CD-ROM | disk | FTP | other *** search
/ Mega A/V / mega_av.zip / mega_av / GRAPHUTL / POVSCN.ZIP / LEVEL3.ZIP / CHESS.POV < prev    next >
Text File  |  1992-07-03  |  15KB  |  701 lines

  1. // Persistence Of Vision raytracer version 1.0 sample file.
  2.  
  3. // By Ville Saari
  4. // Copyright (c) 1991 Ferry Island Pixelboys
  5.  
  6. /*
  7. *
  8. * POV-Ray scene description for chess board.
  9. * Created: 01-Feb-91
  10. * Updated: 02-Mar-91
  11. *
  12. * This scene has 430 primitives in objects and 41 in bounding shapes and
  13. * it takes over 40 hours to render by standard amiga.
  14. *
  15. * If you do some nice modifications or additions to this file, please send 
  16. * me a copy. My Internet address is:
  17. *
  18. *         vsaari@niksula.hut.fi
  19. */
  20.  
  21. #include "shapes.inc"
  22. #include "colors.inc"
  23. #include "textures.inc"
  24.  
  25. camera {
  26.    location <59 20 -48>
  27.    direction <0 0 1>
  28.    up <0 1 0>
  29.    right <1.33 0 0>
  30.    look_at <0 0 1>
  31. }
  32.  
  33. object {
  34.    light_source { <800 600 -200>
  35.       colour White
  36.    }
  37. }
  38.  
  39. #declare Pawn = union {
  40.    sphere { <0 7 0> 1.5 }
  41.  
  42.    quadric { Ellipsoid 
  43.       scale <1.2 0.3 1.2>
  44.       translate <0 5.5 0>
  45.    }
  46.  
  47.    intersection {
  48.       plane { <0 1 0> 5.5 }
  49.       quadric { Hyperboloid_Y
  50.          translate <0 5 0>
  51.          scale <0.5 1 0.5>
  52.       }
  53.       plane { <0 -1 0> -2.5 }
  54.    }
  55.  
  56.    quadric { Ellipsoid 
  57.       scale <2 0.5 2>
  58.       translate <0 2.3 0>
  59.    }
  60.  
  61.    intersection {
  62.       sphere { <0 0 0> 2.5 }
  63.       plane { <0 -1 0> 0 }
  64.    }
  65. }
  66.  
  67. #declare Rook = union {
  68.    intersection {
  69.       union {
  70.          plane { < 1 0 0> -0.5 }
  71.          plane { <-1 0 0> -0.5 }
  72.          plane { < 0 1 0>  9   }
  73.       }
  74.  
  75.       union {
  76.          plane { <0 0  1> -0.5 }
  77.          plane { <0 0 -1> -0.5 }
  78.          plane { <0 1  0>  9   }
  79.       }
  80.  
  81.       plane { <0 1 0> 10 }
  82.       quadric { Cylinder_Y scale <2 1 2> }
  83.       quadric { Cylinder_Y scale <1.2 1 1.2> inverse }
  84.       plane { <0 -1 0> -8 }
  85.    }
  86.  
  87.    intersection {
  88.       plane { <0 1 0> 8 }
  89.       quadric { Hyperboloid_Y
  90.          scale <1 1.5 1>
  91.          translate <0 5.401924 0>
  92.       }
  93.       plane { <0 -1 0> -3 }
  94.    }
  95.  
  96.    quadric { Ellipsoid 
  97.       scale <2.5 0.5 2.5>
  98.       translate <0 2.8 0>
  99.    }
  100.  
  101.    intersection {
  102.       sphere { <0 0 0> 3 }
  103.       plane { <0 -1 0> 0 }
  104.    }
  105. }
  106.  
  107. #declare Knight = union {
  108.    intersection {
  109.       quadric { Cylinder_Z
  110.          scale <17.875 17.875 1>
  111.          translate <-18.625 7 0>
  112.          inverse
  113.       }
  114.  
  115.       quadric { Cylinder_Z
  116.          scale <17.875 17.875 1>
  117.          translate <18.625 7 0>
  118.          inverse
  119.       }
  120.  
  121.       quadric { Cylinder_X
  122.          scale <1 5.1 5.1>
  123.          translate <0 11.2 -5>
  124.          inverse
  125.       }
  126.  
  127.       union {
  128.          plane { <0 1 0> 0
  129.             rotate <30 0 0>
  130.             translate <0 9.15 0>
  131.          }
  132.          plane { <0 0 1> 0
  133.             rotate <-20 0 0>
  134.             translate <0 10 0>
  135.          }
  136.       }
  137.  
  138.       union {
  139.          plane { <0 -1 0> 0
  140.             rotate <30 0 0>
  141.             translate <0 7.15 0>
  142.          }
  143.          plane { <0 1 0> 0
  144.             rotate <60 0 0>
  145.             translate <0 7.3 0>
  146.          }
  147.       }
  148.  
  149.       union {
  150.          plane { <0 1 0> 0
  151.             rotate <0 0 -45>
  152.          }
  153.          plane { <0 1 0> 0
  154.             rotate <0 0 45>
  155.          }
  156.          translate <0 9 0>
  157.       }
  158.  
  159.       quadric { Cylinder_Y scale <2 1 2> }
  160.       sphere { <0 7 0> 4 }
  161.    }
  162.  
  163.    quadric { Ellipsoid 
  164.       scale <2.5 0.5 2.5>
  165.       translate <0 2.8 0>
  166.    }
  167.  
  168.    intersection {
  169.       sphere { <0 0 0> 3 }
  170.       plane { <0 -1 0> 0 }
  171.    }
  172. }
  173.  
  174. #declare Bishop = union {
  175.    sphere { <0 10.8 0> 0.4 }
  176.  
  177.    intersection {
  178.       union {
  179.          plane { <0 0 -1> -0.25 }
  180.          plane { <0 0  1> -0.25 }
  181.          plane { <0 1  0>  0    }
  182.          rotate <30 0 0>
  183.          translate <0 8.5 0>
  184.       }
  185.  
  186.       quadric { Ellipsoid 
  187.          scale <1.4 2.1 1.4>
  188.          translate <0 8.4 0>
  189.       }
  190.  
  191.       plane { <0 -1 0> -7 }
  192.    }
  193.  
  194.    quadric { Ellipsoid 
  195.       scale <1.5 0.4 1.5>
  196.       translate <0 7 0>
  197.    }
  198.  
  199.    intersection {
  200.       plane { <0 1 0> 7 }
  201.       quadric { Hyperboloid_Y
  202.          scale <0.6 1.4 0.6>
  203.          translate <0 7 0>
  204.       }
  205.       plane { <0 -1 0> -3 }
  206.    }
  207.  
  208.    quadric { Ellipsoid 
  209.       scale <2.5 0.5 2.5>
  210.       translate <0 2.8 0>
  211.    }
  212.  
  213.    intersection {
  214.       sphere { <0 0 0> 3 }
  215.       plane { <0 -1 0> 0 }
  216.    }
  217. }
  218.  
  219. #declare QueenAndKing = union {
  220.    sphere { <0 10.5 0> 1.5 }
  221.  
  222.    intersection {
  223.       union {
  224.          sphere { <1.75 12 0> 0.9 rotate <0 150 0> }
  225.          sphere { <1.75 12 0> 0.9 rotate <0 120 0> }
  226.          sphere { <1.75 12 0> 0.9 rotate <0  90 0> }
  227.          sphere { <1.75 12 0> 0.9 rotate <0  60 0> }
  228.          sphere { <1.75 12 0> 0.9 rotate <0  30 0> }
  229.          sphere { <1.75 12 0> 0.9                   }
  230.          sphere { <1.75 12 0> 0.9 rotate <0  -30 0> }
  231.          sphere { <1.75 12 0> 0.9 rotate <0  -60 0> }
  232.          sphere { <1.75 12 0> 0.9 rotate <0  -90 0> }
  233.          sphere { <1.75 12 0> 0.9 rotate <0 -120 0> }
  234.          sphere { <1.75 12 0> 0.9 rotate <0 -150 0> }
  235.          sphere { <1.75 12 0> 0.9 rotate <0 180 0> }
  236.          inverse
  237.       }
  238.  
  239.       plane { <0 1 0> 11.5 }
  240.  
  241.       quadric { QCone_Y
  242.          scale <1 3 1>
  243.          translate <0 5 0>
  244.       }
  245.  
  246.       plane { <0 -1 0> -8 }
  247.    }
  248.  
  249.    quadric { Ellipsoid 
  250.       scale <1.8 0.4 1.8>
  251.       translate <0 8 0>
  252.    }
  253.  
  254.    intersection {
  255.       plane { <0 1 0> 8 }
  256.       quadric { Hyperboloid_Y
  257.          scale <0.7 1.6 0.7>
  258.          translate <0 7 0>
  259.       }
  260.       plane { <0 -1 0> -3 }
  261.    }
  262.  
  263.    quadric { Ellipsoid 
  264.       scale <2.5 0.5 2.5>
  265.       translate <0 2.8 0>
  266.    }
  267.  
  268.    intersection {
  269.       sphere { <0 0 0> 3 }
  270.       plane { <0 -1 0> 0 }
  271.    }
  272. }
  273.  
  274. #declare Queen = union {
  275.    sphere { <0 12.3 0> 0.4 }
  276.    union { QueenAndKing }
  277. }
  278.  
  279. #declare King = union {
  280.    intersection {
  281.       union {
  282.          intersection {
  283.             plane { <0  1 0>  13 }
  284.             plane { <0 -1 0> -12.5 }
  285.          }
  286.  
  287.          intersection {
  288.             plane { < 1 0 0> 0.25 }
  289.             plane { <-1 0 0> 0.25 }
  290.          }
  291.       }
  292.  
  293.       plane { < 0  0  1>   0.25 }
  294.       plane { < 0  0 -1>   0.25 }
  295.       plane { < 1  0  0>   0.75 }
  296.       plane { <-1  0  0>   0.75 }
  297.       plane { < 0  1  0>  13.5  }
  298.       plane { < 0 -1  0> -11.5  }
  299.    }
  300.  
  301.    union { QueenAndKing }
  302. }
  303.  
  304. #declare WWood = texture {
  305.    wood
  306.    turbulence 0.1
  307.    colour_map {
  308.       [ 0.0 0.35 colour red 0.7  green 0.4
  309.       colour red 0.7  green 0.4  ]
  310.       [ 0.35 1.0 colour red 0.95 green 0.62
  311.       colour red 0.95 green 0.62 ]
  312.    }
  313.    scale <0.6 1000.0 0.6>
  314.    translate <200.0 0.0 100.0>
  315.    specular 1
  316.    roughness 0.02
  317. }
  318.  
  319. #declare BWood = texture {
  320.    wood
  321.    turbulence 0.1
  322.    colour_map {
  323.       [ 0.0 0.55 colour red 0.45 green 0.25
  324.       colour red 0.45 green 0.25 ]
  325.       [ 0.55 1.0 colour red 0.30 green 0.16
  326.       colour red 0.30 green 0.16 ]
  327.    }
  328.    scale <0.6 1000.0 0.6>
  329.    translate <100.0 0.0 -200.0>
  330.    specular 1
  331.    roughness 0.02
  332. }
  333.  
  334. #declare WPawn = object {
  335.    union { Pawn }
  336.  
  337.    bounded_by {
  338.       sphere { <0 4 0> 4.72 }
  339.    }
  340.  
  341.    texture { WWood }
  342.    colour red 0.95 green 0.62
  343. }
  344.  
  345. #declare BPawn = object {
  346.    union { Pawn }
  347.  
  348.    bounded_by {
  349.       sphere { <0 4 0> 4.72 }
  350.    }
  351.  
  352.    texture { BWood }
  353.    colour red 0.4 green 0.2
  354. }
  355.  
  356. #declare WRook = object {
  357.    union { Rook }
  358.  
  359.    bounded_by {
  360.       sphere { <0 5 0> 5.831 }
  361.    }
  362.  
  363.    texture { WWood }
  364.    colour red 0.95 green 0.62
  365. }
  366.  
  367. #declare BRook = object {
  368.    union { Rook }
  369.  
  370.    bounded_by {
  371.       sphere { <0 5 0> 5.831 }
  372.    }
  373.  
  374.    texture { BWood }
  375.    colour red 0.4 green 0.2
  376. }
  377.  
  378. #declare WKnight = object {
  379.    union { Knight }
  380.  
  381.    bounded_by {
  382.       sphere { <0 5 0> 5.831 }
  383.    }
  384.  
  385.    texture { WWood }
  386.    colour red 0.95 green 0.62
  387. }
  388.  
  389. #declare BKnight = object {
  390.    union { Knight }
  391.    rotate <0 180 0>
  392.  
  393.    bounded_by {
  394.       sphere { <0 5 0> 5.831 }
  395.    }
  396.  
  397.    texture { BWood }
  398.    colour red 0.4 green 0.2
  399. }
  400.  
  401. #declare WBishop = object {
  402.    union { Bishop }
  403.  
  404.    bounded_by {
  405.       sphere { <0 5.5 0> 6.265 }
  406.    }
  407.  
  408.    texture { WWood }
  409.    colour red 0.95 green 0.62
  410. }
  411.  
  412. #declare BBishop = object {
  413.    union { Bishop }
  414.    rotate <0 180 0>
  415.  
  416.    bounded_by {
  417.       sphere { <0 5.5 0> 6.265 }
  418.    }
  419.  
  420.    texture { BWood }
  421.    colour red 0.4 green 0.2
  422. }
  423.  
  424. #declare WQueen = object {
  425.    union { Queen }
  426.  
  427.    bounded_by {
  428.       intersection {
  429.          sphere { <0 6 0> 6.71 }
  430.          quadric { Cylinder_Y scale <3 1 3> }
  431.       }
  432.    }
  433.  
  434.    texture { WWood }
  435.    colour red 0.95 green 0.62
  436. }
  437.  
  438. #declare BQueen = object {
  439.    union { Queen }
  440.  
  441.    bounded_by {
  442.       intersection {
  443.          sphere { <0 6 0> 6.71 }
  444.          quadric { Cylinder_Y scale <3 1 3> }
  445.       }
  446.    }
  447.  
  448.    texture { BWood }
  449.    colour red 0.4 green 0.2
  450. }
  451.  
  452. #declare WKing = object {
  453.    union { King }
  454.  
  455.    bounded_by {
  456.       intersection {
  457.          sphere { <0 6.5 0> 7.16 }
  458.          quadric { Cylinder_Y scale <3 1 3> }
  459.       }
  460.    }
  461.  
  462.    texture { WWood }
  463.    colour red 0.95 green 0.62
  464. }
  465.  
  466. #declare BKing = object {
  467.    union { King }
  468.  
  469.    bounded_by {
  470.       intersection {
  471.          sphere { <0 6.5 0> 7.16 }
  472.          quadric { Cylinder_Y scale <3 1 3> }
  473.       }
  474.    }
  475.  
  476.    texture { BWood }
  477.    colour red 0.4 green 0.2
  478. }
  479.  
  480. object { /* Sky */
  481.    sphere { <0 -39000 0> 40000 inverse }
  482.  
  483.    texture {
  484.       bozo
  485.       turbulence 0.6
  486.       colour_map {
  487.          [0 0.5 colour red 0.4 green 0.5 blue 1
  488.          colour red 0.4 green 0.5 blue 1.0]
  489.          [0.5 0.7 colour red 0.4 green 0.5 blue 1
  490.          colour red 1 green 1 blue 1.0]
  491.          [0.7 1 colour red 1 green 1 blue 1
  492.          colour red 0.7 green 0.7 blue 0.7]
  493.       }
  494.       scale <500 500 500>
  495.       ambient 1
  496.       diffuse 0
  497.    }
  498.  
  499.    colour red 0.4 green 0.5 blue 1
  500. }
  501.  
  502. object { /* Ground */
  503.    plane { <0 1 0> -80 }
  504.  
  505.    texture {
  506.       0.05
  507.       colour green 1
  508.       ambient 0.5
  509.       diffuse 0.5
  510.    }
  511.    colour green 1
  512. }
  513.  
  514. #declare Frame = intersection {
  515.    plane { < 0  1  0> -0.0001 }
  516.    plane { < 0 -1  0>  3 }
  517.    plane { < 0  0 -1> 35 }
  518.    plane { <-1  0  1>  0 }
  519.    plane { < 1  0  1>  0 }
  520. }
  521.  
  522. composite {
  523.    composite {
  524.       object {
  525.          union {
  526.             intersection { Frame }
  527.             intersection { Frame rotate <0 180 0> }
  528.          }
  529.  
  530.          texture {
  531.             wood
  532.             turbulence 0.3
  533.             scale <0.8 1000 0.8>
  534.             rotate <0 0 -88>
  535.             translate <200 40 -20>
  536.             specular 1
  537.             roughness 0.02
  538.          }
  539.  
  540.          colour red 0.5 green 0.25
  541.       }
  542.  
  543.       object {
  544.          union {
  545.             intersection { Frame rotate <0 -90 0> }
  546.             intersection { Frame rotate <0  90 0> }
  547.          }
  548.  
  549.          texture {
  550.             wood
  551.             turbulence 0.3
  552.             scale <0.8 1000 0.8>
  553.             rotate <-91 0 0>
  554.             translate <100 30 0>
  555.             specular 1
  556.             roughness 0.02
  557.          }
  558.  
  559.          colour red 0.5 green 0.25
  560.       }
  561.  
  562.       object { /* Board */
  563.          intersection {
  564.             plane { < 1  0  0> 32 }
  565.             plane { <-1  0  0> 32 }
  566.             plane { < 0  1  0>  0 }
  567.             plane { < 0 -1  0>  1 }
  568.             plane { < 0  0  1> 32 }
  569.             plane { < 0  0 -1> 32 }
  570.          }
  571.  
  572.          texture {
  573.             tiles {
  574.                texture {
  575.                   marble
  576.                   turbulence 1.0
  577.                   colour_map {
  578.                      [0.0 0.7 colour White
  579.                      colour White]
  580.                      [0.7 0.9 colour White
  581.                      colour red 0.8 green 0.8 blue 0.8]
  582.                      [0.9 1.0 colour red 0.8 green 0.8 blue 0.8
  583.                      colour red 0.5 green 0.5 blue 0.5]
  584.                   }
  585.                   scale <0.6 1 0.6>
  586.                   rotate <0 -30 0>
  587.                }
  588.                tile2
  589.                texture {
  590.                   granite
  591.                   scale <0.3 1 0.3>
  592.                   colour_map {
  593.                      [0 1 colour Black
  594.                      colour red 0.5 green 0.5 blue 0.5]
  595.                   }
  596.                }
  597.             }                        /* end_checker_texture */
  598.             scale <8 1 8>
  599.             specular 1
  600.             roughness 0.02
  601.             reflection 0.25
  602.          }
  603.  
  604.          colour red 0.63 green 0.52 blue 0.45
  605.       }
  606.  
  607.       object { /* Table */
  608.          union {
  609.             intersection {
  610.                plane {  <0  1 0> -3 }
  611.                plane {  <0 -1 0>  8 }
  612.                sphere { <0 -5.5 0> 55 }
  613.             }
  614.  
  615.             intersection {
  616.                plane { <0 1 0> -8 }
  617.                quadric { Hyperboloid_Y
  618.                   scale <10 20 10>
  619.                   translate <0 -20 0>
  620.                }
  621.             }
  622.          }
  623.  
  624.          texture { granite
  625.             scale <6 6 6>
  626.             specular 1
  627.             roughness 0.02
  628.             reflection 0.3
  629.          }
  630.  
  631.          colour red 0.5 green 0.5 blue 0.5
  632.       }
  633.  
  634.       bounded_by {
  635.          plane { <0 1 0> 0 }
  636.       }
  637.    }
  638.  
  639.    composite {
  640.       object { WPawn translate <-28 0 -20> }
  641.       object { WPawn translate <-20 0 -20> }
  642.       object { WPawn translate <-12 0 -20> }
  643.       object { WPawn translate < -4 0 -20> }
  644.       object { WPawn translate <  4 0 -20> }
  645.       object { WPawn translate < 12 0 -20> }
  646.       object { WPawn translate < 20 0 -20> }
  647.       object { WPawn translate < 28 0 -20> }
  648.  
  649.       object { WRook   translate <-28 0 -28> }
  650.       object { WKnight translate <-20 0 -28> }
  651.       object { WBishop translate <-12 0 -28> }
  652.       object { WQueen  translate < -4 0 -28> }
  653.       object { WKing   translate <  4 0 -28> }
  654.       object { WBishop translate < 12 0 -28> }
  655.       object { WKnight translate < 20 0 -28> }
  656.       object { WRook   translate < 28 0 -28> }
  657.  
  658.       bounded_by {
  659.          quadric { Cylinder_X
  660.             scale <1 9.56 9.56>
  661.             translate <0 6.5 -24>
  662.          }
  663.       }
  664.    }
  665.  
  666.    composite {
  667.       object { BPawn translate <-28 0 20> }
  668.       object { BPawn translate <-20 0 20> }
  669.       object { BPawn translate <-12 0 20> }
  670.       object { BPawn translate < -4 0 20> }
  671.       object { BPawn translate <  4 0 20> }
  672.       object { BPawn translate < 12 0 20> }
  673.       object { BPawn translate < 20 0 20> }
  674.       object { BPawn translate < 28 0 20> }
  675.  
  676.       object { BRook   translate <-28 0 28> }
  677.       object { BKnight translate <-20 0 28> }
  678.       object { BBishop translate <-12 0 28> }
  679.       object { BQueen  translate < -4 0 28> }
  680.       object { BKing   translate <  4 0 28> }
  681.       object { BBishop translate < 12 0 28> }
  682.       object { BKnight translate < 20 0 28> }
  683.       object { BRook   translate < 28 0 28> }
  684.  
  685.       bounded_by {
  686.          quadric { Cylinder_X
  687.             scale <1 9.56 9.56>
  688.             translate <0 6.5 24>
  689.          }
  690.       }
  691.    }
  692.  
  693.    bounded_by {
  694.       intersection {
  695.          plane { <0 1 0> 13.5 }
  696.          sphere { <0 -30 0> 63 }
  697.       }
  698.    }
  699. }
  700.