home *** CD-ROM | disk | FTP | other *** search
/ Chip 2011 November / CHIP_2011_11.iso / Programy / Narzedzia / Inkscape / Inkscape-0.48.2-1-win32.exe / share / examples / istest.pov < prev    next >
Text File  |  2011-07-08  |  6KB  |  175 lines

  1. /*#########################################################################
  2. ##
  3. ## File:  itest.pov
  4. ## 
  5. ## Authors:
  6. ##   Bob Jamison
  7. ##
  8. ## Copyright (C) 2004-2007 The Inkscape Organization
  9. ##
  10. ## Released under GNU GPL, read the file 'COPYING' for more information
  11. ##
  12. ###########################################################################   
  13. ##
  14. ## Notes:
  15. ##
  16. ## 070312: Tested on PovRay 3.7.0 beta
  17. ##
  18. ###########################################################################
  19. ##
  20. ##  This simple file is provided to demonstrate POV output from Inkscape.
  21. ##  PovRay output is intended for people who have had moderate experience
  22. ##  with authoring POV files.  This is NOT for beginners.
  23. ##
  24. ##  To use:
  25. ##  1)  Install PovRay, version 3.5 or above, and put the povray executable
  26. ##      in your PATH.  PovRay is found at http://www.povray.org .  For
  27. ##      PovRay-specific questions, please look there.  They are the experts.
  28. ##
  29. ##  2)  Copy this file to a working area.
  30. ##
  31. ##  3)  Make or load a document in Inkscape with some shapes in it.
  32. ##
  33. ##  4)  Save as a .pov file using the SaveAs dialog.  For this example, save
  34. ##      it in the same directory as this file, with the name 'isshapes.pov'
  35. ##
  36. ##  5)  Execute povray with this file.  An example command would be:
  37. ##
  38. ##  povray +X +V +A +W320 +H320 +Iistest.pov +FN
  39. ##
  40. ##  6)  Adjust the values to suit your needs and desires.  Have fun.
  41. ##
  42. ##
  43. ##  Remember that this is not the intended use of Inkscape's POVRay
  44. ##  output, but is merely a demo.  The main purpose of POVRay output
  45. ##  is to supply curves and other data to your own POVRay projects.
  46. ##
  47. #########################################################################*/
  48.  
  49. /*#########################################################################
  50. # Some standard PovRay scene additives
  51. #########################################################################*/
  52.  
  53. #include "colors.inc"
  54. #include "textures.inc"
  55. #include "shapes.inc"
  56. #include "metals.inc"
  57. #include "skies.inc"
  58.  
  59. /*#########################################################################
  60. # Note the Z-order differentation of the prisms in the object is
  61. # normally just sufficient to display all of the objects, and
  62. # avoid 'black spots' where surfaces are coincident.  This can
  63. # be adjusted by changing the value below.
  64. #########################################################################*/
  65.  
  66. /*
  67. #declare AllShapes_Z_Increment = 0.008;
  68. */
  69.  
  70.  
  71. /*#########################################################################
  72. # Note that the finish of the "all shapes" object exported
  73. # at the end of the shapes file can be modified, by defining
  74. # if before the #include.  Uncomment the following declaration
  75. # to adjust it.  Have fun.
  76. #########################################################################*/
  77.  
  78. /*
  79. #declare AllShapes_Finish = finish {
  80.            phong 0.7
  81.            reflection 0.5
  82.            specular 0.8
  83.        }
  84. */
  85.  
  86. /*#########################################################################
  87. # Our Inkscape-exported shapes file
  88. #########################################################################*/
  89.  
  90. #include "isshapes.pov"
  91.  
  92. /*#########################################################################
  93. # Move the camera back in the -Z direction, about 1.5 times the width
  94. # or height of the image.  This will provide about a 60-degree view.
  95. # 'AllShapes' is an item in isshapes.pov, and refers to the union of
  96. # all of the shapes exported.
  97. #########################################################################*/
  98.  
  99. camera {
  100.     location <0, 0, -(AllShapes_WIDTH * 1.5)>
  101.     look_at  <0, 0, 0>
  102.     right x*image_width/image_height
  103. }
  104.  
  105. /*#########################################################################
  106. # Put one or two lights in front of the objects, and at an angle to
  107. # the viewer.
  108. #########################################################################*/
  109.  
  110. light_source { <-200,   1, -8000> color White}
  111. light_source { < 200, 100,  -600> color White}
  112.  
  113.  
  114. /*#########################################################################
  115. # Make a pretty background, for contrast
  116. #########################################################################*/
  117.  
  118. sky_sphere {
  119.     pigment {
  120.       gradient y
  121.       color_map {
  122.         [ 0.5  color CornflowerBlue ]
  123.         [ 1.0  color MidnightBlue   ]
  124.       }
  125.       scale 1000
  126.       translate -1
  127.     }
  128.   }
  129.  
  130.  
  131. /*#########################################################################
  132. # Now let us use our shapes.  We can include them individually, or include
  133. # them as a group.  Notice that we have two AllShapes.  One plain, and
  134. # an AllShapesZ.  The 'Z' version is different in that the shapes are
  135. # shifted slightly higher in their order of creation, so that coincident
  136. # shapes can be discerned.
  137. #########################################################################*/
  138.  
  139.  
  140. object {
  141.     /*
  142.     //## Individually
  143.     union{
  144.     object { droplet01       }
  145.     object { droplet02       }
  146.     object { droplet03       }
  147.     object { mountainDroplet }
  148.     }
  149.     */
  150.  
  151.     //## As a group
  152.     object { AllShapes_Z }
  153.  
  154.  
  155.     translate<-AllShapes_CENTER_X, 0, -AllShapes_CENTER_Y>
  156.     scale  <  1,  60,   1>
  157.     rotate <-90,   0,   0>   //x first
  158.     rotate <  0,   0,   0>   //z second
  159.     rotate < 20,   0,   0>   //whatever else
  160.     rotate <  0, -27,   0>   //whatever else
  161.  
  162. }//object
  163.  
  164.  
  165.  
  166. /*#########################################################################
  167. # End of File
  168. #########################################################################*/
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.