home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 18 / CD_ASCQ_18_111294_W.iso / dos / graphic / povshell / povshell.hlp (.txt) < prev    next >
Borland Turbo Vision Help  |  1994-10-22  |  321KB  |  3,910 lines

  1.                        
  2.                        
  3.  PovShell Version 3.0 
  4.                        
  5.                          Welcome to PovShell -
  6.                       The Development Environment
  7.                          to the POV-Raytracer!
  8.                          Online-help contents
  9.                    1 How
  10. system
  11.                    2 Menu overview
  12.                      2.1 File
  13.                      2.2 Edit
  14.                      2.3 Search
  15.                      2.4 Windows
  16.                      2.5 Options
  17.                      2.6 Setup
  18.                      2.7 Templates
  19. command
  20.                      2.8 Utilities
  21.                      2.9 Run
  22. command
  23.                      2.10 Help
  24.                    3 The
  25. editor
  26.                    4 Help
  27. Index
  28.                    5 POVRay
  29. reference
  30.            
  31.                    A Legal
  32. Information
  33.                    B Frequently
  34. Asked
  35. Questions
  36.                    C Command
  37. parameters
  38.                    D Warnings
  39. Errors
  40.                    E Technical
  41. notes  
  42.                    F Contacting
  43. author
  44.  Dragmode 
  45. Use the Cursor-keys to drag the window around and Shift + Cursor-keys to resize it. 
  46. See also: Windows
  47. Size/Move 
  48.  Help on Help 
  49. Use the cursor-keys and PgUp/PgDn to scroll through the Help text. 
  50. Some words of the text may appear in a different color. These are cross-references to other help topics. Use the TAB-key to highlight these keywords, then press ENTER to switch to that topic. 
  51. Like the editor-windows Help-windows may be resized, zoomed and moved across the screen (see the help on the Windows-command). E
  52. For a list of all PovShell help topics refer to the PovShell
  53. Index. 
  54.  The Editor 
  55. The Editor uses WordStar-compatible keys. Here is a complete list: )
  56.   Cursor-movement:
  57.    Up         or Ctrl-E:   one line up
  58.    Down       or Ctrl-X:   one line down
  59.    Left       or Ctrl-S:   one column left
  60.    Right      or Ctrl-D:   one column right
  61.    PgUp       or Ctrl-R:   one page up
  62.    PgDown     or Ctrl-C:   one page down
  63.    Ctrl-Left  or Ctrl-A:   one word left
  64.    Ctrl-Right or Ctrl-F:   one word right
  65.    Home       or Ctrl-Q-S: go to line start
  66.    End        or Ctrl-Q-D: go to the end of the line
  67.    Ctrl-PgUp  or Ctrl-Q-R: go to the top of the text
  68.    Ctrl-PGDn  or Ctrl-Q-C: go to the end of the text
  69.   Delete-keys:
  70.    Delete    or Ctrl-G:   delete character under the cursor
  71.    Backspace or Ctrl-H:   delete character left of the cursor
  72.                 Ctrl-T:   delete word beginning at cursor position
  73.                 Ctrl-Y:   delete actual line
  74.                 Ctrl-Q-H: delete line up to cursor
  75.                 Ctrl-Q-Y: delete line beginning at cursor
  76.   Block keys:
  77.                 Ctrl-K-B: activate select mode
  78.    Shift-Ins or Ctrl-K-C: paste block from Clipboard
  79.                 Ctrl-K-H: toggle block-highlight
  80.    Ctrl-Ins  or Ctrl-K-K: copy block to Clipboard
  81.    Ctrl-Del  or Ctrl-K-Y: cut block to Clipboard
  82.   Other keys:
  83.    Ins   or Ctrl-V:   toggle Insert mode
  84.    Enter or Ctrl-M:   new line
  85.             Ctrl-Q-A: replace a text string
  86.             Ctrl-Q-F: find a string
  87.             Ctrl-L:   search again
  88.             Ctrl-U:   undo
  89. You may insert PovRay-command templates in the current text at the actual cursor position by selecting the Template-Command of the Top- menu. Or press Alt-M. 
  90. Other key combinations have nothing to do with editing but let you control the PovRay- options which is normally done by using the Top-menu-item Options. They are called the 
  91.   Option keys:
  92.    Ctrl-O-A: AntiAliasing
  93.    Ctrl-O-B: Buffersize
  94.    Ctrl-O-C: Continue
  95.    Ctrl-O-D: Display-Adapter
  96.    Ctrl-O-E: End-Row/-Column
  97.    Ctrl-O-F: Outputformat
  98.    Ctrl-O-H: ImageHeight
  99.    Ctrl-O-J: AAJitter
  100.    Ctrl-O-K: Clock-Value
  101.    Ctrl-O-L: Library-paths
  102.    Ctrl-O-M: Bounding slabs
  103.    Ctrl-O-P: Pause when finished
  104.    Ctrl-O-Q: Quality
  105.    Ctrl-O-R: Number of AA-rays (to be squared)
  106.    Ctrl-O-S: Start-Row/-Column
  107.    Ctrl-O-V: Verbose
  108.    Ctrl-O-W: Image Width
  109.    Ctrl-O-X: Allow early exit
  110. Finally you can influence the size and position of the editor-windows by using the Windows- commands. 
  111.  File 
  112.   (Alt-F)
  113. Use the 'File'-menu to execute file-related commands. It consists of the following items: R
  114.   Open a file   New file
  115.   Save file     Save
  116. as...
  117.   DOS
  118. Shell     Exit program
  119.  Edit 
  120.   (Alt-E)
  121. The 'Edit'-menu consists of the following items: P
  122.     Undo             Cut
  123.     Copy             Paste
  124.     Show
  125. Clipboard   Clear
  126. Except of 'Show clipboard' these commands may also be executed by certain keystrokes (see Editor). 
  127.  Search 
  128.   (Alt-S)
  129. The 'Search'-menu is for finding or replacing strings in your text. It consists of the items  
  130.  Find   Replace   Search
  131. Again
  132.  Windows 
  133.   (Alt-W)
  134. The 'Window'-menu contains commands concerning windows like closing or moving them. 
  135. Note that you can perform most of these tasks by using hotkeys or by mouse-clicking on the window symbols ( [
  136.  ). T
  137.  Size/Move        Zoom
  138.  Tile             Cascade
  139.  Next             Previous
  140.  Close
  141.  Options 
  142.   (Alt-O)
  143. By this menu you can control all the PovRay tracing-options and save them into DEF-files or restore them from there. s
  144. The control panels can also be reached by using the Ctrl-O Quick key (see Option keys in the Editor-description). 
  145. Control panels: 5
  146.   Output    Display
  147.   Trace     Library-paths
  148.   Misc
  149. File commands: :
  150.   Save
  151. Options    Save
  152. Default
  153. Options
  154.   Retrieve
  155. Options
  156.  Setup 
  157.   (Alt-T)
  158. The 'Setup'-menu is for setting up the PovShell-program. For more information see the description of the menu-items +
  159.    Directories
  160.    Editor
  161.    Colors
  162.    Run
  163.  Templates 
  164.   (Alt-M)
  165. The 'Templates'-menu gives you a list of all the templates defined in the file POVSHELL.TPL in your PovShell-directory. t
  166. If you select one of the templates it will be inserted in the current editor window at the actual cursor position. 
  167. This command was designed to have quick access to PovRay command-templates, however, you may put *any* kind of text in a template, e.g. Copyright-notes, standard headers and so on. k
  168. It is recommended that you use the editor autoindent-mode when inserting templates (see Editor
  169. settings). 
  170. For information on how to define your own templates look at the description of the Template file format in the Technical
  171. notes. 
  172.  Utilities 
  173.   (Alt-U)
  174. The Utils-menu includes two tools to create Batch-Files and Clock Animation runs. Here you can also define and call your own application programs. 3
  175. For further explanations see the following items: C
  176.   Create
  177. Batch
  178.   Clock
  179. Animation
  180.   Define
  181.   Call
  182. Applications
  183.  Run 
  184.   (Alt-R or Ctrl-F9)
  185. 'Run' will launch the POV-Raytracer with the POV-file you are currently editing and the tracing-options you have set. f
  186. If you have chosen to produce an output-file you will be prompted for its name in a file
  187. select
  188. box. 
  189.  Help 
  190.   (Alt-H)
  191. The help menu offers a more direct access to the context-sensitive help topics and also includes a command to popup the System Info Window. 
  192. It consists of the items a
  193.   Contents
  194.   PovShell
  195. Index
  196.   Help
  197.   Last
  198. Topic
  199.   PovRay
  200. reference
  201.   About
  202.   System
  203.  Help
  204. Contents 
  205. This command will display the contents page of POVShell's online help system. 
  206.  Help
  207. PovShell Index 
  208.  (Shift-F1)
  209. This command will display a complete list of the available PovShell help topics. 
  210.  Help
  211. Help on Help 
  212. This command displays information on how to use the PovShell Help system. 
  213.  Help
  214. Last Topic 
  215.  (Alt-F1)
  216. Pressing Alt-F1 outside or inside the PovShell Help system will display the previous help topic. PovShell remembers the last 100 topics. 
  217.  Help
  218. PovRay reference 
  219.  (Ctrl-F1)
  220. Pressing Ctrl-F1 will display the contents page of the PovRay reference system. The PovRay reference topics were generated from the official PovRay documentation file POVRAY.DOC supplied with the raytracing program. 
  221.  Help
  222. About 
  223. The 'About'-box displays informations on the PovShell-program such as author, version number and release date. 
  224.  Help
  225. System Info 
  226.   (Alt-0)
  227. The System Info Window displays some useful information on your computer hard- and software configuration:  
  228.  - Processor type
  229.  - Co-Processor type (if present)
  230.  - Primary video board
  231.  - DOS version
  232.  - Windows version (if POVShell was launched from Windows)
  233.  - Free space on Harddisk C:
  234.  - Program heap (s. Technical
  235. notes for detail)
  236.  - Free Extended Memory
  237.  File
  238. Open... 
  239.   (F3)
  240. Use the File
  241. Open-command to open a POV-file (or any other text file) with the editor. -
  242. The command will display a File
  243. select-box. 
  244.  File
  245. This command will open a new empty and untitled editor window. 
  246.  File
  247. Save 
  248.   (F2)
  249. The File
  250. Save-command will save the file of the current editor window. If this file is still untitled Save will work exactly like Save
  251. as... 
  252.  File
  253. Save As... 
  254. This command lets you save the current editor file using a new name. You will prompted to choose the new name in a File
  255. select-box. 
  256.  File
  257. DOS Shell 
  258. The File
  259. DOS Shell-command will exit PovShell temporarily and open a DOS-shell. To leave the DOS-shell and resume the PovShell-program again enter EXIT at the DOS-prompt. 
  260.  File
  261. Exit 
  262.   (Alt-X)
  263. This command will end your PovShell session. 
  264.  Edit
  265. Undo 
  266.   (Ctrl-U)
  267. The Edit
  268. Undo-command lets you undo your last deletion/insertion. 
  269.  Edit
  270.   (Shift-Del)
  271. The Cut-command deletes the selected text block from the file and places it in the Clipboard. "
  272. See also Edit
  273. Copy    Edit
  274. Paste *
  275.          Edit
  276. Clear   Edit
  277. Clipboard
  278.  Edit
  279. Copy 
  280.   (Ctrl-Ins)
  281. The Copy-command copy the selected text block to the Clipboard. "
  282. See also Edit
  283. Cut     Edit
  284. Paste *
  285.          Edit
  286. Clear   Edit
  287. Clipboard
  288.  Edit
  289. Paste 
  290.   (Shift-Ins)
  291. The Paste-command will insert a text block from the Clipboard to the current editor window. !
  292. See also Edit
  293. Cut     Edit
  294. Copy *
  295.          Edit
  296. Clear   Edit
  297. Clipboard
  298.  Edit
  299. Show Clipboard 
  300. This command will show you a special editor window which is reserved for interchanging text blocks between multiple file editor windows. It is normally hidden and may be accessed by the following commands: 5
  301.    Edit
  302. Cut     Edit
  303.    Edit
  304. Paste   Edit
  305.  Edit
  306. Clear 
  307.   (Ctrl-Del)
  308. This command will clear the selected text from your file. c
  309. Attention: The text block will *not* be moved to the Clipboard, Undo will *not* work after Clear! 
  310.  Search
  311. Find... 
  312.   (Ctrl-Q-F)
  313. In the Search
  314. Find-dialogbox you may specify a text string to be find in the current text and options to influence the search. 3
  315. The dialogbox consists of the following elements: c
  316.     Text to find
  317.                      
  318. Enter the text to be found in this inputline. 
  319.    [ ] Case sensitive
  320. Mark this checkbox if you want to distinguish between uppercase and lowercase. 
  321.    [ ] Whole words only
  322. Mark this checkbox if you only want to search for whole words. Example: If you are searching for the string 'light' and have this checkbox marked the string 'light' will be found but not the string 'light_source'. 
  323.  Search
  324. Replace... 
  325.   (Ctrl-Q-A)
  326. In the Search
  327. Replace-dialogbox you may specify a string to be found and replaced by another string. 3
  328. The dialogbox consists of the following elements: c
  329.     Text to find
  330.                      
  331. Enter the text to be replaced in this inputline. _
  332.     New text
  333.                      
  334. Enter the new text in this inputline. You can also leave this line blank to delete the occurence(s) of the search strings. 
  335.    [ ] Case sensitive
  336. Mark this checkbox if you want to distinguish between uppercase and lowercase. 
  337.    [ ] Whole words only
  338. Mark this checkbox if you only want to replace whole words. Example: If you are replacing for the string 'light' and have this checkbox marked the string 'light' will be replaced but not the string 'light_source'. 
  339.    [X] Prompt on replace
  340. Mark this checkbox if you want to be asked each time the string is found before it is replaced. This is the default. 
  341.    [ ] Replace all
  342. Mark this checkbox if you want all matching strings to be replaced. By default only the first occurence of the string will be replaced. 
  343.  Search
  344. Search Again 
  345.   (Ctrl-L)
  346. This command will repeat the last Find- or Replace-command. 
  347.  Window
  348. Size/Move 
  349.   (Ctrl-F5)
  350. By this command you can change the size and position of the current window. 
  351.   Size
  352. By using the cursor-keys while holding down the shift-key you change the size of the active window. {
  353. If the active window has got a mouse corner (
  354. ) you can also use the mouse to resize the window by dragging this corner. 
  355.   Move
  356. By using the cursor-keys after selecting the Window
  357. Size/Move-command you move the window across the screen. Press Enter to confirm the new position and finish moving/resizing. H
  358. You can also use the mouse to move a window by dragging its title bar. 
  359.  Window
  360. Zoom 
  361.   (F5)
  362. The Zoom-command will expand the active window to its maximum size, resp. will restore its original size if it has already been expanded. 
  363. This can also be done by double-clicking on the window's title bar or by clicking on the symbols [
  364. ] resp. [
  365. ] in the upper right corner of the window. 
  366.  Window
  367. Tile 
  368. After tiling the editor-windows you will see them altogether on the screen. L
  369.                
  370.                
  371.                
  372.                
  373.                
  374.                
  375.                
  376.                
  377.                
  378.                
  379.                
  380.                
  381.                
  382.                
  383.                
  384.                
  385.              Tiled windows
  386.  Window
  387. Cascade 
  388. The Window
  389. Cascade-command will stack all the editor windows beginning in the upper left corner. Y
  390.                          
  391.                          
  392.                          
  393.                          
  394.                          
  395.         Stacked windows
  396.  Window
  397. Next 
  398.   (F6)
  399. By 'Next' you select the next editor window. 
  400.  Window
  401. Previous 
  402.   (Shift-F6)
  403. By 'Previous' you select the previous editor window. 
  404.  Window
  405. Close 
  406.   (Alt-F3)
  407. This command will close the active window. u
  408. You can also use the mouse to do this by clicking on the close-button ([
  409. ]) in the upper left corner of the window. 
  410.  Options
  411. Output... 
  412. In the Options
  413. Output-dialogbox you can control all the PovRay-options that deal with the production of an outputfile. 
  414.   Format
  415. These radiobuttons control the format of the output: 
  416.   ( ) none  : no outputfile
  417. ) TGA   : 24-bit Targa format
  418.               (This is the default)
  419.   ( ) Dump  : The Atari DIS format
  420.   ( ) RAW   : produces 3 outputfiles
  421.               with the extensions
  422.               .R8, .G8 and B8
  423.   Continue
  424. Control the continuation of an aborted trace with these radiobuttons: 
  425.   ( ) yes   : If the output-file already exists
  426.               PovRay will assume that an aborted
  427.               trace is to be continued
  428. ) no    : If the output-file already exists
  429.               it will be overwritten
  430.               (This is the default)
  431.   Buffersize
  432. Enter the size of the outputfile-buffer in KB here. k
  433.  Note: Entering -1 will disable buffering, entering 0
  434.        uses the default. The maximum amount is 8192.
  435.  Options
  436. Display... 
  437. In the Options
  438. Display-dialogbox you can control the PovRay-options that concern the display of the traced picture. !
  439.   Adapter
  440. Select the Display-Adapter and -mode to use with the Adapter-radiobuttons. The default is *not* to display the picture. !
  441.   Palette
  442. Select the palette model to use: <
  443. ) 332          : the standard 8 bits 256-color VGA-mode
  444.                      (this is the default)
  445.   ( ) HighColor    : 15/16 bits  32,768/65,536 colors
  446.   ( ) HSV          : use the HSV model in VGA-mode
  447.   ( ) GrayScale    : use Grayscale palette with VGA-display
  448.   ( ) TrueColor    : 24 bits  16,777,216 colors
  449.   Size/Width/Heigth
  450. Here you can control the image size. The most common adapter resolutions are directly selectable. If you want to use different values select the 'Custom'-button and enter the 'Width' and 'Height' on the appropiate input-lines. 
  451.  Options
  452. Trace... 
  453. In the Options
  454. Trace-dialogbox you can control the PovRay-options that influence the tracing process. !
  455.   Quality
  456. Values from 0 to 9 are allowed. The higher the value the better the quality. The default is the maximum 9. ?
  457.   [ ] Anti-Aliasing
  458. Mark this checkbox to enable Anti-Aliasing. The input-line following right is for controling the Anti-Aliasing amount. The lower the better. 3
  459.   [X] AA-Jitter
  460. If anti-aliasing is used jittering is also used by default with a default jittering scale of 1.0. Unmark the checkbox to disable jittering or enter a different scaling amount on the input-line following right. o
  461.   Number of AA-Rays (to be squared)
  462. For anti-aliasing a square of n x n rays is used whereas n is in the range of 1 to 9. The default value is 3 (meaning 3x3=9 rays). B
  463.   [X] Bounding Slabs
  464. Bounding slabs are enabled by default with a threshold of 25. Unmark this checkbox to prevent the use of bounding slabs or enter a different threshold on the input-line. K
  465.   Version Compatibility
  466. This checkbox is for selecting the PovRay version compatibility mode. Select V1.0 or V2.0 which is the default. 
  467.  Options
  468. Library-paths... 
  469. The Options
  470. Library-paths-dialogbox consists of a single input-line where you can enter the PovRay-library-paths. Up to 10 directories are allowed, separate them by semicolons. 
  471.  Options
  472. Misc... 
  473. In the Options
  474. Misc-dialogbox you can control all the 'miscellaneous' PovRay-options that do not fit in one of the main categories output, display, trace and Lib-paths. B
  475.   [ ] Verbose Output
  476. Mark this checkbox to enable verbose output, PovRay will then display the number of the image-line currently processed during the trace. K
  477.   [ ] Pause after trace
  478. Use this option to have PovRay wait for a keyhit after completing the trace. H
  479.   [ ] Allow early exit
  480. Marking this checkbox enables you to abort a trace by keyhit. An aborted trace may be continued later if you have produced an output-file. N
  481.   [ ] Enable clock value
  482. Mark this checkbox to pass a clock value to PovRay. Enter the value on the input-line following right. 0
  483.   Image Window
  484. If you want only a part of the image to be rendered enter the start-row/-column- and the end-row/-column-values in the appropiate input-lines. By default the whole image will be processed. 
  485.   Custom
  486. In this inputline you can specify additional options that are not currently supported by the original POV-Raytracer, but by various modified re-compilations of the program. 
  487.  Options
  488. Save Options... 
  489. Use the Options
  490. Save Options-command to save the currently selected PovRay-options in a standard DEF-file. You will be prompted for a filename in a file
  491. select
  492. box. 
  493. See also Retrieve
  494. options. 
  495.  Options
  496. Save Default Options 
  497. This command will save the currently selected PovRay-options in the file DEFAULT.DEF in the PovShell-directory. Each time you start PovShell it will retrieve the options stored in that file, so these values will override the PovRay default values. 
  498.  Options
  499. Retrieve Options... 
  500. Use the Options
  501. Retrieve Options-command to retrieve the PovRay-options that were once saved in a DEF-file using the Save
  502. Options-command. You will be prompted for the name of the file in a file
  503. select
  504. box. 
  505.  Setup
  506. Directories... 
  507. Here you have to specify some DOS-paths for the use with PovShell. If you are running PovShell for the very first time this dialog-box will pop up automatically. K
  508.   Default POV-file-path
  509. This is the directory where PovShell will first look for POV-files when you choose to open one using the File
  510. Open-command. Note that you can change to a different directory in the file
  511. select
  512. box. E
  513.   Default output-path
  514. This is the directory where PovShell will suggest to write the output-files. If you leave this line blank, PovShell will suggest to write the output-file to the directory where the POV-file resides. B
  515.   Path to Executable
  516. Enter the full filename of the PovRay-executable here (e.g. C:\POV\POVRAY.EXE). 
  517.  Setup
  518. Editor... 
  519. In the Setup
  520. Editor-dialogbox you can control various editor options. Q
  521.   [X] Create Backup files
  522. Mark this checkbox to make the editor create backup copies of each file you edit (i.e. change and save). The backup files will have a .BAK extension. This option is enabled by default. 9
  523.   [X] Insert Mode
  524. If this checkbox is marked the editor-cursor will be in insert-mode on startup. You may toggle between insert-mode and overwrite-mode any time by using the Ins-key or Ctrl-V. E
  525.   [ ] Autoindent mode
  526. Mark this checkbox to place the editor cursor in autoindent-mode. If you start a new line in autoindent-mode by pressing Enter the cursor will be automatically placed under the first non-blank character of the line above, so you may easily write indented paragraphs. 
  527.  Note: If you insert Templates in your
  528.        script while using the autoindent
  529.        mode the text of the templates will
  530.        also be indented.
  531.   [X] Save Desktop on exit
  532. If this option is enabled PovShell will save the filenames and positions of all open editor windows whenever you exit the program. The next time you start PovShell these informations will be used to restore the desktop, so you can immediately continue you work where you have once left off. 9
  533.   [ ] 43/50 lines
  534. If you enable this checkbox the screen will be switched to  43 lines mode (EGA) resp. 50 lines mode (VGA). By default 25 lines will be displayed. !
  535.   TabSize
  536. Here you may control the number of blanks to display a TAB-character. Values in the range of 2 to 16 are allowed, the default is 3. 
  537. Press the OK-button or ENTER to continue! 
  538.  Yes/No/Cancel 
  539. Answer 'Yes', 'No' or 'Cancel' your request! 
  540.  OK/Cancel 
  541. Answer 'OK' to confirm or 'Cancel' your request! 
  542.  Overwrite/Append/Cancel 
  543. Answer 'Overwrite' to overwrite the specified file, 'Append' to append to it or 'Cancel' to cancel your request. 
  544.  Setup
  545. Colors... 
  546. In the Setup
  547. Colors-dialogbox you can change the colors of PovShell. 
  548. Note: This command is NOT available if you have told PovShell to use the Black&White-palette by calling it with the commandline-switch '/b' ! y
  549. The dialogbox consists of two lists (groups and items), two color palettes (background and foreground) and a text area. 
  550.  Group 
  551.    Desktop           
  552.    Menues           
  553.    Dialog boxes     
  554.    Editor windows   
  555.    Help windows      
  556.                      
  557. The group list contains the names of the views whose colors can be changed. e
  558.  Item 
  559.    Color             
  560.                     
  561.                     
  562. If you choose a group from the group list its items will be shown in the itemlist. 
  563.  Foreground 
  564.  Background 
  565. Finally you can select a different fore- and background-color for each item from the palette panels. Q
  566.  Text Text Text 
  567.  Text Text Text 
  568. The current selection is shown in the sample text area. d
  569. Note: The changes you make in this dialogbox will not apply until you close it with the OK-button. 
  570.  File select box 
  571. A file select box contains a filename-inputline, a file list, an information field, an Open-button, a Cancel-button and a history-list which is assigned to the filename-inputline. |
  572.  Name 
  573.                                  
  574. In the filename-inputline enter the name of the file to be opened or a wildcard-mask for the file list (e.g. *.*). ^
  575. Use the history-list button or the Cursor-Down key to pick a filename from the history-list. 
  576.  Files 
  577.                                  
  578.   FILENM01.POV  
  579.   FILENM09.POV  
  580.   FILENM02.POV  
  581.   FILENM10.POV  
  582.   FILENM03.POV  
  583.   FILENM11.POV  
  584.   FILENM04.POV  
  585.   FILENM12.POV  
  586.   FILENM05.POV  
  587.   ..\           
  588.   FILENM06.POV  
  589.   LEVEL1\       
  590.   FILENM07.POV  
  591.   LEVEL2\       
  592.   FILENM08.POV  
  593.   LEVEL3\       
  594. The file list includes the files of the current directory, the upper directory (..) and all the sub-directories as far as their names match the current file mask. 
  595.  C:\POV\SCENES\LEVEL1\*.POV                
  596.  BALLBOX1.POV  2469  Jan  6, 1994  12:00pm 
  597. The information field displays the path, the name, the creation date and the size of the file. 4
  598.  [ Open ] 
  599.  or Enter
  600. The Open-button will open the currently selected file. If you have entered just a wildcard mask in the filename-inputline the open-button will cause the file list to be updated. ;
  601.  [ Cancel ] 
  602.  or Escape
  603. The Cancel-button cancels the current operation and removes the dialog-box. 
  604.  Setup
  605. Run... 
  606. Here are some options that influence PovShell's behaviour after launching PovRay. K
  607.   [X] Pause after stats
  608. If this checkbox is enabled PovShell will stop and wait for a keyhit after POVRay has finished tracing and displays its statistics. You should not use this option together with the 'Log stats to window'-option. S
  609.   [X] Display exit status
  610. If this option is enabled PovShell will display PovRay's DOS exit code (and its meaning) after the trace. Note: This option has NO effect if you enabled 'Log stats to window'! S
  611.   [ ] Log stats to window
  612. Enabling this option means that PovRay's messages and statistical output will be captured into a file (and not displayed on the screen). After the trace PovShell opens an editor window where this file is displayed. Note: If 'Log stats to window' is enabled 'Display exit status' won't work, and 'Pause after trace' won't make any sense. 
  613.  Utils
  614. Create Batch... 
  615. This utility lets you create Batch-Files containing one or more commands to render an image with POVRay. These Batch-Files can be run from the DOS-commandline and are useful when you want to render multiple images in batch-mode overnight. $
  616.   BAT-File
  617. This button opens a file
  618. select
  619. box and lets you specify the location and name of the Batch-File to be produced. The actual selection is displayed right from the button. $
  620.   POV-File
  621. By pressing this button you can choose a POV-scene-file to be used by the Batch-command. The actual selection is displayed right from this button. 
  622.   Output
  623. This button enables you to choose the location and name of the output-file to be produced by the Batch-command. Again, the actual selection is displayed right from the button.  '
  624.   Save Only
  625. This button finishes this dialog and writes the command to the Batch-file you specified. *
  626.   Save & Run
  627. This button is like 'Save Only', but additionally the Batch-File will be immediately executed. 
  628.   Cancel
  629. Pressing 'Cancel' will finish the dialog without writing a Batch-File. 
  630.  Utils
  631. Clock Animation... 
  632. The Clock value feature of the POV-Raytracer lets you create simple animations by varying a single float value named 'clock' (for details see the appropriate section in the PovRay
  633. reference). 
  634. The dialog elements are basically the same than in the Create
  635. Batch dialog, except from the following additional elements: 
  636.   From:
  637. Put the clock-variable's start value here. This and the following values must be in the range of -9999999.99 to 99999999.99. 
  638.   To:
  639. The clock-variables end-value. 
  640.   Step:
  641. The difference from one clock-value to the next. It may be negative for descending clock values. 
  642. EXAMPLE: if you specify %
  643.  From: -1.00   To: 3.50   Step: 1.50
  644. four commands will be written to the Batch-File using the clock values -1.00, 0.50, 2.00 and 3.50. 
  645. NOTE: The output-files produced by the Clock Animation Run with be numbered in the order of their creation. Thus their names will always end with three digits representing their number. 
  646.  Utils
  647. Define Apps... 
  648. In this dialog you can define up to five application programs that can then be called from the Utils-menue or via the Hotkeys Alt-1 to Alt-5 (s.Utils
  649. Application). +
  650. An application definition is given by a name and a command-line. The name will appear in the Utils-menu, choose a unique and descriptive string for that. The command-line must be a valid DOS-program call and thus must consist of the name of an executable program with optional parameters appended. @
  651. For the parameters there are three pre-defined special tokens: !
  652.  %i  will be substituted with the name of the
  653.      current editor file.
  654.  %o  stands for the output-file that was produced
  655.      by the last trace or that is supposed to
  656.      be produced by the next trace.
  657.  %?  will ask you for a parameter each time you call
  658.      the application.
  659.          
  660. Of course you may use more than one of these tokens, and you can also mix them with constant parameters. 
  661. Commandline-examples: 
  662.   EDIT.COM %i
  663.     will call the MS-DOS Editor with the current
  664.     editor file. Note, that for this example your
  665.     DOS-directory has to be in your PATH!
  666.   C:\BATCH\DISPLAY.BAT %o   
  667.     will call the Batch-file DISPLAY in the directory
  668.     C:\BATCH and pass the name of the current output 
  669.     file to it.
  670.   COMMAND.COM /Ccopy %o %?                          
  671.     This command will spawn COMMAND.COM to copy the
  672.     current output file to a location that you have to
  673.     specify when calling it.
  674.  Utils
  675. Call Application 
  676.   (Alt-1 .. Alt-5)
  677. In the Utils-menue you will find up to five commands to call the user-definable applications. These commands can also be activated by the Hotkeys Alt-1 to Alt-5. H
  678. See Utils
  679. Define
  680. Apps to find out how to define your own applications! 
  681.  Legal Information 
  682.  PovShell version 3.0 is FREEWARE. Explaining my understanding
  683.  of the term FREEWARE this means:
  684.  1. This program may be used, copied and distributed by anyone
  685.     if the following conditions are fulfilled:
  686.    a) The distribution of PovShell must include ALL files
  687.       that come with the program. None of the files may be
  688.       modified in any way before distributing them. The easiest
  689.       way to fulfil this condition is to distribute only the
  690.       original archived version of the program as published by
  691.       the author.
  692.    b) PovShell itself may not be sold by anyone. However, it
  693.       is legal to charge a minimal fee for the distribution of
  694.       the program (including the costs for distribution media
  695.       and shipping, resp. downloading).
  696.  2. PovShell must not be "bundled" with any other product without
  697.     the explicit permission of the author, especially when there
  698.     is a fee for that product.
  699.  PovShell 3.0 includes a customized version of the file POVRAY.DOC
  700.  which is provided as part of the POV-Ray package. For legal
  701.  information on the distribution of the POV-Ray package please read
  702.  the file POVLEGAL.DOC!
  703.  Frequently Asked Questions 
  704.    Q. Sometimes I get the message "Not enough memory for
  705.       this operation". What does it mean? How can I avoid it?
  706.    A. PovShell is a DOS-program and thus runs entirely in the
  707.       so called conventional memory of your PC. Unfortunately,
  708.       the conventional memory is always limited in size to
  709.       640 KB, regardless of how many total RAM your PC has built
  710.       in. So PovShell itself and all the files you open with the
  711.       PovShell editor have to fit into these 640 KB (or whatever
  712.       DOS has left of them after booting). There is NO way around
  713.       this. I don't plan to add XMS/EMS-support to PovShell in
  714.       the near future!
  715.       Workaround: To save memory close all the files you don't
  716.       need anymore! The PovShell-editor has another sometimes
  717.       annoying limitation: The size of a single editor-file must
  718.       not be larger than 64 KB. This is due to built-in limitations
  719.       of Borland's Turbo Pascal which I use to program PovShell.
  720.       Of course, I could code around that splitting up larger
  721.       files, using dynamic data structures and so on. However,
  722.       if I really wanted to do this I would have to re-write the
  723.       editor-code from scratch...
  724.       Workaround: If you want to trace a file that is larger than
  725.       64 KB then simply create a new POV-file SMALL.POV which 
  726.       includes a single line:
  727.         #include "TOOLARGE.POV"
  728.       Tracing SMALL.POV will have the same effect as tracing
  729.       TOOLARGE.POV!
  730.    Q. POV-Ray won't run when launched from POVShell. It displays
  731.       the error message
  732.       "DOS Extender: Error X0131: Insufficient DOS memory".
  733.       What can I do?
  734.    A. This error message means that after starting POVShell there
  735.       is not enough conventional memory left to run POV-Ray.
  736.       Try to free up some DOS memory by removing drivers from
  737.       your CONFIG.SYS and AUTOEXEC.BAT that you do not necessarily
  738.       need or try to load them into the High Memory Area.
  739.       Alternatively you could run POVShell with the commandline-
  740.       switch /L. POVShell will then use 16 KB less conventional
  741.       memory. However, this will reduce the number of files you
  742.       can open with the POVShell-editor.
  743.    Q. After rendering a scene I get a message box saying
  744.       "POVRAY.EXE terminated with ExitCode 75". What does that mean?
  745.    A. After PovRay's execution it returns an exitcode to the
  746.       calling program which is PovShell in this case. Since PovRay
  747.       version 2.0 these exitcodes are documented to have one of the
  748.       values 0, 1 or 2. Older versions of PovRay obviously have
  749.       different, undocumented or meaningless exitcodes, e.g. 75.
  750.       Solution: Upgrade PovRay to version 2.0 or later. If you are
  751.       stuck to PovRay 1.0 there is a workaround for you: Make sure
  752.       that you have PovShell version 2.3 or later. In the Setup|Run-
  753.       dialog unmark the checkbox "[X] Display exit status".
  754.    Q. I'm using FTPov (or another PovRay-derivative) that provides
  755.       additional commandline-options. How can I use them with PovShell?
  756.    A. Since version 2.2 of PovShell there is an input-line in the
  757.       Options|Misc-dialog for such additional options!
  758.    Q. I'd like to render multiple files overnight in batch mode.
  759.       How do I do this?
  760.    A. Since version 3.0 of PovShell there is a utility that will
  761.       automatically create batch files especially for this purpose.
  762.       Have a look at the Utils|Create Batch...-command!
  763.    Q. Where can I usually find the latest version of PovShell?
  764.    A. When I finish a new release of PovShell I upload it at once
  765.       a. to CompuServe's GraphDev-forum (GO GRAPHDEV)
  766.          Search the library "POV sources" for the file POVSHE.ZIP!
  767.       b. to wuarchive.wustl.edu on the Internet. Note that this site
  768.          is mirrored to a lot of other servers. Europeans should check
  769.          out ftp.informatik.uni-oldenburg.de!
  770.       From these sites PovShell spreads out to a variety of ftp-
  771.       servers and BBSs. If you are on the Internet ask your favorite
  772.       archie for POVSH*.ZIP!
  773.       The actual release of PovShell is 3.0.
  774.  Commandline parameters 
  775. POVShell's full calling syntax is: 5
  776.       POVSHELL [file1 [file2 [...]]] [/B] [/Q] [/L]
  777. file1, file2 etc. will be automatically opened by PovShell. This can be used to automatically start PovShell from the Windows-filemanager or the MS-DOSShell by associating it with the .POV file-extension. Double-clicking on a POV-file will then launch PovShell with that POV-file. 
  778. Switches: 
  779.   /B       Run PovShell with a black&white color-palette
  780.            (for monochrome monitors and LCD-displays)
  781.   /Q       Don't display About-box at program startup
  782.   /L       Use less memory for the program heap
  783.            (This will save 16 KB of conventional memory.
  784.            However, you should only use this option when
  785.            you are not able to launch POV-Ray from within
  786.            POVShell).
  787.  Warnings and Errors 
  788. 1. Output-file exists and CONTINUE is set to NO! 
  789.    OK to overwrite?
  790. This message occurs when the output-file you have specified already exists, and the continue flag is set to NO, preventing you from unintentionally overwriting the output-file. If you really want to overwrite it, just press RETURN. If you want to keep it, press ESCAPE, select Run again and enter a different outputfile-name. >
  791. 2. DOS-Error xxx occured on execute! Check execution path in 
  792.    SETUP|DIRECTORIES...
  793. This message occurs when POVRAY.EXE could not be executed properly. A possible reason is a wrong execution path entered in the Setup|Directories-dialog-box. e
  794. 3. PovRay completed successfully. Just an informational message. It says that ... (you guessed it!) 
  795. 4. Error(s) reported by PovRay! Possible reasons: Syntax errors in the script, unaccessible include files  or bitmaps, ... Look at PovRay's error messages, check the include-path. w
  796. 5. Trace aborted. This message pops up when you had the +x option enabled and interrupted the trace by hitting a key. 
  797. 6. Not enough memory for this operation. Occurs when you opened too many files, or when you try to open a file that is too big. Note: File-size is limited to 64 KB. o
  798. 7. Can't open help file. The help file POVSHELL.HLP is missing. Be sure to copy it to the PovShell-directory. J
  799. There are a lot more error messages, but they are all self-explaining... 
  800.  Technical notes 
  801. 1. The configuration file POVSHELL.CFG 
  802. POVSHELL will store the Default-POV-file-path, the output-path, the path to the executable, its editor settings, color informations and run-options in the file POVSHELL.CFG. DO NOT EDIT THIS FILE! Use the appropiate commands and menus in POVSHELL to change the parameters. POVSHELL.CFG will be stored in the directory where POVSHELL.EXE resides. It will be read by the program every time it is started and it will be written every time you exit it. *
  803. 2. The startup options file DEFAULT.DEF $
  804. On startup, POVSHELL will scan the directory where POVSHELL.EXE resides for a file named DEFAULT.DEF. If it is found the options stored in it will be loaded. There is no need to edit this file! If you want to save or change startup options, select the Options|Save default options-menuitem. 
  805. 3. How to use DEF-Files A
  806. Note: a. If you have DEF-files written on your own you can load 
  807.    them into POVSHELL via the Options|Retrieve Options...-
  808.    menuitem! You can also use the DEF-files that are distributed
  809.    by the Pov-Team with the latest version 2.2 of the Pov-Raytracer.
  810. b. If you have saved options from POVSHELL via the 
  811.    Options|Save Options...- menuitem into a DEF-file you
  812.    can also use these files outside POVSHELL by typing
  813.        POVRAY +i<inputfile> +o<outputfile> <DEF-file>
  814.    at the DOS-prompt.
  815. c. If you save options only those parameter settings will be L
  816.    written into the DEF-file which are NOT the POV-Ray
  817.    DEFAULT settings!
  818. 4. The Template file POVSHELL.TPL 
  819. Since version 2.2 this file is used to store *all* the Template-definitions. You are encouraged to edit this file to meet your own requirements! 
  820. File format: 8
  821. a. Each template starts with a line containing a colon 
  822.    in the first column which is followed directly by the
  823.    name of the template (and nothing else!)
  824.    Example:
  825.      :Light_Source
  826.      ...
  827.    The Template name will occur in PovShell's Template
  828.    selection-box. It is case-sensitive and limited to
  829.    12 characters.
  830. b. All lines that start with a semicolon are ignored by 
  831.    PovShell. Those lines may be used to store template-
  832.    related comments. They are only visible when editing
  833.    POVSHELL.TPL. Don't mix these comments with the PovRay-
  834.    comment-lines starting with // or embraced by /* ... */.
  835.    PovRay-comments that are part of a template will be
  836.    inserted by PovShell if you select that template!
  837.    Example:
  838.      ; This line will not be inserted.
  839.      // This line will be inserted.
  840. c. Any line that does not define a new template (s.1) and 
  841.    does not start with ; belongs to the template itself 
  842.    and will be inserted in the current editor if the 
  843.    appropiate template is chosen from the template selection-
  844.    box. A template definition ends where the next template
  845.    starts or where the file POVSHELL.TPL ends.
  846. 5. The Desktop file POVSHELL.DSK .
  847. If you have chosen the 'Save Desktop on exit'-item in the Setup|Editor...-dialog-box all open files (i.e. their names) will be saved in the Desktop-file when you exit the program. On the next PovShell-startup the files listed in the Desktop-file will be automatically reopened. NEVER EDIT this file!   
  848. 6. The help-file POVSHELL.HLP 
  849. This is the PovShell-helpfile. It includes all the help texts and binary coded information on indices and hyper-links. NEVER EDIT this file! PovShell will still work when the help file gets lost, but it *will* crash if it gets corrupted! 
  850. 7. Temporary files M
  851. Every time you call 'Run' from the POVSHELL-menu the following will happen: 
  852.  a. The contents of the active editor-window will be
  853.     saved in a temporary file named $SHELL$.POV.
  854.  b. The actual parameter settings will be saved in a
  855.     temporary file named $SHELL$.DEF.
  856.  c. POVRAY.EXE is called using the temporary files.
  857.  d. The temporary files are deleted.
  858. Normally the temporary files are stored in the PovShell-directory. However, if you have a DOS-environment-variable TEMP defined, the files will be written to the directory where TEMP is pointing to. If you want to use this feature place a command like 
  859.   SET TEMP=C:\TEMP
  860. in your AUTOEXEC.BAT and make sure that the specified directory exists! +
  861. 8. A word about memory: The program heap 
  862. POVShell reserves an amount of conventional memory to store dynamically created data structures. By default 32 KB are reserved, but you can force POVShell to use only 16 KB by using the commandline- switch /L. 
  863. The free space on the program heap will decrease with every new dialog- or editor window you open (but of course it will increase again when you close the windows). 
  864. In the System
  865. Window you can check the free space on the program heap. After startup (with no open files) it should show 27000 to 28000 free bytes. 
  866.  Contacting the author 
  867. If you have questions or comments on PovShell feel free to contact me! For information on how to do this read the file FEEDBACK.DOC! 
  868.  Help Index 
  869. Help is available on the following topics: ^
  870.    About                  Contents
  871.    Edit
  872. menu              Editor
  873.    Edit
  874. Clear             Edit
  875.    Edit
  876. Cut               Edit
  877. Paste 
  878.    Edit
  879. Clipboard    Edit
  880.    File
  881. menu              File
  882. select
  883.    File
  884. Shell         File
  885.    File
  886. New               File
  887.    File
  888. Save              File
  889.    Help
  890. Topic        Help
  891. PovRay
  892. reference
  893.    Help
  894. System
  895. Info       How
  896.    Options
  897. menu           Options
  898. Display
  899.    Options
  900. Library-paths  Options
  901.    Options
  902. Output         Options
  903. Retrieve
  904.    Options
  905. Default   Options
  906.    Options
  907. Trace          Run
  908. command
  909.    Search
  910. menu            Search
  911.    Search
  912. Replace         Search
  913. Search
  914. Again
  915.    Setup
  916. menu             Setup
  917. Colors
  918.    Setup
  919. Directories      Setup
  920. Editor
  921.    Setup
  922. Run              Templates
  923.    Utils
  924. menu             Utils
  925. Create
  926. Batch
  927.    Utils
  928. Clock
  929. Animation  Utils
  930. Define
  931.    Utils
  932. Application Windows
  933. menu        
  934.    Window
  935. Cascade         Window
  936. Close        
  937.    Window
  938. Next            Window
  939. Previous     
  940.    Window
  941. Size/Move       Window
  942. Tile         
  943.    Window
  944.    Contacting
  945. Author
  946.    Commandline
  947. parameters
  948.    Frequently
  949. Asked
  950. Questions
  951.    Legal
  952. Information
  953.    Technical
  954. notes
  955.    Warnings
  956. Errors
  957.                 Persistence of Vision Ray Tracer (POV-Ray)
  958.                                 Version 2.0
  959.                            User's Documentation
  960.                         Copyright 1993 POV-Ray Team
  961.                              Table of Contents
  962.  1.0 INTRODUCTION
  963.  2.0 ABOUT
  964. POV-Ray
  965.      2.1 PROGRAM
  966. DESCRIPTION
  967. TRACING?
  968.      2.2 WHICH
  969. VERSION
  970. POV-Ray
  971. SHOULD
  972.      2.3 WHERE
  973. POV-Ray
  974. FILES
  975.  3.0 QUICK
  976. START
  977.      3.1 INSTALLING
  978. POV-Ray
  979.      3.2 USING
  980. SAMPLE
  981. SCENES
  982.      3.3 COMMAND
  983. PARAMETERS
  984.      3.4 DEFAULT
  985. PARAMETER
  986. ENVIRONMENT
  987. VARIABLE
  988.  4.0 BEGINNING
  989. TUTORIAL
  990.      4.1 YOUR
  991. FIRST
  992. IMAGE
  993.      4.2 MORE
  994. TEXTURE
  995. OPTIONS
  996.      4.3 MORE
  997. SHAPES
  998.  5.0 SCENE
  999. DESCRIPTION
  1000. LANGUAGE
  1001. REFERENCE
  1002.      5.1 LANGUAGE
  1003. BASICS
  1004.      5.2 OBJECTS
  1005.      5.3 OBJECT
  1006. MODIFIERS
  1007.      5.4 TEXTURES
  1008.      5.5 CAMERA
  1009.      5.6 MISC
  1010. FEATURES
  1011.  APPENDIX A  COMMON
  1012. QUESTIONS
  1013. ANSWERS
  1014.  APPENDIX B  TIPS
  1015. HINTS
  1016.  APPENDIX C  SUGGESTED
  1017. READING
  1018.  APPENDIX D  LEGAL
  1019. INFORMATION
  1020.  APPENDIX E  CONTACTING
  1021. AUTHORS
  1022. 1.0   INTRODUCTION ================== |
  1023. This document details the use of the Persistence of Vision Ray Tracer (POV- Ray) and is broken down into several sections. 
  1024. The first section describes the program POV-Ray, explains what ray tracing is and also describes where to find the latest version of the POV-Ray  software. V
  1025. The next section is a quick start that helps you quickly begin to use the  software. Q
  1026. After the quick start is a more in-depth tutorial for beginning POV-Ray  users. 
  1027. Following the beginning tutorial is a scene description language reference  that describes the language used with POV-Ray to create an image. [
  1028. The last sections include some tips and hints, suggested reading, and legal  information. D
  1029. POV-Ray is based on DKBTrace 2.12 by David Buck & Aaron A. Collins 
  1030. 2.0   ABOUT POV-Ray =================== 
  1031. This section describes POV-Ray and explains what a ray tracer does.  It  also describes where to find the latest version of the POV-Ray software. 
  1032.      2.1 PROGRAM
  1033. DESCRIPTION
  1034. TRACING?
  1035.      2.2 WHICH
  1036. VERSION
  1037. POV-Ray
  1038. SHOULD
  1039.      2.3 WHERE
  1040. POV-Ray
  1041. FILES
  1042. 2.1   PROGRAM DESCRIPTION -- WHAT IS RAY TRACING? ------------------------------------------------ 
  1043. The Persistence of Vision Ray Tracer (POV-Ray) is a copyrighted freeware  program that allows a user to easily create fantastic, three dimensional,  photo-realistic images on just about any computer. POV-Ray reads standard  ASCII text files that describe the shapes, colors, textures and lighting in  a scene and mathematically simulates the rays of light moving through the  scene to produce a photo-realistic image!  (
  1044. No traditional artistic or programming skills are required to use POV-Ray.  First, you describe a picture in POV-Ray's scene description language, then  POV-Ray takes your description and automatically creates an image from it  with near perfect shading, perspective, reflections and lighting.  
  1045. The standard POV-Ray package also includes a collection of sample scene  files that illustrate the program's features.  Additionally the POV-Ray  Team distributes several volumes of scenes that have been created by other  artists using the program. These scenes can be rendered and enjoyed even  before learning the scene description language. They can also be modified  to create new scenes.  1
  1046. Here are some highlights of POV-Ray's features: (
  1047.   *   Easy to use scene description language
  1048.   *   Large library of stunning example scene files
  1049.   *   Standard include files that pre-define many shapes, colors and 
  1050.        textures
  1051.   *   Very high quality output image files (24-bit color.)
  1052.   *   15 and 24 bit color display on IBM-PC's using appropriate hardware
  1053.   *   Create landscapes using smoothed height fields
  1054.   *   Spotlights for sophisticated lighting
  1055.   *   Phong and specular highlighting for more realistic-looking surfaces.
  1056.   *   Several image file output formats including Targa, dump and raw
  1057.   *   Wide range of shapes:
  1058.   *   Basic Shape Primitives such as... Sphere, Box, Quadric, Cylinder,
  1059.        Cone, Triangle and Plane
  1060.   *   Advanced Shape Primitives such as... Torus (Donut), Hyperboloid,
  1061.        Paraboloid, Bezier Patch, Height Fields (Mountains), Blobs,
  1062.        Quartics, Smooth Triangles (Phong shaded)
  1063.   *   Shapes can easily be combined to create new complex shapes. This
  1064.        feature is called Constructive Solid Geometry (CSG). POV-Ray
  1065.        supports unions, merges, intersections and differences in CSG.
  1066.   *   Objects are assigned materials called textures.  (A texture describes
  1067.        the coloring and surface properties of a shape.)
  1068.   *   Built-in color patterns: Agate, Bozo, Checker, Granite, Gradient,
  1069.        Leopard, Mandel, Marble, Onion, Spotted, Radial, Wood and image file
  1070.        mapping.
  1071.   *   Built-in surface bump patterns: Bumps, Dents, Ripples, Waves,
  1072.        Wrinkles and mapping.
  1073.   *   Users can create their own textures or use pre-defined textures such
  1074.        as... Mirror, Metals like Chrome, Brass, Gold and Silver, Bright
  1075.        Blue Sky with Clouds, Sunset with Clouds, Sapphire Agate, Jade,
  1076.        Shiny, Brown Agate, Apocalypse, Blood Marble, Glass, Brown Onion,
  1077.        Pine Wood, Cherry Wood
  1078.   *   Combine textures using layering of semi-transparent textures or tile
  1079.        or material map files.
  1080.   *   Display preview of image while computing (not available on all
  1081.        computers)
  1082.   *   Halt rendering when part way through
  1083.   *   Continue rendering a halted partial scene later
  1084. 2.2   WHICH VERSION OF POV-Ray SHOULD YOU USE? ---------------------------------------------- 
  1085. There are specific versions of POV-Ray available for three different  computers, the IBM-PC, the Apple Macintosh, and the Commodore Amiga. 
  1086.         2.2.1   IBM-PC
  1087. COMPATIBLES
  1088.         2.2.2   APPLE
  1089. MACINTOSH
  1090.         2.2.3   COMMODORE
  1091. AMIGA
  1092.         2.2.4   UNIX
  1093. OTHER
  1094. SYSTEMS
  1095.         2.2.5   ALL
  1096. VERSIONS
  1097. 2.2.1 IBM-PC AND COMPATIBLES 
  1098. The IBM-PC version is called POVRAY.EXE and is found in the self-extracting  archive POVIBM.EXE. It can be run on any IBM-PC with a 386 or 486 CPU and 2  megabytes of memory. A math co-processor is not required, but it is  recommended. This version of POV-Ray may be run under DOS, OS\2, and  Windows. It will not run under Desqview at this time. A version that runs  on IBM-PC's using the 286 CPU is also available in the self-extracting  archive POV286.EXE. 
  1099. 2.2.2 APPLE MACINTOSH L
  1100. The Apple Macintosh version of POV-Ray can be found in the archive  POVMAC.SEA or POVMNF.SEA.  POVMAC.SEA contains the preferred "high- performance" executable for Macs with a floating point coprocessor (FPU).   POVMNF.SEA contains the slower more universal executable, which will run on  any 68020 or better Mac without an FPU.   
  1101. The Macintosh version of POV-Ray needs a 68020 or better CPU (Mac II  series, SE/30, Quadras, some Powerbooks, etc.)  It will run under Sytem  6.0.4 or newer (System 7 preferred.)  It also requires 32 bit Color  Quickdraw, which is built into System 7, and is an optional init in System  6.  The init can be found on the System 6 System disk "Printing", under the  "Apple Color" folder.  It should also be available from any authorized  Apple Service Center, or CompuServe or local Macintosh bulletin boards.   QuickTime 1.5 or newer is preferred but not required.  If installed, it  will allow compression of the final PICT images.  It will also allow adding  custom System 7 Thumbnail icons to the PICT files in the Finder.  Of  course, a color monitor is preferred, but not required. 
  1102. 2.2.3 COMMODORE AMIGA 
  1103. The Commodore Amiga version of POV-Ray can be found in the file POVAMI.LZH.  Two executables are supplied, one for computers with a math co-processor,  and one for computers without a math co-processor. This version will run on  Amiga 500, 1000, 2000, and 3000's and should work under AmigaDOS 1.3 or  2.xx.  The Amiga version supports HAM mode as well as HAM-E and the  Firecracker. 
  1104. 2.2.4 UNIX AND OTHER SYSTEMS 8
  1105. POV-Ray is written in highly portable C source code and it can be compiled  and run on many different computers.  There is specific source code in the  source archive for UNIX, X-Windows, VAX, and generic computers. If you have  one of these, you can use the C compiler included with your operating  system to compile a POV-Ray executable for your own use. This executable  may not be distributed except under the terms specified in the file  POVLEGAL.DOC.  Users on high powered computers like Suns, SGI, RS-6000's,  Crays, and so on use this method to run POV-Ray. 
  1106. 2.2.5 ALL VERSIONS 
  1107. All versions of the program share the same ray tracing features like  shapes, lighting and textures. In other words, an IBM-PC can create the  same pictures as a Cray supercomputer as long as it has enough memory. 
  1108. The user will want to get the executable that best matches their computer  hardware. See the section "Where to find POV-Ray files" for where to find  these files. You can contact those sources to find out what the best  version is for you and your computer. 
  1109. 2.3   WHERE TO FIND POV-Ray FILES --------------------------------- 
  1110. POV-Ray is a complex piece of software made up of many files. The POV-Ray  package is made up of several archives including executables,  documentation, and example scene files.  
  1111. The average user will need an executable for their computer, the example  scene files and the documentation. The example scenes are invaluable for  learning about POV-Ray, and they include some exciting artwork. ]
  1112. Advanced users, developers, or the curious may want to download the C  source code as well. D
  1113. There are also many different utilities for POV-Ray that generate scenes,  convert scene information from one format to another, create new materials,  and so on. You can find these files from the same sources as the other POV- Ray files. No comprehensive list of these utilities is available at the  time of this writing. P
  1114. The latest versions of the POV-Ray software are available from these  sources: !
  1115.         2.3.1   GRAPHICS
  1116. DEVELOPER'S
  1117. FORUM
  1118. COMPUSERVE
  1119.         2.3.2   PC
  1120. GRAPHICS
  1121. AMERICA
  1122. ON-LINE
  1123.         2.3.3   YOU
  1124. CHICAGO
  1125.         2.3.4   THE
  1126. GRAPHICS
  1127. ALTERNATIVE
  1128. CERRITO,
  1129.         2.3.5   PI
  1130. SQUARED
  1131. MARYLAND
  1132.         2.3.6   INTERNET
  1133. 2.3.1 GRAPHICS DEVELOPER'S FORUM ON COMPUSERVE g
  1134. POV-Ray headquarters are on CompuServe Graphics Developer's Forum (GO  GRAPHDEV) sections 8 POV Sources and 9 POV Images. We meet there to share  info and graphics and discuss ray tracing. The forum is also home to  development projects on fractals, animation and morphing.  It is the home  of the Stone Soup Group, developers of Fractint, a popular IBM-PC fractal  program. Everyone is welcome to join in on the action on CIS GraphDev. Hope  to see you there! You can get information on joining CompuServe by calling  (800)848-8990. CompuServe access is also available in Japan, Europe and  many other countries. 
  1135. 2.3.2 PC GRAPHICS AREA ON AMERICA ON-LINE 
  1136. There's an area now on America On-Line dedicated to POV-Ray support and  information. You can find it in the PC Graphics section of AOL. Jump  keyword "PCGRAPHICS". This area includes the Apple Macintosh executables  also. 
  1137. 2.3.3 YOU CAN CALL ME RAY BBS IN CHICAGO  
  1138. There is a ray trace specific BBS in the (708) Area Code (Chicago suburbia,  United States) for all you Traceaholics out there. The phone number of this  BBS is (708) 358-5611. Bill Minus is the sysop and Aaron Collins is co- sysop of that board, and it's filled with interesting stuff. 
  1139. 2.3.4 THE GRAPHICS ALTERNATIVE BBS IN EL CERRITO, CA 
  1140. For those on the West coast, you may want to find the POV-Ray files on The  Graphics Alternative BBS. It's a great graphics BBS run by Adam Shiffman.   TGA is high quality, active and progressive BBS system which offers both  quality messaging and files to its 1300+ users. u
  1141.        510-524-2780 (PM14400FXSA v.32bis 14.4k, Public)
  1142.        510-524-2165 (USR DS v.32bis/HST 14.4k, Subscribers)
  1143. 2.3.5 PI SQUARED BBS MARYLAND %
  1144. For those on the East coast you may want to try th Pi Squared BBS in  Maryland.  The sysop Alfonso Hermida CIS: 72114,2060 is the creator of  POVCAD.  He carries the latest POV files and utilities, plus supports his  software.  Call (301)-725-9080 in Maryland USA running @ 14.4K bps 24 hrs. 
  1145. 2.3.6 INTERNET q
  1146. The POV-Ray files are also available over Internet by anonymous FTP from  alfred.ccs.carleton.ca (134.117.1.1). 
  1147. 3.0   QUICK START ================= i
  1148. The next section describes how to quickly install POV-Ray and render a  sample scene on your computer.  
  1149.      3.1 INSTALLING
  1150. POV-Ray
  1151.      3.2 USING
  1152. SAMPLE
  1153. SCENES
  1154.      3.3 COMMAND
  1155. PARAMETERS
  1156.      3.4 DEFAULT
  1157. PARAMETER
  1158. ENVIRONMENT
  1159. VARIABLE
  1160. 3.1   INSTALLING POV-Ray ------------------------ 
  1161. Specific installation instructions are included with the executable program  for your computer. In general, there are two ways to install POV-Ray.  
  1162. [ Note that the generic word "directory" is used throughout.  Your  operating system may use another word (subdirectory, folder, etc.) ] 
  1163. 1-- The messy way: Create a directory called POVRAY and copy all POV-Ray  files into it. Edit and run all files and programs from this directory.  This method works, but is not recommended. 6
  1164. Or the preferred way: 2-- Create a directory called POVRAY and several subdirectories called   INCLUDE, DEMO, SCENES, UTIL. The self-extracting archives used in some  versions of the program will create subdirectories for you.  If you create  your own, the file tree for this should look something like this: 
  1165.     \--
  1166.       |   
  1167.       +POVRAY --
  1168.                |
  1169.                +INCLUDE
  1170.                |
  1171.                +DEMO
  1172.                |
  1173.                +SCENES
  1174.                |
  1175.                +UTIL
  1176. Copy the executable file and docs into the directory POVRAY. Copy the  standard include files into the subdirectory INCLUDE. Copy the sample scene  files into the subdirectory SCENES. And copy any POV-Ray related utility  programs and their related files into the subdirectory UTIL. Your own scene  files will go into the SCENES subdirectory. Also, you'll need to add the  directories \POVRAY and \POVRAY\UTIL to your "search path" so the  executable programs can be run from any directory. s
  1177.       *Note that some operating systems don't 
  1178.       *have an equivalent to the
  1179.       *multi-path search command.
  1180. The second method is a bit more difficult to set-up, but is preferred.  There are many files associated with POV-Ray and they are far easier to  deal with when separated into several directories. 
  1181. 3.2   USING SAMPLE SCENES ------------------------- 
  1182. This section describes how to render a sample scene file. You can use these  steps to render any of the sample scene files included in the sample scenes  archive.  k
  1183. A scene file is a standard ASCII text file that contains a description of a  three dimensional scene in the POV-Ray language.  The scene file text  describes objects and lights in the scene, and a camera to view the scene.  Scene files have the file extension .POV and can be created by any word  processor or editor that can save in standard ASCII text format. 8
  1184. Quite a few example scenes are provided with this distribution in the  example scenes archive. The scenes in the standard archives are designed to  illustrate and teach you the features of the program.  Additionally the  POV-Ray Team distributes several volumes of scenes in its ongoing series  "The POV-Ray Scene Library"  These scene files range from very simple to  very complex. They have been created by users of POV-Ray all over the  world, and were picked to give examples of the variety of features in POV- Ray. Many of them are stunning in their own right.  W
  1185. The scenes were graciously donated by the artists because they wanted to  share what they had created with other users. Feel free to use these scenes  for any purpose. You can just marvel at them as-is, you can study the scene  files to learn the artists techniques, or you can use them as a starting  point to create new scenes of your own. 
  1186. Here's how to make these sample scenes into images you can view on your  computer. We'll use SIMPLE.POV as an example, just substitute another  filename to render a different image. 
  1187.    Note: The sequence of commands is not the same for
  1188.          every version of POV-Ray. There should be a
  1189.          document with the executable describing the
  1190.          specific commands to render a file.
  1191. The file SIMPLE.POV was included with the standard scene files and should  now be in the DEMO directory.  Make that the active directory, and then at  the command line, type: $
  1192.   POVRAY +Isimple.pov +V +W80 +H60
  1193. POVRAY is the name of your executable, +Ifilename.pov tells POV-Ray what  scene file it should use as input, and +V tells the program to output its  status to the text screen as it's working. +W and +H set the width and  height of the image in pixels. This image will be 80 pixels wide by 60  pixels high. 
  1194. POV-Ray will read in the text file SIMPLE.POV and begin working to render  the image. It will write the image to a file called DATA.TGA. The file  DATA.TGA contains a 24 bit image of the scene file SIMPLE.POV. Because many  computers can't display a 24 bit image, you will probably have to convert  DATA.TGA to an 8 bit format before you can view it on your computer. The  docs included with your executable lists the specific steps required to  convert a 24 bit file to an 8 bit file. 
  1195. 3.3   COMMAND LINE PARAMETERS ----------------------------- R
  1196. The following section gives a detailed description of the command-line  options. O
  1197. The command-line parameters may be specified in any order. Repeated  parameters overwrite the previous values except for the +L switch which  defines include file library paths.  Up to 10 +L paths may be specified.   Default parameters may also be specified in a file called "povray.def" or  by the environment variable "POVRAYOPT".  $
  1198. Switches may be specified in upper or lower case.  Switches must be  preceded by a + (plus) or - (minus).  In switches which toggle a feature,  the plus turns it on and minus turns it off.  For example +P turns on the  "pause for keypress when finished" option while -P turns it off.  Other  switches are used to specify values and do not toggle a feature.  Either  plus or minus may be used in that instance.  For example +W320 sets the  width to 320 pixels.  You could also use -W320 and get the same results.   More examples follow this table. !
  1199. Table 1 Command Line Parameters 
  1200.  Parameter......|.....Range........|...Description........................
  1201.  -------------------------------------------------------------------------
  1202.  +Annn          | 0.0 to 3.0       | Render picture with anti-aliasing,or
  1203.                 |                  | "smoothing", on.  Lower values cause
  1204.                 |                  | more smoothing.
  1205.  +A             |                  | Use default 0.3 anti-aliasing
  1206.  -A             |                  | Turn anti-aliasing off (default)
  1207.  +Bnnn or -Bnnn | Varies w/ sys    | Output file buffer size.
  1208.  +C             |                  | Continue an aborted partial image.
  1209.  -C             |                  | Start rendering from first line.
  1210.  +Dxxx          | Varies w/sys     | Display image graphically while
  1211.                 |                  | rendering (Not available on all vers).
  1212.  +Enn or +ERnn  | 1 to 32,767      | End row for tracing
  1213.                 |  or 0.0 to 1.0   | a portion of a scene.
  1214.  +ECnn          | 1 to 32,767      | End column for tracing
  1215.                 |  or 0.0 to 1.0   | a portion of a scene.
  1216.  +FT            |                  | Output Targa format file
  1217.  +FD            |                  | Output dump format file
  1218.  +FR            |                  | Output raw format file
  1219.  -F             |                  | Disable file output.
  1220.  +Hnnn          | 1 to 32,767      | Height of image in pixels.
  1221.  +Ifilespec     | Varies w/ sys    | Input scene file name, generally ends
  1222.                 |                  | in .pov.
  1223.  +Jnnn.nnn      | 0.0 to 1.0       | Set amount of jitter for anti-aliasing
  1224.  +J             |                  | Use anti-aliasing jitter 1.0 (default)
  1225.  -J             |                  | Turn off anti-aliasing jitter
  1226.  +Knnn.nnn      | any real value   | Set "clock" float value for animation
  1227.  +Lpathspec     | Varies w/ sys    | Library path: POV-Ray will search for
  1228.                 |                  | files in the directory listed here.
  1229.                 |                  | Multiple lib paths may be specified.
  1230.  -MB            |                  | Turn off bounding slabs
  1231.  +MBnnn         | 0 to 32,767      | Use bounding slabs if more than nnn
  1232.                 |                  | objects in scene.
  1233.  +MSnnn         | 300 or more      | Set symbol table size (default 1000)
  1234.  +MVn.m         | 1.0 or 2.0       | Set version compatibility mode
  1235.  +Ofilespec     | Varies w/ sys    | Output image filename.
  1236.  +P             |                  | Pause and wait for keypress after
  1237.                 |                  | tracing image.
  1238.  -P             |                  | Don't pause
  1239.  +Qn            |   0 to 9         | Image quality: 9 highest(default) to
  1240.                 |                  | 0 lowest.
  1241.  +Rn or -Rn     |   1 to 9         | Use n*n rays for anti-aliasing. Default
  1242.                 |                  | of 3 gives 9 rays; 4 gives 16 rays etc.
  1243.  +Snn or +SRnn  | 1-32,768         | Start row for tracing
  1244.                 |  or 0.0 to 1.0   | a portion of a scene.
  1245.  +SCnn          | 1-32,768         | Start column for tracing
  1246.                 |  or 0.0 to 1.0   | a portion of a scene.
  1247.  +Vnn           | Varies w/sys     | Display verbose image stats while
  1248.                 |                  | rendering.
  1249.  -V             |                  | No stats during rendering
  1250.  +Wnnn          | 1-32,768         | Width of image in pixels.
  1251.  +X             |                  | Allow abort with keypress.(IBM-PC).
  1252.  -X             |                  | Disable abort with keypress.(IBM-PC).
  1253.  -------------------------------------------------------------------------
  1254.         3.3.1   ANTI-ALIASING
  1255.         3.3.2   BUFFERING
  1256.         3.3.3   CONTINUING
  1257. INTERRUPTED
  1258. TRACE
  1259.         3.3.4   DISPLAY
  1260. PREVIEW
  1261. IMAGE
  1262.         3.3.5   RENDER
  1263. PARTIAL
  1264. IMAGE
  1265.         3.3.6   FILE
  1266. OUTPUT
  1267.         3.3.7   HEIGHT
  1268. WIDTH
  1269. IMAGE
  1270.         3.3.8   INPUT
  1271. OUTPUT
  1272. NAMES
  1273.         3.3.10  ANIMATION
  1274. CLOCK
  1275. VARIABLE
  1276.         3.3.11  LIBRARY
  1277. SEARCH
  1278.         3.3.12  BOUNDING
  1279. SLABS
  1280. CONTROL
  1281.         3.3.13  SYMBOL
  1282. TABLE
  1283.         3.3.14  VERSION
  1284. COMPATIBILITY
  1285.         3.3.15  PAUSE
  1286. FINISHED
  1287.         3.3.16  QUALITY
  1288. SETTINGS
  1289.         3.3.17  VERBOSE
  1290. STATISTICS
  1291.         3.3.18  ALLOW
  1292. ABORTED
  1293. RENDERING
  1294. 3.3.1 ANTI-ALIASING `
  1295.       +Annn       Anti-alias with tolerance level nnn.
  1296.       +A          Anti-alias with tolerance level 0.3
  1297.       -A          Don't anti-alias (default)
  1298.       +Jn.nn      Scale factor for jittering
  1299.       +J          Jitter AA with scale 1.0 (default)
  1300.       -J          Turn off jittering
  1301.       +Rn or -Rn  Use n*n rays when anti-aliasing (default 3)
  1302. Anti-aliasing is a technique used to make the ray traced image look  smoother. Often the color difference between two objects creates a "jaggy"  appearance. When anti-aliasing is turned on, POV-Ray attempts to "smooth"  the jaggies by shooting more rays into the scene and averaging the results.  This technique can really improve the appearance of the final image. Be  forewarned though, anti-aliasing drastically slows the time required to  render a scene since it has do many more calculations to "smooth" the  image. Lower numbers mean more anti-aliasing and also more time. Use anti- aliasing for your final version of a picture, not the rough draft. 
  1303. The +A option enables adaptive anti-aliasing. The number after the +A  option determines the threshold for the anti-aliasing.  
  1304. If the color of a pixel differs from its neighbor (to the left or above) by  more than the threshold, then the pixel is subdivided and super-sampled. If  r1,g1,b1 and r2,g2,b2 are the rgb components of two pixels then the  difference between pixels is computed by: +
  1305.     diff=abs(r1-r2)+abs(g1-g2)+abs(b1-b2)
  1306. The rgb values are in the range 0.0 to 1.0 thus the most two pixels can  differ is 3.0.  If the anti-aliasing threshold is 0.0, then every pixel is  super-sampled. If the threshold is 3.0, then no anti-aliasing is done.  
  1307. The lower the contrast, the lower the threshold should be. Higher contrast  pictures can get away with higher tolerance values. +
  1308. Good values seem to be around 0.2 to 0.4. Y
  1309. The super-samples are jittered to introduce noise and to eliminate moire  interference patterns. Note that the jittering "noise" is non-random and  repeatable in nature, based on an object's 3-D orientation in space. Thus,  it's okay to use anti-aliasing for animation sequences, as the anti-aliased  pixels won't vary and flicker annoyingly from frame to frame.  The +Jnn.nn  switch scales down the amount of jitter from its default value 1.0.  For  example +J0.5 uses half the normal jitter.  Values over 1.0 jitter outside  the pixel bounds and are not recommended.  Use -J to turn off jittering. 
  1310. The +R switch controls the number of rows and columns of rays per pixel  with anti-aliasing.  The default value 3 gives 3x3=9 rays per pixel. >
  1311. The jittering and multiple rays are only used when +A is on. 
  1312. 3.3.2 BUFFERING `
  1313.       +Bnnn       Use an output file buffer of nnn kilobytes. 
  1314.       -Bnnn       Same as +Bnnn
  1315. The +B option allows you to assign large buffers to the output file. This  reduces the amount of time spent writing to the disk. If this parameter is  not specified, then as each scanline is finished, the line is written to  the file and the file is flushed. On most systems, this operation insures  that the file is written to the disk so that in the event of a system crash  or other catastrophic event, at least part of the picture has been stored  properly and retrievable on disk. (see also the +C option below.)  A value  of +B30 is a good value to use to speed up small renderings.  A value of  +B0 defaults to a small system-dependent buffer size.  Note neither +B0 nor  -B turns this feature off.  Once a buffer is set, subsequent +B commands  can change its size but cannot turn it off. 
  1316. 3.3.3 CONTINUING INTERRUPTED TRACE k
  1317.       +C          Continue partially complete rendering
  1318.       -C          Render from beginning (default)
  1319. If you abort a render while it's in progress or if you used the +E or +ER  options to end the render prematurely, you can use the +C option to  continue the render when you get back to it. This option reads in the  previously generated output file, displays the image to date on the screen,  then proceeds with the ray tracing. This option cannot be used if file  output is disabled with -F.  It does not work with +S, +SR, +SC or +EC  switches. 
  1320. 3.3.4 DISPLAY PREVIEW IMAGE \
  1321.       +D          Use preview display
  1322.       -D          Turn preview display off (default)
  1323. If the +D option is used and your computer supports a graphic display, then  the image will be displayed while the program performs the ray tracing. On  most systems, the picture displayed is not as good as the one created by  the post-processor because it does not try to make optimum choices for the  color registers.  Y
  1324. The +D parameters are system-dependent and are listed in the executable  documentation. 
  1325. 3.3.5 RENDER PARTIAL IMAGE 
  1326.       +Snnn or +SRnnn   Start tracing at row number nnn.
  1327.       +SCnnn            Start tracing at column number nnn.
  1328.       +Ennn or +ERnnn   End tracing at row number nnn.
  1329.       +ECnnn            End tracing at column number nnn.
  1330. When doing test rendering it is often convenient to define a rectangular  section of the whole screen so you can quickly check out one area of the  image.  The +S and +E switches let you define starting and ending rows and  columns for partial renderings. 
  1331. The +S and +E options also allow you to begin and end the rendering of an  image at a specific scan line so you can render groups of scanlines on  different systems and concatenate them later. 
  1332. WARNING: Image files created on with different executables on the same or  different computers may not look exactly the same due to different random  number generators used in some textures. If you are merging output files  from different systems, make sure that the random number generators are the  same. If not, the textures from one will not blend in with the textures  from the other.  
  1333. Note if the number following +SR, +SC, +ER or +EC is a greater 1 then it is  interpreted as a number of pixels.  If it is a decimal value between 0.0  and 1.0 then it is interpreted as a percent of the total width or height of  the image.  For example: +SR0.75 +SC0.75 starts on a row 75% down from the  top at a column 75% from the left and thus renders only the lower-right 25%  of the image. 
  1334. 3.3.6 FILE OUTPUT TYPE 
  1335.       +FT         Uncompressed Targa-24 format (IBM-PC Default)
  1336.       +FD         Dump format (QRT-style)
  1337.       +FR         Raw format - one file each for Red, Green and Blue. 
  1338.       +F          Use default file type for your system
  1339.       -F          Turn off file output
  1340. Normally, you don't need to specify any form of +F option. The default  setting will create the correct format image file for your computer. The  docs included with the executable specify which format is used. <
  1341. You can disable image file output by using the command line option -F. This  is only useful if your computer has display options and should be used in  conjunction with the +P option. If you disable file output using -F, there  will be no record kept of the image file generated. This option is not  normally used. ~
  1342. Unless file output is disabled (-F) POV-Ray will create an image file of  the picture. This output file describes each pixel with 24 bits of color  information. Currently, three output file formats are directly supported.   They are +FT - Uncompressed Targa-24 format (IBM-PC Default), +FD - Dump  format (QRT-style) and +FR - Raw format - one file each for Red, Green and  Blue.  
  1343. 3.3.7 HEIGHT AND WIDTH OF IMAGE l
  1344.       +Hnnn or -Hnnn    Set height of image in pixels
  1345.       +Wnnn or -Wnnn    Set width of image in pixels
  1346. These switches set the height and width of the image in pixels.  This  specifies the image size for file output.  The preview display with the +D  option will generally attempt to pick a video mode to accommodate this size  but the +D settings do not in any way affect the resulting file output. 
  1347. 3.3.8 INPUT AND OUTPUT FILE NAMES P
  1348.       +Ifilename  Set the input filename
  1349.       +Ofilename  Set output filename
  1350. The default input filename is "object.pov". The default output filename is  "data" and the suffix for your default file type.  The +O switch has no  effect unless file output is turned on with +F ?
  1351. IBM-PC default file type is Targa, so the file is "data.tga". D
  1352. Amiga uses dump format and the default outfile name is "data.dis". 2
  1353. Raw mode writes three files, "data.red", "data.grn" and "data.blu". On IBM- PC's, the default extensions for raw mode are ".r8", ".g8", and ".b8" to  conform to Piclab's "raw" format. Piclab is a widely used free-ware image  processing program. Normally, Targa files are used with Piclab, not raw  files. 
  1354. 3.3.10 ANIMATION CLOCK VARIABLE 5
  1355.       +Knnn or -Knnn    Set the "clock" float value
  1356. The +K switch may be used to pass a single float value to the program for  basic animation.  The value is stored in the float identifier "clock".  If  an object had a "rotate <0,clock,0>" attached then you could rotate the  object by different amounts over different frames by setting +K10, +K20...  etc. on successive renderings. 
  1357. 3.3.11 LIBRARY SEARCH PATH 9
  1358.       +Lpathspec  Specify on of 10 library search paths
  1359. The +L option may be used to specify a "library" pathname to look in for  include, parameter and image files. Multiple uses of the +L switch do not  override previous settings.  Up to ten +L options may be used to specify a  search path. The home (current) directory will be searched first followed  by the indicated library directories in order. 
  1360. 3.3.12 BOUNDING SLABS CONTROL s
  1361.       -MB         Turn off bounding slabs
  1362.       +MBnnn      Use bounding slabs if more than nnn objects in scene.
  1363. New in POV-Ray 2.0 is a spatial sub-division system called bounding slabs.   It compartmentalizes all of the objects in a scene into rectangular slabs  and computes which slabs a particular ray hits before testing the objects  within the slab.  This can greatly improve rendering speed.  However for  scenes with only a few objects the overhead of using slabs is not worth the  effort.  The +MB switch sets the minimum number of objects before slabs are  used.  The default is +MB25.  The -MB switch turns off slabs completely. 
  1364. 3.3.13 SYMBOL TABLE SIZE E
  1365.       +MSnnn or -MSnnn        Sets symbol table size (default 1000)
  1366. POV-Ray allocates a fixed number of spaces in its symbol table for declared  identifiers.  The default of 1000 may be increased if you get a "Too many  symbols" error message. 
  1367. 3.3.14 VERSION COMPATIBILITY MODE >
  1368.       +MVn.n or -MVn.n        Set version compatibility mode
  1369. While many language changes have been made for POV-Ray 2.0, most version  1.0 syntax still works.  One new feature in 2.0 that is incompatible with  any 1.0 scene files is the parsing of float expressions.  Setting +MV1.0  turns off expression parsing as well as many warning messages so that  nearly all 1.0 files will still work.  The "#version" language directive  also can be used to change modes within scene files.  The +MV switch  affects only the initial setting. 
  1370. 3.3.15 PAUSE WHEN FINISHED 
  1371.       +P          Pause when image is complete so preview image can
  1372.                   be seen.
  1373.       -P          Do not pause.  (default)
  1374. Normally when preview display is on you want to look at the image awhile  before continuing.  The +P switch pauses and waits for you to press a key  before going on. 
  1375. 3.3.16 QUALITY SETTINGS )
  1376.       +Qn or -Qn  Set rendering quality
  1377. The +Q option allows you to specify the image rendering quality, for  quickly rendering images for testing. You may also use -Q with no  difference.  The parameter can range from 0 to 9. The values correspond to  the following quality levels: 5
  1378. 0,1  Just show quick colors. Ambient lighting only. /
  1379.      Quick colors are used only at 5 or below.
  1380. 2,3  Show Diffuse and Ambient light 4,5  Render shadows, use extended lights at 5 but not 4 6,7  Create surface textures 8,9  Compute reflected, refracted, and transmitted rays. 8
  1381. The default is +Q9 (maximum quality) if not specified. 
  1382. 3.3.17 VERBOSE STATISTICS R
  1383.       +V          Verbose statistics on
  1384.       -V          Verbose statistics off
  1385. When the +D option is not used, it is often desirable to monitor progress  of the rendering.  The +V switch turns on verbose reporting while -V turns  it off.  The format of the output is system dependent. 
  1386. 3.3.18 ALLOW ABORTED RENDERING [
  1387.       +X          Allow abort with keypress
  1388.       -X          Disable abort with keypress
  1389. On the IBM-PC versions only, when you specify the +X switch then any  keypress will abort rendering.  The -X switch disables this feature. 
  1390. 3.4   DEFAULT PARAMETER FILE AND ENVIRONMENT VARIABLE ----------------------------------------------------- f
  1391. You may specify the default parameters by modifying the file "povray.def"  which contains the parameters in the above format. This filename contains a  complete command line as though you had typed it in, and is processed  before any options supplied on the command line are recognized. You may put  commands on more than one line in the "povray.def" file. 
  1392. Examples: 1
  1393.   POVRAY +Ibox.pov +Obox.tga +V +X +W320 +H200 
  1394.      +Ibox.pov = Use the scene file box.pov for input
  1395.      +Obox.tga = Output the image as a Targa file to box.tga 
  1396.      +V = Show line numbers while rendering.
  1397.      +X = Allow key press to abort render.
  1398.      +W320 = Set image width to 320 pixels
  1399.      +H200 = Set image height to 200 pixels
  1400. Some of these parameters could have been put in the POVRAYOPT environment  variable to save typing: %
  1401.   SET POVRAYOPT = +V +X +W320 +H200
  1402. Then you could just type: 
  1403.   POVRAY +Ibox.pov +Obox.tga 
  1404. Or, you could create a file called POVRAY.DEF in the same directory as the  scene file.  If POVRAY.DEF contains "+V +X +W320 +H200" then you could also  type: 
  1405.   POVRAY +Ibox.pov +Obox.tga 
  1406. With the same results. You could also create an option file with a  different name and specify it on the command line: Q
  1407. For example, if QUICK.DEF contains "+V +X +W80 +H60" then you could also  type: (
  1408.   POVRAY +Ibox.pov +Obox.tga QUICK.DEF
  1409. When POV-Ray sees QUICK.DEF, it will read it in just as if you typed it on  the command line. P
  1410. The order that the options are read in for the IBM-PC version are as  follows: "
  1411.   POVRAYOPT environment variable
  1412.   POVRAY.DEF in current directory or,
  1413.              if not found, in library path
  1414.   Command line and command line option files
  1415. For example, +V in POVRAY.DEF would override -V in POVRAYOPT. +X on the  command line would override -X in POVRAY.DEF and so on. 
  1416. Other computer's versions may read in the POVRAY.DEF file before the  POVRAYOPT environment variable.  See the documentation on your version. 
  1417. 4.0   BEGINNING TUTORIAL ======================== x
  1418. This section describes how to create a scene using POV-Ray's scene  description language and how to render this scene. N
  1419.      4.1 YOUR
  1420. FIRST
  1421. IMAGE
  1422.      4.2 MORE
  1423. TEXTURE
  1424. OPTIONS
  1425.      4.3 MORE
  1426. SHAPES
  1427. 4.1   YOUR FIRST IMAGE ---------------------- y
  1428. Let's create the scene file for a simple picture. Since ray tracers thrive  on spheres, that's what we'll render first. 
  1429.         4.1.1   THE
  1430. POV-Ray
  1431. COORDINATE
  1432. SYSTEM
  1433.         4.1.2   ADDING
  1434. STANDARD
  1435. INCLUDE
  1436. FILES
  1437.         4.1.3   PLACING
  1438. CAMERA
  1439.         4.1.4   DESCRIBING
  1440. OBJECT
  1441.         4.1.5   ADDING
  1442. TEXTURE
  1443. OBJECT
  1444.         4.1.6   DEFINING
  1445. LIGHT
  1446. SOURCE
  1447. 4.1.1 THE POV-Ray COORDINATE SYSTEM '
  1448. First, we have to tell POV-Ray where our camera is and where it's looking.  To do this, we use 3D coordinates. The usual coordinate system for POV-Ray  has the positive Y axis pointing up, the positive X axis pointing to the  right, and the positive Z axis pointing into the screen as follows: F
  1449.     ^+Y
  1450.     |   /+Z
  1451.     |  /
  1452.     | /
  1453.     |/        +X
  1454.     |-------->
  1455. The negative values of the axes point the other direction, as follows: 
  1456.           ^+Y
  1457.           |   /+Z
  1458.           |  /
  1459.           | /
  1460.   -X      |/        +X
  1461.   <-------|-------->
  1462.          /|
  1463.         / |
  1464.        /  |
  1465.     -Z/   |
  1466.           v-Y
  1467. 4.1.2 ADDING STANDARD INCLUDE FILES 
  1468. Using your personal favorite text editor, create a file called  "picture1.pov". Now, type in the following (note: The input is case  sensitive, so be sure to get capital and lowercase letters correct): 
  1469.       #include "colors.inc"    // The include files contain
  1470.       #include "shapes.inc"    // pre-defined scene elements
  1471.       #include "textures.inc"
  1472.       camera {
  1473.         location  <0, 2, -3>
  1474.         look_at   <0, 1,  2>
  1475.       }
  1476. The first include statement reads in definitions for various useful colors.  The second and third include statements read in some useful shapes and  textures respectively. When you get a chance, have a look through them to  see but a few of the many possible shapes and textures available. 
  1477. You may have as many include files as needed in a scene file. Include files  may themselves contain include files, but you are limited to declaring  includes nested only 10 "deep". 
  1478. Filenames specified in the include statements will be searched for in the  home (current) directory first, and if not found, will then be searched for  in directories specified by any "+L" (library path) options active. This  would facilitate keeping all your "include" (.inc) files such as  shapes.inc, colors.inc, and textures.inc in an "include" subdirectory, and  giving an "+L" option on the command line to where your library of include  files are. 
  1479. 4.1.3 PLACING THE CAMERA v
  1480. The camera declaration describes where and how the camera sees the scene.  It gives X, Y, Z coordinates to indicate the position of the camera and  what part of the scene it is pointing at. You describe X, Y, Z coordinates  using a 3-part "vector".  A vector is specified by putting 3 numeric values  between a pair of angle brackets and separating the values with commas. 
  1481. Briefly, "location <0, 2, -3>" places the camera up two units and back  three units from the center of the ray tracing universe which is at <0, 0,  0>. Remember that by default +Z is into the screen and -Z is back out of  the screen. 
  1482. Also "look_at <0, 1, 2>" rotates the camera to point at X, Y, Z coordinates  <0, 1, 2>.  A point 5 units in front of and 1 unit lower than the camera.  The look_at point should be the center of attention of your image. 
  1483. 4.1.4 DESCRIBING AN OBJECT 
  1484. Now that the camera is set up to record the scene, let's place a red sphere  into the scene.  Type the following into your scene file: 
  1485.       sphere {
  1486.         <0, 1, 2>, 2
  1487.         texture {
  1488.           pigment {color Yellow}  // Yellow is pre-defined in COLORS.INC
  1489.         }
  1490.       }
  1491. The first vector specifies center of the sphere.  In this example the X  coordinate is zero so it is centered left and right.  It is also at Y=1 or  1 unit up from the origin. The Z coordinate is 2 which is 5 units in front  of the camera at Z=-3. After the center vector is a comma followed by the  radius which in this case is 2 units. Since the radius is 1/2 the width of  a sphere, the sphere is 4 units wide.  
  1492. 4.1.5 ADDING TEXTURE TO AN OBJECT 
  1493. Now that we've defined the location and size of the sphere, we need to  describe the appearance of the surface.  The texture {...} block specifies  these parameters.  Texture blocks describe the color, bumpiness and finish  properties of an object.  In this example we will specify the color only.   This is the minimum we must do.  All other texture options except color  will use the default values. 
  1494. The color you define is the way you want it to look if fully illuminated.   If you were painting a picture of a sphere you would use dark shades of a  color to indicate the shadowed side and bright shades on the illuminated  side.  However ray tracing takes care of that for you.  You pick the basic  color inherent in the object and POV-Ray brightens or darkens it depending  on the lighting in the scene.  Because we are defining the basic color the  object actually IS rather than how it LOOKS the parameter is called  "pigment". 9
  1495. Many types of color patterns are available for use in a pigment {...}  statement.  The keyword "color" specifies that the whole object is to be  one solid color rather than some pattern of colors.  The word "Yellow" is a  color identifier which was previously defined in the standard include file  "colors.inc". 
  1496. If no standard color is available for your needs, you may define your own  color by using the color keyword followed by "red", "green" and "blue"  keywords specifying the amount of red, green and blue to be mixed.  For  example a nice shade of pink can be specified by: (
  1497.       color red 1.0 green 0.8 blue 0.8
  1498. The values after each keyword should be in the range 0.0 to 1.0.  Any of  the three components not specified will default to 0.  A shortcut notation  may also be used.  The following produces the same shade of pink: !
  1499.       color rgb <1.0, 0.8, 0.8>
  1500. Colors are explained in more detail later. 
  1501. 4.1.6 DEFINING A LIGHT SOURCE 
  1502. One more detail is needed for our scene.  We need a light source. Until you  create one, there is no light in this virtual world.  Add the following  text to your scene file: .
  1503.       light_source { <2, 4, -3> color White}
  1504. The vector specifies the location of the light as 2 units to our right, 4  units above the origin and 3 units back from the origin. The light_source  is invisible, it only casts light, so no texture is needed. R
  1505. That's it!  Close the file and render a small picture of it using this  command: 6
  1506.       POVRAY +W160 +H120 +P +X +D0 -V -Ipicture1.pov
  1507. If your computer does not use the command line, see the executable docs for  the correct command to render a scene. +
  1508. You may set any other command line options you like, also. The scene is  output to the image file DATA.TGA (or some suffix other than TGA if your  computer uses a different file format). You can convert DATA.TGA to a GIF  image using the commands listed in the docs included with your executable.  
  1509. 4.2   MORE TEXTURE OPTIONS -------------------------- s
  1510. You've now rendered your first picture but it is somewhat boring.  Let's  add some fancy features to the texture. 
  1511.         4.2.1   SURFACE
  1512. FINISHES
  1513.         4.2.2   ADDING
  1514. BUMPINESS
  1515.         4.2.3   CREATING
  1516. COLOR
  1517. PATTERNS
  1518.         4.2.4   PRE-DEFINED
  1519. TEXTURES
  1520. 4.2.1 SURFACE FINISHES *
  1521. One of the main features of a ray tracer is its ability to do interesting  things with surface finishes such as highlights and reflection.  Let's add  a nice little phong highlight (shiny spot) to the sphere. To do this you  need a "finish" parameter. Change the definition of the sphere to this: 
  1522.       sphere {
  1523.         <0, 1, 2>, 2
  1524.         texture {
  1525.           pigment {color Yellow}  // Yellow is pre-defined in COLORS.INC
  1526.           finish {phong 1}
  1527.         }
  1528.       }
  1529. Now render this the same way you did before. The phong keyword adds a  highlight the same color of the light shining on the object. It adds a lot  of credibility to the picture and makes the object look smooth and shiny.  Lower values of phong will make the highlight less bright. Phong can be  between 0 and 1. 
  1530. 4.2.2 ADDING BUMPINESS 
  1531. The highlight you've added illustrates how much of our perception depends  on the reflective properties of an object.  Ray tracing can exploit this by  playing tricks on our perception to make us see complex details that aren't  really there. 
  1532. Suppose you wanted a very bumpy surface on the object.  It would be very  difficult to mathematically model lots of bumps.  We can however simulate  the way bumps look by altering the way light reflects off of the surface.   Reflection calculations depend on a vector called a "surface normal"  vector.  This is a vector which points away from the surface and is  perpendicular to it.  By artificially modifying (or perturbing) this normal  vector you can simulate bumps.  Change the scene to read as follows and  render it: 
  1533.       sphere {
  1534.         <0, 1, 2>, 2
  1535.         texture {
  1536.           pigment {color Yellow}
  1537.           normal {bumps 0.4   scale 0.2}
  1538.           finish {phong 1}
  1539.         }
  1540.       }
  1541. This tells POV-Ray to use a bump pattern to modify the surface normal.  The  value 0.4 controls the apparent depth of the bumps.  Usually the bumps are  about 1 unit wide which doesn't work very well with a sphere of radius 2.   The scale makes the bumps 1/5th as wide but does not affect their depth.  
  1542. 4.2.3 CREATING COLOR PATTERNS 
  1543. You can do more than assign a solid color to an object.  You can create  complex patterns in the pigment block.  Consider this example: e
  1544.       sphere {
  1545.         <0, 1, 2>, 2
  1546.         texture {
  1547.           pigment {
  1548.             wood
  1549.             color_map {
  1550.               [0.0 color DarkTan]
  1551.               [0.9 color DarkBrown]
  1552.               [1.0 color VeryDarkBrown]
  1553.             }
  1554.             turbulence 0.05
  1555.             scale <0.2, 0.3, 1>
  1556.           }
  1557.           finish {phong 1}
  1558.         }
  1559.       }
  1560. The keyword "wood" specifies a pigment pattern of concentric rings like  rings in wood.  The color_map specifies that the color of the wood should  blend from DarkTan to DarkBrown over the first 90% of the vein and from  DarkBrown to VeryDarkBrown over the remaining 10%.  The turbulence slightly  stirs up the pattern so the veins aren't perfect circles and the scale  factor adjusts the size of the pattern. n
  1561. The most of the patterns are set up by default to give you one "feature"  across a sphere of radius 1.0. A "feature" is very roughly defined as a  color transition. For example, a wood texture would have one band on a  sphere of radius 1.0. In this example we scale the pattern using the  "scale" keyword followed by a vector.  In this case we scaled 0.2 in the x  direction, 0.3 in the y direction an the z direction is scaled by 1, which  leaves it unchanged. Scale values larger than 1 will stretch an element.  Scale values smaller than one will squish an element. And scale value 1  will leave an element unchanged. 
  1562. 4.2.4 PRE-DEFINED TEXTURES O
  1563. POV-Ray has some very sophisticated textures pre-defined in the standard  include files "textures.inc" and "stones.inc".  Some are entire textures  with pigment, normal and/or finish parameters already defined.  Some are  just pigments or just finishes.   Change the definition of our sphere to  the following and then re-render it:  H
  1564.       sphere {
  1565.         <0, 1, 2>, 2
  1566.         texture {
  1567.           pigment {
  1568.             DMFWood4    // Pre-defined from textures.inc
  1569.             scale 4     // Scale by the same amount in all
  1570.                         // directions
  1571.           }
  1572.           finish {Shiny}      // This finish defined in textures.inc
  1573.         }
  1574.       }
  1575. The pigment identifier DMFWood4 has already been scaled down quite small  when it was defined.  For this example we want to scale the pattern larger.   Because we want to scale it uniformly we can put a single value after the  scale keyword rather than a vector of x,y,z scale factors. 
  1576. Look through the file TEXTURES.INC to see what pigments and finishes are  defined and try them out. Just insert the name of the new pigment where  DMFWood1 is now or try a different finish in place of Shiny and re-render  your file.  Y
  1577. Here is an example of using a complete texture identifier rather than just  the pieces. O
  1578.       sphere {
  1579.         <0, 1, 2>, 2
  1580.         texture { PinkAlabaster }
  1581.       }
  1582. 4.3   MORE SHAPES ----------------- 
  1583. So far, we've just used the sphere shape. There are many other types of  shapes that can be rendered by POV-Ray.  First let's make some room in the  image by changing the sphere from a radius of 2 to a radius of 1 like this: F
  1584.       sphere {
  1585.         <0, 1, 2>, 1
  1586.         texture { ... and so on.
  1587.         4.3.1   PLANE
  1588. OBJECT
  1589.         4.3.2   BOX
  1590. OBJECT
  1591.         4.3.3   CONE
  1592. OBJECT
  1593.         4.3.4   CYLINDER
  1594. OBJECT
  1595. 4.3.1 PLANE OBJECT s
  1596. Let's try out a computer graphics standard - "The Checkered Floor."  Add  the following object to your .pov file: 
  1597.       plane {
  1598.         <0, 1, 0>, 0
  1599.         pigment {
  1600.           checker
  1601.             color Red
  1602.             color Blue
  1603.         }
  1604.       }
  1605. The object defined here is an infinite plane. The vector <0, 1, 0> is the  surface normal of the plane (i.e., if you were standing on the surface, the  normal points straight up.) The number afterward is the distance that the  plane is displaced along the normal from the origin - in this case, the  floor is placed at Y=0 so that the sphere at Y=1, radius= 1, is resting on  it.  
  1606. Notice that there is no "texture{...}" statement.  There really is an  implied texture there.  You might find that continually typing statements  that are nested like "texture {pigment {...}}" can get to be a tiresome so  POV-Ray lets you leave out the "texture{...}" under many circumstances.  In  general you only need the texture block surrounding a texture identifier  (like the PinkAlabaster example above), or when creating layered textures  (which are covered later).   m
  1607. This pigment uses the checker color pattern and specifies that the two  colors red and blue should be used. 
  1608. Because the vectors <1,0,0>, <0,1,0> and <0,0,1> are used frequently, POV- Ray has 3 built-in vector identifiers "x", "y", and "z" respectively that  can be used as shorthand.  Thus the plane could be defined as: 6
  1609.       plane { 
  1610.         y,0
  1611.         pigment {... etc.
  1612. Note that you do not use angle brackets around vector identifiers. =
  1613. Looking at the floor, you'll notice that the ball casts a shadow on the  floor. Shadows are calculated very accurately by the ray tracer and creates  precise, sharp shadows.  In the real world, penumbral or "soft" shadows are  often seen. Later you'll learn how to use extended light sources to soften  the shadows. 
  1614. 4.3.2 BOX OBJECT 
  1615. There are several other simple shapes available in POV-Ray.  The most  common are the box, cylinder and cone.  Try these examples in place of the  sphere: l
  1616.       box {
  1617.         <-1,0  ,-1>,     // Near lower left corner
  1618.         < 1,0.5, 3>      // Far upper right corner
  1619.         pigment {
  1620.           DMFWood4      // Pre-defined from textures.inc
  1621.           scale 4       // Scale by the same amount in all
  1622.                         // directions
  1623.         }
  1624.         rotate y*20     // Equivalent to "rotate <0,20,0>"
  1625.       }
  1626. In this example you can see that a box is defined by specifying the 3D  coordinates of opposite corners.  The first vector must be the minimum  x,y,z coordinates and the 2nd vector must be the maximum x,y,z values.  Box  objects can only be defined parallel to the axes.  You can later rotate  them to any angle.  Note that you can perform simple math on values and  vectors.  In the rotate parameter we multiplied the vector identifier "y"  by 20.  This is the same as "<0,1,0>*20" or "<0,20,0>".   
  1627. 4.3.3 CONE OBJECT 
  1628. Here's another example: 
  1629.       cone {
  1630.         <0,1,0>,0.3    // Center and radius of one end
  1631.         <1,2,3>,1.0    // Center and radius of other end
  1632.         pigment {DMFWood4  scale 4 }
  1633.         finish {Shiny}
  1634.       }
  1635. The cone shape is defined by the center and radius of each end.  In this  example one end is at location <0,1,0> and has radius of 0.3 while the  other end is centered at <1,2,3> with radius 1.  If you want the cone to  come to a sharp point then use a 0 radius.  The solid end caps are parallel  to each other and perpendicular to the cone axis.  If you want a hollow  cone with no end caps then add the keyword "open" after the 2nd radius like  this: 
  1636.       cone {
  1637.         <0,1,0>,0.3    // Center and radius of one end
  1638.         <1,2,3>,1.0    // Center and radius of other end
  1639.         open           // Removes end caps
  1640.         pigment {DMFWood4  scale 4 }
  1641.         finish {Shiny}
  1642.       }
  1643. 4.3.4 CYLINDER OBJECT +
  1644. You may also define a cylinder like this: 
  1645.       cylinder {
  1646.         <0,1,0>,       // Center of one end
  1647.         <1,2,3>,       // Center of other end
  1648.         0.5            // Radius
  1649.         open           // Remove end caps
  1650.         pigment {DMFWood4  scale 4 }
  1651.         finish {Shiny}
  1652.       }
  1653. Finally the standard include file "shapes.inc" contains some pre-defined  shapes that are about the size of a sphere with a radius of one unit.  You  can invoke them like this: 
  1654.       object {
  1655.         UnitBox
  1656.         pigment {DMFWood4  scale 4 }
  1657.         finish {Shiny}
  1658.         scale 0.75
  1659.         rotate <-20,25,0>
  1660.         translate y
  1661.       }
  1662. That's the end of our brief tutorial.  We've only scratched the surface.   The rest of this document provides a reference to all of POV-Ray's  features. 
  1663. 5.0   SCENE DESCRIPTION LANGUAGE REFERENCE ========================================== 
  1664. The Scene Description Language allows the user to describe the world in a  readable and convenient way.  Files are created in plain ASCII text using  an editor of your choice.  POV-Ray reads the file, processes it by creating  an internal model of the scene and the renders the scene. ~
  1665.      5.1 LANGUAGE
  1666. BASICS
  1667.      5.2 OBJECTS
  1668.      5.3 OBJECT
  1669. MODIFIERS
  1670.      5.4 TEXTURES
  1671.      5.5 CAMERA
  1672.      5.6 MISC
  1673. FEATURES
  1674. 5.1   LANGUAGE BASICS --------------------- w
  1675. The POV-Ray language consists of identifiers, reserved keywords, floating  point literals, string literals, special symbols and comments.  The text of  a POV-Ray scene file is free format.  You may put statements on separate  lines or on the same line as you desire.  You may add blank lines, spaces  or indentations as long as you do not split any keywords or identifiers. 
  1676.         5.1.1   IDENTIFIERS
  1677. KEYWORDS
  1678.         5.1.2   COMMENTS
  1679.         5.1.3   INCLUDE
  1680. FILES
  1681.         5.1.4   FLOAT
  1682. EXPRESSIONS
  1683.         5.1.5   VECTOR
  1684. EXPRESSIONS
  1685.         5.1.6   TRANSFORMATIONS
  1686.         5.1.7   DECLARE
  1687. 5.1.1 IDENTIFIERS AND KEYWORDS C
  1688. POV-Ray allows you to define identifiers for later use in the file.  An  identifier may be 1 to 40 characters long.  It may consist of upper or  lower case letters, the digits 0 through 9 or an underscore character.  The  first character must be an alphabetic character.  The declaration of  identifiers is covered later. 
  1689. POV-Ray has a number of reserved words which are used in the language.  All  reserved words are fully lower case.  Therefore it is recommended that your  identifiers contain at least 1 upper case character so it is sure to avoid  conflict with reserved words. 1
  1690. The following keywords are reserved in POV-Ray: 
  1691.  adaptive               height_field           rgbf
  1692.  agate                  hexagon                right
  1693.  agate_turb             iff                    ripples
  1694.  all                    image_map              rotate
  1695.  alpha                  include                roughness
  1696.  ambient                interpolate            scale
  1697.  area_light             intersection           sky
  1698.  background             inverse                smooth
  1699.  bicubic_patch          ior                    smooth_triangle
  1700.  blob                   jitter                 specular
  1701.  blue                   lambda                 sphere
  1702.  bounded_by             leopard                spotlight
  1703.  box                    light_source           spotted
  1704.  bozo                   location               sturm
  1705.  brilliance             looks_like             texture
  1706.  bumps                  look_at                tga
  1707.  bump_map               mandel                 threshold
  1708.  bump_size              map_type               tightness
  1709.  camera                 marble                 tile2
  1710.  checker                material_map           tiles
  1711.  clipped_by             max_intersections      torus
  1712.  clock                  max_trace_level        translate
  1713.  color                  merge                  triangle
  1714.  color_map              metallic               turbulence
  1715.  colour                 normal                 type
  1716.  colour_map             no_shadow              union
  1717.  component              object                 up
  1718.  composite              octaves                use_color
  1719.  cone                   omega                  use_colour
  1720.  crand                  once                   use_index
  1721.  cubic                  onion                  u_steps
  1722.  cylinder               open                   version
  1723.  declare                phase                  v_steps
  1724.  default                phong                  water_level
  1725.  dents                  phong_size             waves
  1726.  difference             pigment                wood
  1727.  diffuse                plane                  wrinkles
  1728.  direction              point_at               x
  1729.  disc                   poly                   y
  1730.  distance               pot                    z
  1731.  dump                   quadric
  1732.  falloff                quartic
  1733.  filter                 quick_color
  1734.  finish                 quick_colour
  1735.  flatness               radial
  1736.  fog                    radius
  1737.  frequency              raw
  1738.  gif                    red
  1739.  gradient               reflection
  1740.  granite                refraction
  1741.  green                  rgb
  1742. 5.1.2 COMMENTS 
  1743. Comments are text in the scene file included to make the scene file easier  to read or understand. They are ignored by the ray tracer and are there for  humans to read.  There are two types of comments in POV-Ray. 
  1744. Two slashes are used for single line comments.  Anything on a line after a  double slash // is ignored by the ray tracer.  For example: 
  1745.   // This line is ignored
  1746. You can have scene file information on the line in front of the comment, as  in: +
  1747.   object { FooBar }  // this is an object
  1748. The other type of comment is used for multiple lines.  This type of comment  starts with /* and ends with */ everything in-between is ignored.  For  example: 
  1749. /* These lines -
  1750.     Are ignored 
  1751.     By the
  1752.     Raytracer */
  1753. This can be useful if you want to temporarily remove elements from a scene  file.   /*...*/ comments can "comment out" lines containing the other //  comments, and thus can be used to temporarily or permanently comment out  parts of a scene.  /*..*/ comments can be nested, the following is legal: 
  1754. /* This is a comment (
  1755.     // This too
  1756.     /* This also */
  1757. Use comments liberally and generously. Well used, they really improve the  readability of scene files. 
  1758. 5.1.3 INCLUDE FILES H
  1759. The language allows include files to be specified by placing the line: 
  1760.     #include "filename.inc"
  1761. at any point in the input file. The filename must be enclosed in double  quotes and may be up to 40 characters long (or your computer's limit),  including the two double-quote (") characters.  
  1762. The include file is read in as if it were inserted at that point in the  file. Using include is the same as actually cutting and pasting the entire  contents of this file into your scene.  |
  1763. Include files may be nested. You may have at most 10 nested include files.   There is no limit on un-nested include files. 
  1764. Generally, include files have data for scenes, but are not scenes in  themselves. By convention scene files end in .pov and include files end  with .inc. 
  1765. 5.1.4 FLOAT EXPRESSIONS 
  1766. Many parts of the POV-Ray language require you to specify one or more  floating point numbers.  A floating point number is a number with a decimal  point.  Float literals are represented by an optional sign (-), some  digits, an optional decimal point, and more digits.  If the number is an  integer you may omit the decimal point and trailing zero.  If it is all  fractional you may omit the leading zero.  POV-Ray supports scientific  notation for very large or very small numbers.  The following are all valid  float literals: A
  1767.       1.0   -2.0  -4    34    3.4e6       2e-5        .3    0.6
  1768. Float identifiers may be declared and used anywhere a float can be used.   See section 5.1.7 on declaring identifiers.   
  1769. Complex float expressions can be created using + - * / ( ) with float  literals or identifiers.  Assuming the identifiers have been previously  declared as floats, the following are valid float expressions: =
  1770.       1+2+3       2*5         1/3         Row*3       Col*5
  1771.       (Offset-5)/2            This/That+Other*Thing
  1772. Expressions are evaluated left to right with innermost parenthesis  evaluated first, then unary + or -, then multiply or divide, then add or  subtract. O
  1773. There are two built-in float identifiers.  The identifier "version" is the  current setting of the version compatibility switch (See +MV under command- line switches).  This allows you to save and restore the previous version  switch.  For example suppose MYSTUFF.INC is in version 1.0 format.  At the  top of the file you could put: r
  1774.   #declare Temp_Vers = version    // Save previous value
  1775.   #version 1.0                    // Change to 1.0 mode
  1776.   ...   // Version 1.0 stuff goes here...
  1777.   #version Temp_Vers              // Restore previous version
  1778. The other float identifier is "clock".  Its value is set by the +K command- line switch. (See +K under command-line switches).  This allows you to do  limited animation control.  For example you could move an object using: 
  1779.    translate <0.1*clock,0,0>
  1780. and render successive frames with +K1, +K2, +K3 etc.  In each frame the  object would move 1/10th of a unit. 
  1781. 5.1.5 VECTOR EXPRESSIONS D
  1782. POV-Ray operates in a 3D x,y,z coordinate system.  Often you will need to  specify x, y and z values.  A "vector" is a set of three float values used  for such specification.  Vectors consist of three float expressions that  are bracketed by angle brackets < and >.  The three terms are separated by  commas.  For example: 
  1783.      < 1.0, 3.2, -5.4578 >
  1784. The commas are necessary to keep the program from thinking that the 2nd  term is "3.2-5.4578" and that there is no 3rd term.  If you see an error  message "Float expected but '>' found instead" it probably means two floats  were combined because a comma was missing. T
  1785. The three values correspond to the x, y and z directions respectively. For  example, the vector <1,2,3> means the point that's 1 unit to the right, 2  units up, and 3 units in front the center of the "universe" at <0,0,0>.  Vectors are not always points, though. They can also refer to an amount to  size, move, or rotate a scene element. -
  1786. Vectors may also be combined in expressions the same as float values.  For  example <1,2,3>+<4,5,6> evaluates as <5,7,9>.  Subtraction, multiplication  and division are also performed on a term-by-term basis.  You may also  combine floats with vectors.  For example 5*<1,2,3> evaluates as <5,10,15>. 
  1787. Sometimes POV-Ray requires you to specify floats and vectors side-by-side.   Thus commas are required separators whenever an ambiguity might arise.  For  example <1,2,3>-4 evaluates as <-3,-2,-1> but <1,2,3>,-4 is a vector  followed by a float. z
  1788. Vector identifiers may be declared and used anywhere a vector can be used.   See section 5.1.7 on declaring identifiers. !
  1789. Because vectors almost always refer to the x, y and z coordinates, POV-Ray  has three built-in vector identifiers "x "y" and "z".  Like all POV-Ray  keywords they must be lower case.  The vector identifier x is equivalent to  the vector <1,0,0>.  Similarly y is <0,1,0> and z is <0,0,1>. 
  1790. Thus an expression like 5*x evaluates to 5*<1,0,0> or <5,0,0>.  The use of  these identifiers can make the scene file easier to read. 
  1791. 5.1.6 TRANSFORMATIONS 
  1792. Vectors are used not only as a notation for a point in space but are used  in the transformations scale, rotate, and translate. Scale sizes a texture  or object. Translate moves a texture or object. And rotate turns a texture  or object. 
  1793.         5.1.6.1 Translate
  1794.         5.1.6.2 Scale
  1795.         5.1.6.3 Rotate
  1796.         5.1.6.4 Transforming
  1797. Textures
  1798. Objects
  1799.         5.1.6.5 Transformation
  1800. Order
  1801. 5.1.6.1     Translate A
  1802. An object or texture pattern may be moved by adding a "translate"  parameter.  It consists of the keyword "translate" followed by a vector.   The terms of the vector specify the number of units to move in each of the  x, y, and z directions.  Translate moves the element relative to it's  current position. For example, P
  1803.   sphere { <10, 10, 10>, 1 
  1804.     pigment { Green }
  1805.     translate <-5, 2, 1>
  1806. Will move the sphere from <10, 10, 10> to <5, 12, 11>.  It does not move it  to absolute location <5, 2, 1>. Translating by zero will leave the element  unchanged on that axis. For example, O
  1807.   sphere { <10, 10, 10>, 1 
  1808.     pigment { Green }
  1809.     translate <0, 0, 0>
  1810. Will not move the sphere at all. 
  1811. 5.1.6.2     Scale {
  1812. You may change the size of an object or texture pattern by adding a "scale"  parameter.  It consists of the keyword "scale" followed by a vector or a  single float value.  If a vector is used, terms of the vector specify the  amount of scaling in each of the x, y, and z directions.  If a float value  is used, the item is uniformly scaled by the same amount in all directions. l
  1813. Scale, is used to "stretch" or "squish" an element. Values larger than 1  stretch the element on that axis. Values smaller than one are used to  squish the element on that axis. Scale is relative to the current element  size. If the element has been previously re-sized using scale, then scale  will size relative to the new size. Multiple scale values may used. 
  1814. 5.1.6.3     Rotate 
  1815. You may change the orientation of an object or texture pattern by adding a  "rotate" parameter.  It consists of the keyword "rotate" followed by a  vector.  The three terms of the vector specify the number of degrees to  rotate about each of the x, y, and z axes.   1
  1816. Note that the order of the rotations does matter.  Rotations occur about  the x axis first, then the y axis, then the z axis.  If you are not sure if  this is what you want then you should use multiple rotation statements to  get a correct rotation. You should only rotate on one axis at a time. As  in, 
  1817.    rotate <0, 30, 0>  // 30 degrees around Y axis then,
  1818.    rotate <-20, 0, 0> // -20 degrees around X axis then,
  1819.    rotate <0, 0, 10>  // 10 degrees around Z axis.
  1820. Rotation is always performed relative to the axis.  Thus if an object is  some distance from the axis of rotation, its will not only rotate but it  will "orbit" about the axis as though it was swinging around on an  invisible string.   
  1821. To work out the rotation directions, you must perform the famous "Computer  Graphics Aerobics" exercise. Hold up your left hand. Point your thumb in  the positive direction of the axis of rotation. Your fingers will curl in  the positive direction of rotation. Similarly if you point your thumb in  the negative direction of the axis your fingers will curl in the negative  direction of rotation.  This is the famous "left-hand coordinate system".  
  1822.                ^
  1823.              +Y|   +Z/ _
  1824.                |    /_| |_  _
  1825.                |   _| | | |/ \
  1826.                |  | | | | |  |
  1827.                | /| | | | |  V
  1828.      -X        |/ | | | | |    +X
  1829.     <----------+--|-|-|-|-|------>
  1830.               /|  |       \____
  1831.              / |  |         ___|
  1832.             /  |  \        /
  1833.            /   |   |      /
  1834.         -Z/  -Y|
  1835.          /     |
  1836. In this illustration, the left hand is curling around the X axis. The thumb  points in the positive X direction and the fingers curl over in the  positive rotation direction. 
  1837. If you want to use a right hand system, as some CAD systems such as AutoCAD  do, the "right" vector in the camera specification needs to be changed. See  the detailed description of the camera.  In a right handed system you use  your right hand for the "Aerobics".  
  1838. 5.1.6.4     Transforming Textures and Objects 
  1839. When an object is transformed, all textures attached to the object AT THAT  TIME are transformed as well. This means that if you have a translate,  rotate, or scale in an object BEFORE a texture, the texture will not be  transformed. If the scale, translate, or rotate is AFTER the texture then  the texture will be transformed with the object.  If the transformation is  INSIDE the "texture { }" statement then ONLY THE TEXTURE is affected.  The  shape remains the same.  For example: 
  1840.    sphere { <0, 0, 0>, 1
  1841.      texture { White_Marble }  // texture identifier from TEXTURES.INC
  1842.      scale 3                   // This scale affects both the 
  1843.                                // shape and texture
  1844.    sphere { <0, 0, 0>, 1
  1845.      scale 3             // This scale affects the shape only
  1846.      texture { White_Marble }  
  1847.    sphere { <0, 0, 0>, 1
  1848.      texture { 
  1849.        White_Marble      
  1850.        scale 3           // This scale affects the texture only
  1851.      }  
  1852. Transformations may also be independently applied to pigment patterns and  surface normal (bump) patterns.  Note scaling a normal pattern affects only  the width and spacing.  It does not affect the height or depth.  For  example: 
  1853.    box { <0, 0, 0>, <1, 1, 1>
  1854.      texture { 
  1855.        pigment {
  1856.          checker color Red color White
  1857.          scale 0.25  // This affects only the color pattern
  1858.        }
  1859.        normal {
  1860.          bumps 0.3   // This specifies apparent height of bumps
  1861.          scale 0.2   // Scales diameter and space between bumps but not
  1862.                      //  not the height. Has no effect on color pattern.
  1863.        }
  1864.        rotate y*45   // This affects the entire texture but not
  1865.      }               //  the object. 
  1866. 5.1.6.5     Transformation Order 
  1867. Because rotations are always relative to the axis and scaling is relative  to the origin, you will generally want to create an object at the origin  and scale and rotate it first.  Then you may translate it into its proper  position.  It is a common mistake to carefully position an object and then  to decide to rotate it.  Because a rotation of an object causes it to orbit  the axis, the position of the object may change so much that it orbits out  of the field of view of the camera! 
  1868. Similarly scaling after translation also moves an object unexpectedly. If  you scale after you translate, the scale will multiply the translate  amount. For example: "
  1869.   translate <5, 6, 7>
  1870.   scale 4 
  1871. Will translate to 20, 24, 28 instead of 5, 6, 7. Be careful when  transforming to get the order correct for your purposes. 
  1872. 5.1.7 DECLARE 
  1873. The parameters used to describe the scene elements can be tedious to use at  times. Some parameters are often repeated and it seems wasteful to have to  type them over and over again. To make this task easier, the program allows  users to create identifiers as synonyms for a pre-defined set of parameters  and use them anywhere the parameters would normally be used. For example,  the color white is defined in the POV-Ray language as: 
  1874.    color red 1 green 1 blue 1
  1875. This can be pre-defined in the scene as: 0
  1876.    #declare White = color red 1 green 1 blue 1
  1877. and then substituted for the full description in the scene file, for  example: Q
  1878.    sphere { 
  1879.      <0, 0, 0>, 1
  1880.      pigment { color red 1 green 1 blue 1 }
  1881. becomes: 0
  1882.    #declare White = color red 1 green 1 blue 1
  1883.    sphere { 
  1884.      <0, 0, 0>, 1
  1885.      pigment { color White }
  1886. This is much easier to type and to read. The pre-defined element may be  used many times in a scene. 
  1887. You use the keyword "declare" to pre-define a scene element and give it a  one-word identifier. This pre-defined scene element is not used in the  scene until you invoke its identifier. Textures, objects, colors, numbers  and more can be predefined. 
  1888. In most cases when you invoke an identifier you simply use the form  "keyword{identifier}" where the keyword used is the type of statement that  was declared. For example: D
  1889.   #declare Shiny = finish {phong 0.8 phong_size 50 reflection 0.2}
  1890.   sphere {
  1891.      <0, 0, 0>, 1
  1892.      pigment { color White }
  1893.      finish { Shiny }
  1894. The identifier "Shiny" was declared as a "finish" and is invoked by placing  it inside a "finish { }" statement. 
  1895. One exception is object identifiers.  If you declare any object of any kind  such as sphere, box, union, intersection etc. you should invoke it by  placing it in an "object { }" statement.  Thus you might have: '
  1896.   #declare Thing = intersection {...}
  1897.   object {Thing}  // not "intersection{Thing}"
  1898. Pre-defined elements may be modified when they are used, for example: 
  1899.   #declare Mickey = // Pre-define a union object called Mickey
  1900.      union {
  1901.        sphere { < 0, 0, 0>, 2 }
  1902.        sphere { <-2, 2, 0>, 1 }
  1903.        sphere { < 2, 2, 0>, 1 }
  1904.      }
  1905.   // Use Mickey
  1906.      object{        // Note use of "object", not "union" keyword
  1907.        Mickey
  1908.        scale 3
  1909.        rotate y*20
  1910.        translate <0, 8, 10>
  1911.        pigment {color red 1}
  1912.        finish {phong .7}
  1913.      }
  1914. This scene will only have one "Mickey", the Mickey that is described  doesn't appear in the scene. Notice that Mickey is scaled, rotated,  translated, and a texture is added to it. The Mickey identifier could be  used many times in a scene file, and each could have a different size,  position, orientation, and texture. c
  1915. Declare is especially powerful when used to create a complex object. Each  part of the object is defined separately using declare. These parts can be  tested, rotated, sized, positioned, and textured separately then combined  in one shape or object for the final sizing, positioning, etc. For example,  you could define all the parts of a car like this: 
  1916.   #declare Wheel = object {...}
  1917.   #declare Seat = object {...}
  1918.   #declare Body = object {...}
  1919.   #declare Engine = object {...}
  1920.   #declare Steering_Wheel = object {...}
  1921.   #declare Car = 
  1922.     union {
  1923.        object { Wheel translate < 1, 1, 2>}
  1924.        object { Wheel translate <-1, 1, 2>}
  1925.        object { Wheel translate < 1, 1,-2>}
  1926.        object { Wheel translate <-1, 1,-2>}
  1927.        object { Seat translate < .5, 1.4, 1>}
  1928.        object { Seat translate <-.5, 1.4, 1>}
  1929.        object { Steering_Wheel translate <-.5, 1.6, 1.3>}
  1930.        object { Body texture { Brushed_Steel } }
  1931.        object { Engine translate <0, 1.5, 1.5> 
  1932.     }
  1933. and then it like this: F
  1934.   // Here is a car
  1935.   object {
  1936.     Car 
  1937.     translate <4, 0, 23>
  1938. Notice that the Wheel and Seat are used more than once. A declared element  can be used as many times as you need. Declared elements may be placed in  "include" files so they can be used with more than one scene. 
  1939. There are several files included with POV-Ray that use declare to pre- define many shapes, colors, and textures. See the archive INCLUDE for more  info. 
  1940. NOTE: Declare is not the same as the C language's define. Declare creates  an internal object of the type specified that POV-Ray can copy for later  use.  The "define" used in C creates a text substitution macro. 
  1941. Here's a list of what can be declared, how to declare the element, and how  to use the declaration. See the reference section for element syntax. L
  1942. Objects: (Any type may be declared, sphere, box, height_field, blob, etc.) 
  1943.   #declare Tree = union {...}
  1944.   #declare Ball = sphere {...}
  1945.   #declare Crate= box {...}
  1946.   object {
  1947.     Tree
  1948.     (OBJECT_MODIFIERS...) 
  1949.   object {
  1950.     Ball
  1951.     (OBJECT_MODIFIERS...) 
  1952.   object {
  1953.     Crate
  1954.     (OBJECT_MODIFIERS...) 
  1955. Textures: !
  1956.   #declare Fred = texture {...} 
  1957.   sphere { <0, 0, 0>, 1 
  1958.     texture {
  1959.       Fred 
  1960.       (texture_modifiers) 
  1961.     }
  1962. Layered textures: U
  1963.   #declare Fred = 
  1964.      texture {...} 
  1965.      texture {...} 
  1966.      texture {...} (etc.)
  1967.   sphere { <0, 0, 0>, 1 
  1968.     texture {
  1969.       Fred 
  1970.       (texture_modifiers) 
  1971.     }
  1972. Pigment: ;
  1973.   #declare Fred = pigment {checker color Red color White} 
  1974.   sphere { <0, 0, 0>, 1 
  1975.     pigment {
  1976.       Fred 
  1977.       (pigment_modifiers) 
  1978.     }
  1979. Normal: &
  1980.   #declare Fred = normal {bumps 0.5} 
  1981.   sphere { <0, 0, 0>, 1 
  1982.     pigment {White}
  1983.     normal {
  1984.       Fred 
  1985.       (normal_modifiers) 
  1986.     }
  1987. Finish: 5
  1988.   #declare Fred = finish {phong 0.7 reflection 0.2} 
  1989.   sphere { <0, 0, 0>, 1 
  1990.     pigment {White}
  1991.     finish {
  1992.       Fred 
  1993.       (finish_items) 
  1994.     }
  1995. Colors: .
  1996.   #declare Fred = color red 1 green 1 blue 1 
  1997.   sphere { <0, 0, 0>, 1 
  1998.     pigment { color Fred }
  1999. Color_map: 
  2000.   #declare Rainbow = 
  2001.     color_map {
  2002.       [0.0 color Cyan]
  2003.       [1/3 color Yellow]
  2004.       [2/3 color Magenta]
  2005.       [1.0 color Cyan]
  2006.     }
  2007.   sphere { <0, 0, 0>, 1 
  2008.     pigment { radial color_map{Rainbow} rotate -90*x}
  2009. Float Values: E
  2010.   #declare Fred  = 3.45
  2011.   #declare Fred2 = .02
  2012.   #declare Fred3 = .5
  2013.  // Use the numeric value identifier 
  2014.  // anywhere a number would go
  2015.   sphere { <-Fred, 2, Fred>, Fred 
  2016.     pigment { color red 1 }
  2017.     finish { phong Fred3 }
  2018. Camera: 
  2019.   #declare Fred = camera {..}
  2020.   camera { Fred }
  2021. Vectors: ;
  2022.    #declare Fred = <9, 3, 2>
  2023.    #declare Fred2 = <4, 1, 4>
  2024.    sphere { Fred, 1  // Note do not put < > brackets
  2025.      scale Fred2     // around vector identifiers
  2026. 5.2   OBJECTS ------------- S
  2027. Objects are the building blocks of your scene.  There are 20 different  types of objects supported by POV-Ray.  Seven of them are finite solid  primitives, 4 are finite patch primitives, 5 are infinite solid polynomial  primitives, 3 are types of Constructive Solid Geometry types and one is a  specialized object that is a light source. 
  2028. The basic syntax of an object is a keyword describing its type, some  floats, vectors or other parameters which further define its location  and/or shape and some optional object modifiers such as texture, pigment,  normal, finish, bounding, clipping or transformations. 
  2029. The texture describes what the object looks like, ie. its material.   Textures are combinations of pigments, normals and finishes.  Pigment is  the color or pattern of colors inherent in the material.  Normal is a  method of simulating various patterns of bumps, dents, ripples or waves by  modifying the surface normal vector.  Finish describes the reflective and  refractive properties of a material. K
  2030. Bounding shapes are finite, invisible shapes which wrap around complex,  slow rendering shapes in order to speed up rendering time.  Clipping shapes  are used to cut away parts of shapes to expose a hollow interior.   Transformations tell the ray tracer how to move, size or rotate the shape  and/or the texture in the scene. ### 
  2031.          5.2.1   SOLID
  2032. FINITE
  2033. PRIMITIVES
  2034.          5.2.2   FINITE
  2035. PATCH
  2036. PRIMITIVES
  2037.          5.2.3   INFINITE
  2038. SOLID
  2039. PRIMITIVES
  2040.          5.2.4   CONSTRUCTIVE
  2041. SOLID
  2042. GEOMETRY
  2043. (CSG)
  2044.          5.2.5   LIGHT
  2045. SOURCES
  2046. 5.2.1 SOLID FINITE PRIMITIVES 2
  2047. There are 7 different solid finite primitive shapes: blob, box, cone,  cylinder, height_field, sphere, and torus. These have a well-defined  "inside" and can be used in Constructive Solid Geometry. Because these  types are finite, POV-Ray can use automatic bounding on them to speed up  rendering time.   
  2048.         5.2.1.1 Spheres
  2049.         5.2.1.2 Boxes
  2050.         5.2.1.3 Cylinders
  2051.         5.2.1.4 Cones
  2052.         5.2.1.5 Torus
  2053.         5.2.1.6 Blob
  2054.         5.2.1.7 Height
  2055. Fields
  2056. 5.2.1.1     Spheres 
  2057. Since spheres are so common in ray traced graphics, POV-Ray has a highly  optimized sphere primitive which renders much more quickly than the  corresponding polynomial quadric shape. The syntax is: "
  2058.      sphere { <CENTER>, RADIUS }
  2059. Where <CENTER> is a vector specifying the x,y,z coordinates of the center  of the sphere and RADIUS is a float value specifying the radius.  You can  also add translations, rotations, and scaling to the sphere. For example,  the following two objects are identical: 2
  2060.   sphere { <0, 25, 0>, 10
  2061.     pigment {Blue}
  2062.   sphere { <0, 0, 0>, 1.0
  2063.     pigment {Blue}
  2064.     scale 10
  2065.     translate y*25
  2066. Note that Spheres may be scaled unevenly giving an ellipsoid shape.  
  2067. Because spheres are highly optimized they make good bounding shapes.  Because they are finite they respond to automatic bounding. As with all  shapes, they can be translated, rotated and scaled. 
  2068. 5.2.1.2     Boxes J
  2069. A simple box can be defined by listing two corners of the box like this:  
  2070.   box { <CORNER1>, <CORNER2> }
  2071. Where <CORNER1> and <CORNER2> are vectors defining the x,y,z coordinates of  opposite corners of the box.  For example:  
  2072.   box { <0, 0, 0>, <1, 1, 1> }
  2073. Note that all boxes are defined with their faces parallel to the coordinate  axes.  They may later be rotated to any orientation using a rotate  parameter. 
  2074. Each element of CORNER1 should always be less than the corresponding  element in CORNER2. If any elements of CORNER1 are larger than CORNER2, the  box will not appear in the scene. 
  2075. Boxes are calculated efficiently and make good bounding shapes. Because  they are finite they respond to automatic bounding. As with all  shapes, they can be translated, rotated and scaled. 
  2076. 5.2.1.3     Cylinders D
  2077. A finite length cylinder with parallel end caps may be defined by. (
  2078.    cylinder { <END1>, <END2>, RADIUS }
  2079. Where <END1> and <END2> are vectors defining the x,y,z coordinates of the  center of each end of the cylinder and RADIUS is a float value for the  radius.  For example: $
  2080.    cylinder { <0,0,0>, <3,0,0>, 2}
  2081. is a cylinder 3 units long lying along the x axis from the origin to x=3  with a radius of 2. 
  2082. Normally the ends of a cylinder are closed by flat planes which are  parallel to each other and perpendicular to the length of the cylinder.   Adding the optional keyword "open" after the radius will remove the end  caps and results in a hollow tube. ~
  2083. Because they are finite they respond to automatic bounding. As with all  shapes, they can be translated, rotated and scaled. 
  2084. 5.2.1.4     Cones W
  2085. A finite length cone or a frustum (a cone with the point cut off) may be  defined by. .
  2086.    cone { <END1>, RADIUS1, <END2>, RADIUS2 }
  2087. Where <END1> and <END2> are vectors defining the x,y,z coordinates of the  center of each end of the cone and RADIUS1 and RADIUS2 are float values for  the radius of those ends.  For example: !
  2088.    cone { <0,0,0>,2 <0,3,0>, 0}
  2089. is a cone 3 units tall pointing up the y axis from the origin to y=3.  The  base has a radius of 2.  The other end has a radius of 0 which means it  comes to a sharp point.  If neither radius is zero then the results look  like a tapered cylinder or a cone with the point cut off. %
  2090. Like a cylinder, normally the ends of a cone are closed by flat planes  which are parallel to each other and perpendicular to the length of the  cone.  Adding the optional keyword "open" after RADIUS2 will remove the end  caps and results in a tapered hollow tube like a megaphone or funnel. ~
  2091. Because they are finite they respond to automatic bounding. As with all  shapes, they can be translated, rotated and scaled. 
  2092. 5.2.1.5     Torus 
  2093. A torus is a 4th order quartic polynomial shape that looks like a donut or  inner tube.  Because this shape is so useful and quartics are difficult to  define, POV-Ray lets you take a short-cut and define a torus by: 
  2094.    torus { MAJOR, MINOR }
  2095. where MAJOR is a float value giving the major radius and MINOR is a float  specifying the minor radius.  The major radius extends from the center of  the hole to the mid-line of the rim while the minor radius is the radius of  the cross-section of the rim.  The torus is centered at the origin and lies  in the X-Z plane with the Y-axis sticking through the hole. 
  2096.         ----------- - - - - - - - ----------              +Y
  2097.        /          \              /          \              |       
  2098.       /            \            /            \             |       
  2099.      |              |          |       |<-B-->|       -X---|---+X  
  2100.       \            /            \            /             |       
  2101.        \__________/_ _ _ _ _ _ _ \__________/              |       
  2102.                          |<-----A----->|                  -Y
  2103.       A = Major Radius
  2104.       B = Minor Radius
  2105. Internally the torus is computed the same as any other quartic or 4th order  polynomial however a torus defined this way will respond to automatic  bounding while a quartic must be manually bound if at all.  As with all  shapes, a torus can be translated, rotated and scaled.  Calculations for  all higher order polynomials must be very accurate.  If this shape renders  improperly you may add the keyword "sturm" after the MINOR value to use  POV-Ray's slower-yet-more-accurate Sturmian root solver. 
  2106. 5.2.1.6     Blob 
  2107. Blobs are an interesting shape type. Their components are "flexible"  spheres that attract or repel each other creating a "blobby" organic  looking shape. The spheres' surfaces actually stretch out smoothly and  connect, as if coated in silly putty (honey? glop?) and pulled apart. 4
  2108. Picture each blob component as a point floating in space.  Each point has a  field around it that starts very strong at the center point and drops off  to zero at some radius. POV-Ray adds together the field strength of each  component and looks for the places that the strength of the field is  exactly the same as the "threshold" value that was specified.  Points with  a total field strength greater than the threshold are considered inside the  blob.  Those less than the threshold are outside.  Points equal to the  threshold are on the surface of the blob. 
  2109. A blob is defined as follows: 
  2110.   blob {
  2111.      threshold THRESHOLD_VALUE
  2112.      component STRENGTH, RADIUS, <CENTER>
  2113.      component STRENGTH, RADIUS, <CENTER>  // Repeat for any number  
  2114.      component STRENGTH, RADIUS, <CENTER>  //  of components         
  2115. The keyword "threshold" is followed by a float THRESHOLD_VALUE.  Each  component begins with the keyword "component".  STRENGTH is a float value  specifying the field strength at its center.  The strength may be positive  or negative. A positive value will make that component attract other  components. Negative strength will make that component repel other  components. Components in different, separate blob shapes do not affect  each other.  The strength tapers off to zero at the value specified by the  float RADIUS.  The vector <CENTER> specifies the x,y,z coordinates of the  component. For example: 
  2116.   blob {
  2117.     threshold 0.6
  2118.     component 1.0, 1.0, <.75, 0, 0>
  2119.     component 1.0, 1.0, <-.375, .64952, 0>
  2120.     component 1.0, 1.0, <-.375, -.64952, 0>
  2121.     scale 2 
  2122. If you have a single blob component then the surface you see will look just  like a sphere, with the radius of the surface being somewhere inside the  "radius" value you specified for the component. The exact radius of this  sphere-like surface can be determined from the blob equation listed below  (you will probably never need to know this, blobs are more for visual  appeal than for exact modeling). 
  2123. If you have a number of blob components, then their fields add together at  every point in space - this means that if the blob components are close  together the resulting surface will smoothly flow around the components. 
  2124. The various numbers that you specify in the blob declaration interact in  several ways.  The meaning of each can be roughly stated as: 
  2125. THRESHOLD: F
  2126.      This is the total density value that POV-Ray is looking for. By 
  2127. following the ray out into space and looking at how each blob component  affects the ray, POV-Ray will find the points in space where the density is  equal to the "threshold" value. N
  2128.      1) "threshold" must be greater than 0. POV-Ray only looks for positive 
  2129. densities. J
  2130.      2) If "threshold" is greater than the strength of a component, then 
  2131. the component will disappear. K
  2132.      3) As "threshold" gets larger the surface you see gets closer to the 
  2133. centers of the components. M
  2134.      4) As "threshold" gets smaller, the surface you see gets closer to the 
  2135. spheres at a distance of "radius" from the centers of the components. 
  2136. STRENGTH: L
  2137.      Each component has a strength value - this defines the density of the 
  2138. component at the center of the component. Changing this value will usually  have only a subtle effect. N
  2139.      1) "strength" may be positive or negative. Zero is a bad value, as the 
  2140. net result is that no density was added - you might just as well have not  used this component. M
  2141.      2) If "strength" is positive, then POV-Ray will add its density to the 
  2142. space around the center of the component. If this adds enough density to be  greater than "threshold you will see a surface. K
  2143.      3) If "strength" is negative, then POV-Ray will subtract its density 
  2144. from the space around the center of the component. This will only do  something if there happen to be positive components nearby. What happens is  that the surface around any nearby positive components will be dented away  from the center of the negative component. 
  2145. RADIUS:  G
  2146.      Each component has a radius of influence. The component can only 
  2147. affect space within "radius" of its center. This means that if all of the  components are farther than "radius" from each other, you will only see a  bunch of spheres.  If a component is within the radius of another  component, then the two components start to affect each other. At first  there is only a small bulge outwards on each of the two components, as they  get closer they bulge more and more until they attach along a smooth neck.   If the components are very close (i.e. their centers are on top of each  other), then you will only see a sphere (this is just like having a  component of more strength. bigger than the size of each of the component  radii) o
  2148.      1) "radius" must be bigger than 0.
  2149.      2) As "radius" increases the apparent size of the component will 
  2150. increase.     
  2151. CENTER: H
  2152.      This is simply a point in space.  It defines the center of a blob 
  2153. component.  By changing the x/y/z values of the center you move the  component around. 
  2154. THE FORMULA M
  2155.      For the more mathematically minded, here's the formula used internally 
  2156. by POV-Ray to create blobs. You don't need to understand this to use blobs.  2
  2157. The formula used for a single blob component is: -
  2158.       density = strength * (1 - radius^2)^2
  2159. This formula has the nice property that it is exactly equal to strength" at  the center of the component and drops off to exactly 0 at a distance of  "radius" from the center of the component. The density formula for more  than one blob component is just the sum of the individual component  densities: +
  2160.       density = density1 + density2 + ...
  2161. Blobs can be used in CSG shapes and they can be scaled, rotated and  translated. Because they are finite they respond to automatic bounding.   The calculations for blobs must be very accurate.  If this shape renders  improperly you may add the keyword "sturm" after the last component to use  POV-Ray's slower-yet-more-accurate Sturmian root solver. 
  2162. 5.2.1.7     Height Fields 
  2163. Height fields are fast, efficient objects that are generally used to create  mountains or other raised surfaces out of hundreds of triangles in a mesh.   
  2164. A height field is essentially a 1 unit wide by 1 unit long box with a  mountainous surface on top.  The height of the mountain at each point is  taken from the color number (palette index) of the pixels in a graphic  image file.  ?
  2165.                     ________  <---- image index 255
  2166.                   /        /|
  2167.             +1y  ---------- |
  2168.                  |        | |
  2169.                  |        | |+1z <- Image upper-right
  2170.                  |        | /
  2171.             0,0,0---------- +1x
  2172.                  ^
  2173.                  |____ Image lower-left
  2174.     NOTE: Image resolution is irrelevant to the scale of the heightfield.
  2175. The mesh of triangles corresponds directly to the pixels in the image file.  In fact, there are two small triangles for every pixel in the image file.  The Y (height) component of the triangles is determined by the palette  index number stored at each location in the image file. The higher the  number, the higher the triangle. The maximum height of an un-scaled height  field is 1 unit. 
  2176. The higher the resolution of the image file used to create the height  field, the smoother the height field will look. A 640 X 480 GIF will create  a smoother height field than a 320 x 200 GIF.  The size/resolution of the  image does not affect the size of the height field. The un-scaled height  field size will always be 1x1. Higher resolution image files will create  smaller triangles, not larger height fields. I
  2177. There are three types files which can define a height field as follows: v
  2178.    height_field { gif "filename.gif" }
  2179.    height_field { tga "filename.tga" }
  2180.    height_field { pot "filename.pot" }
  2181. The image file used to create a height field can be a GIF, TGA or POT  format file. The GIF format is the only one that can be created using a  standard paint program. b
  2182. In a GIF file, the color number is the palette index at a given point. Use  a paint program to look at the palette of a GIF image. The first color is  palette index zero, the second is index 1, the third is index 2, and so on.  The last palette entry is index 255. Portions of the image that use low  palette entries will be lower on the height field.  Portions of the image  that use higher palette entries will be higher on the height field. For  example, an image that was completely made up of entry 0 would be a flat  1x1 square. An image that was completely made up of entry 255 would be a  1x1x1 cube. 
  2183. The maximum number of colors in a GIF are 256, so a GIF height field can  have any number of triangles, but they will only 256 different height  values.  N
  2184. The color of the palette entry does not affect the height of the pixel.  Color entry 0 could be red, blue, black, or orange, but the height of any  pixel that uses color entry 0 will always be 0. Color entry 255 could be  indigo, hot pink, white, or sky blue, but the height of any pixel that uses  color entry 255 will always be 1. 
  2185. You can create height field GIF images with a paint program or a fractal  program like "Fractint".  If you have access to an IBM-PC, you can get  Fractint from most of the same sources as POV-Ray. s
  2186. A POT file is essentially a GIF file with a 16 bit palette. The maximum  number of colors in a POT file is greater than 32,000. This means a POT  height field can have over 32,000 possible height values. This makes it  possible to have much smoother height fields. Note that the maximum height  of the field is still 1 even though more intermediate values are possible. #
  2187. At the time of this writing, the only program that created POT files was a  freeware IBM-PC program called Fractint. POT files generated with this  fractal program create fantastic landscapes. If you have access to an IBM- PC, you can get Fractint from most of the same sources as POV-Ray. 4
  2188. The TGA file format may be used as a storage device for 16 bit numbers  rather than an image file. The TGA format uses the red and green bytes of  each pixel to store the high and low bytes of a height value. TGA files are  as smooth as POT files, but they must be generated with special custom-made  programs. Currently, this format is of most use to programmers, though you  may see TGA height field generator programs arriving soon.  There is  example C source code included with the POV-Ray source archive to create a  TGA file for use with a height field.   B
  2189. It is nearly impossible to take advantage of the 16 bits of resolution  offered by the use of tga files in height fields when the tga file is  created in a paint program.  A gif file is a better choice for paint  created height fields in 8 bits.  Also see Appendix B.5 for a tip on  creating tga files for height fields. T
  2190. An optional "water_level" parameter may be added after the file name.  It  consists of the keyword "water_level" followed by a float value tells the  program not to look for the height field below that value. Default value is  0, and legal values are between 0 and 1. For example, "water_level .5"  tells POV-Ray to only render the top half of the height field. The other  half is "below the water" and couldn't be seen anyway. This term comes from  the popular use of height fields to render landscapes. A height field would  be used to create islands and another shape would be used to simulate water  around the islands. A large portion of the height field would be obscured  by the "water" so the "water_level" parameter was introduced to allow the  ray-tracer to ignore the unseen parts of the height field. Water_level is  also used to "cut away" unwanted lower values in a height field. For  example, if you have an image of a fractal on a solid colored background,  where the background color is palette entry 0, you can remove the  background in the height field by specifying, "water_level .001"  
  2191. Normally height fields have a rough, jagged look because they are made of  lots of flat triangles.  Adding the keyword "smooth" causes POV-Ray to  modify the surface normal vectors of the triangles in such a way that the  lighting and shading of the triangles will give a smooth look.  This may  allow you to use a lower resolution file for your height field than would  otherwise be needed. 
  2192. Height fields can be used in CSG shapes and they can be scaled, rotated and  translated. Because they are finite they respond to automatic bounding.   U
  2193. Here are a notes and helpful hints on height fields from their creator,  Doug Muir: +
  2194. The height field is mapped to the x-z plane, with its lower left corner  sitting at the origin. It extends to 1 in the positive x direction and to 1  in the positive z direction. It is maximum 1 unit high in the y direction.  You can translate it, scale it, and rotate it to your heart's content.  
  2195. When deciding on what water_level to use, remember, this applies to the un- transformed height field. If you are a Fractint user, the water_level  should be used just like the water_level parameter for 3d projections in  Fractint. 
  2196. Here's a detailed explanation of how the ray-tracer creates the height  field. You can skip this if you aren't interested in the technical side of  ray-tracing. This information is not needed to create or use height fields. 
  2197. To find an intersection with the height field, the ray tracer first checks  to see if the ray intersects the box which surrounds the height field.  Before any transformations, this box's two opposite vertexes are at (0,  water_level, 0) and (1, 1, 1). If the box is intersected, the ray tracer  figures out where, and then follows the line from where the ray enters the  box to where it leaves the box, checking each pixel it crosses for an  intersection.  
  2198. It checks the pixel by dividing it up into two triangles. The height vertex  of the triangle is determined by the color index at the corresponding  position in the GIF, POT, or TGA file. 
  2199. If your file has a uses the color map randomly, your height field is going  to look pretty chaotic, with tall, thin spikes shooting up all over the  place. Not every GIF will make a good height field. 
  2200. If you want to get an idea of what your height field will look like, I  recommend using the IBM-PC program Fractint's 3d projection features to do  a sort of preview. If it doesn't look good there, the ray tracer isn't  going to fix it. For those of you who can't use Fractint, convert the image  palette to a gray scale from black at entry 0 to white at entry 255 with  smooth steps of gray in-between. The dark parts will lower than the  brighter parts, so you can get a feel for how the image will look as a  height field. 
  2201. 5.2.2 FINITE PATCH PRIMITIVES D
  2202. There are 4 totally thin, finite objects which have NO well-defined inside.   They may be combined in CSG union but cannot be use in other types of CSG.   They are bicubic_patch, disc, smooth_triangle and triangle.  Because these  types are finite, POV-Ray can use automatic bounding on them to speed up  rendering time.   a
  2203.         5.2.2.1 Triangle
  2204. Smooth_triangle
  2205.         5.2.2.2 Bicubic_patch
  2206.         5.2.2.3 Disc
  2207. 5.2.2.1     Triangle and Smooth_triangle  
  2208. The triangle primitive is available in order to make more complex objects  than the built-in shapes will permit.  Triangles are usually not created by  hand, but are converted from other files or generated by utilities.  
  2209. A triangle is defined by: 1
  2210.    triangle { <CORNER1>, <CORNER2>, <CORNER3> }
  2211. where <CORNERn> is a vector defining the x,y,z coordinates of each corner  of the triangle. 
  2212. Because triangles are perfectly flat surfaces it would require extremely  large numbers of very small triangles to approximate a smooth, curved  surface.  However much of our perception of smooth surfaces is dependent  upon the way light and shading is done.  By artificially modifying the  surface normals we can simulate as smooth surface and hide the sharp-edged  seams between individual triangles.  g
  2213. The smooth_triangle primitive is used for just such purposes.  The  smooth_triangles use a formula called Phong normal interpolation to  calculate the surface normal for any point on the triangle based on normal  vectors which you define for the three corners.  This makes the triangle  appear to be a smooth curved surface. A smooth_triangle is defined by: f
  2214.   smooth_triangle {
  2215.     <CORNER1>, <NORMAL1>,
  2216.     <CORNER2>, <NORMAL2>,
  2217.     <CORNER3>, <NORMAL3>
  2218. where the corners are defined as in regular triangles and <NORMALn> is a  vector describing the direction of the surface normal at each corner. 
  2219. These normal vectors are prohibitively difficult to compute by hand.   Therefore smooth_triangles are almost always generated by utility programs.   To achieve smooth results, any triangles which share a common vertex should  have the same normal vector at that vertex.  Generally the smoothed normal  should be the average of all the actual normals of the triangles which  share that point. 
  2220. 5.2.2.2     Bicubic_patch 
  2221. A bicubic patch is a 3D curved surface created from a mesh of triangles.  POV-Ray supports a type of bicubic patch called a Bezier patch.  A bicubic  patch is defined as follows: 
  2222.   bicubic_patch { 
  2223.      type PATCH_TYPE
  2224.      flatness FLATNESS_VALUE
  2225.      u_steps NUM_U_STEPS
  2226.      v_steps NUM_V_STEPS
  2227.      <CP1>,  <CP2>,   <CP3>,   <CP4>,
  2228.      <CP5>,  <CP6>,   <CP7>,   <CP8>,
  2229.      <CP9>,  <CP10>,  <CP11>,  <CP12>,
  2230.      <CP13>, <CP14>,  <CP15>,  <CP16>
  2231. The keyword "type" is followed by a float PATCH_TYPE which currently must  be either 0 or 1.  For type 0 only the control points are retained within  POV-Ray. This means that a minimal amount of memory is needed, but POV-Ray  will need to perform many extra calculations when trying to render the  patch.  Type 1 preprocesses the patch into many subpatches.  This results  in a significant speedup in rendering, at the cost of memory. Q
  2232. These 4 parameters: type, flatness, u_steps & v_steps, may appear in any  order.  They are followed by 16 vectors that define the x,y,z coordinates  of the 16 control points which define the patch.  The patch touches the 4  corner points <CP1>, <CP4>, <CP13> and <CP16> while the other 12 points  pull and stretch the patch into shape. "
  2233. The keywords "u_steps" and "v_steps" are each followed by float values  which tell how many rows and columns of triangles are the minimum to use to  create the surface.  The maximum number of individual pieces of the patch  that are tested by POV-Ray can be calculated from the following: '
  2234.    sub-pieces = 2^u_steps * 2^v_steps
  2235. This means that you really should keep "u_steps" and "v_steps" under 4 or  5.  Most patches look just fine with "u_steps 3" and "v_steps 3", which  translates to 64 subpatches (128 smooth triangles). 
  2236. As POV-Ray processes the Bezier patch, it makes a test of the current piece  of the patch to see if it is flat enough to just pretend it is a rectangle.   The statement that controls this test is: "flatness xxx".  Typical flatness  values range from 0 to 1 (the lower the slower). 
  2237. If the value for flatness is 0, then POV-Ray will always subdivide the  patch to the extend specified by u_steps and v_steps.  If flatness is  greater than 0, then every time the patch is split, POV-Ray will check to  see if there is any need to split further. e
  2238. There are both advantages and disadvantages to using a non-zero flatness.   The advantages include: 
  2239.    If the patch isn't very curved, then this will be detected and POV-Ray
  2240.    won't waste a lot of time looking at the wrong pieces.
  2241.    If the patch is only highly curved in a couple of places, POV-Ray will
  2242.    keep subdividing there and concentrate it's efforts on the hard part.
  2243. The biggest disadvantage is that if POV-Ray stops subdividing at a  particular level on one part of the patch and at a different level on an  adjacent part of the patch, there is the potential for "cracking".  This is  typically visible as spots within the patch where you can see through.  How  bad this appears depends very highly on the angle at which you are viewing  the patch. 
  2244. Like triangles, the bicubic patch is not meant to be generated by hand.   These shapes should be created by a special utility. You may be able to  acquire utilities to generate these shapes from the same source from which  you obtained POV-Ray.  
  2245. Example: 
  2246.   bicubic_patch { 
  2247.      type 1 
  2248.      flatness 0.01
  2249.      u_steps 4
  2250.      v_steps 4
  2251.      <0, 0, 2>, <1, 0, 0>, <2, 0, 0>, <3, 0,-2>,
  2252.      <0, 1  0>, <1, 1, 0>, <2, 1, 0>, <3, 1, 0>,
  2253.      <0, 2, 0>, <1, 2, 0>, <2, 2, 0>, <3, 2, 0>,
  2254.      <0, 3, 2>, <1, 3, 0>, <2, 3, 0>, <3, 3, -2>
  2255. The triangles in a POV-Ray bicubic_patch are automatically smoothed using  normal interpolation but it is up to the user (or the user's utility  program) to create control points which smoothly stitch together groups of  patches.   q
  2256. As with the other shapes, bicubic_patch objects can be translated, rotated,  and scaled.  Because they are finite they respond to automatic bounding.   Since it's made from triangles, a bicubic_patch cannot be used in CSG  intersection or difference types or inside a clipped_by modifier because  triangles have no clear "inside". The CSG union type works acceptably. 
  2257. 5.2.2.3     Disc 
  2258. One other flat, finite object type is available with POV-Ray.  Note that a  disc is infinitely thin.  It has no thickness.  If you want a disc with  true thickness you should use a very short cylinder.  A disc shape may be  defined by: (
  2259.   disc { <CENTER>, <NORMAL>, RADIUS }
  2260. or  4
  2261.   disc { <CENTER>, <NORMAL>, RADIUS, HOLE_RADIUS }
  2262. The vector <CENTER> defines the x,y,z coordinates of the center of the  disc.  The <NORMAL> vector describes its orientation by describing its  surface normal vector.  This is followed by a float specifying the RADIUS.   This may be optionally followed by another float specifying the radius of a  hole to be cut from the center of the disc. 
  2263. Example: 
  2264.   disc {
  2265.     <-2,-0.5, 0>,    //center location
  2266.     <0,  1,   0>,    //normal vector
  2267.     2                //radius         
  2268.     pigment { color Cyan }
  2269.   disc {
  2270.     <0, 1, 0>,       //center location
  2271.     <-1, 3, -2>,     //normal vector  
  2272.     1.5,             //radius         
  2273.     0.5              //hole radius (optional)
  2274.     pigment { color Yellow }
  2275. As with the other shapes, discs can be translated, rotated, and scaled.   Because they are finite they respond to automatic bounding.  Disc cannot be  used in CSG intersection or difference types or inside a clipped_by  modifier because it has no clear "inside". The CSG union type works  acceptably. 
  2276. 5.2.3 INFINITE SOLID PRIMITIVES 
  2277. There are 5 polynomial primitive shapes that are possibly infinite and do  not respond to automatic bounding.  They do have a well defined inside and  may be used in CSG.  They are plane, cubic, poly, quadric, and quartic.   W
  2278.         5.2.3.1 Plane
  2279.         5.2.3.2 Quadric
  2280.         5.2.3.3 Poly,
  2281. Cubic
  2282. Quartic
  2283. 5.2.3.1     Plane  w
  2284. The plane primitive is a fast, efficient way to define an infinite flat  surface.  The plane is specified as follows:  
  2285.   plane { <NORMAL>, DISTANCE }
  2286. The <NORMAL> vector defines the surface normal of the plane.  A surface  normal is a vector which points up from the surface at a 90 degree angle.   This is followed by a float value that gives the distance along the normal  that the plane is from the origin.  For example: 
  2287.   plane { <0,1,0>,4 }
  2288. This is a plane where "straight up" is defined in the positive y direction.   The plane is 4 units in that direction away from the origin.  Because most  planes are defined with surface normals in the direction of an axis, you  will often see planes defined using the "x", "y", or "z" built-in vector  identifiers.  The example above could be specified as: 
  2289.   plane { y,4 }
  2290. The plane extends infinitely in the x and z directions.  It effectively  divides the world into two pieces.  By definition the normal vector points  to the outside of the plane while any points away from the vector are  defined as inside.  This inside/outside distinction is only important when  using planes in CSG. 
  2291. As with the other shapes, planes can be translated, rotated, and scaled.   Because they are infinite they do not respond to automatic bounding.  Plane  can be used freely in CSG because it has a clear defined "inside".  u
  2292. A plane is called a "polynomial" shape because it is defined by a first  order polynomial equation.  Given a plane: 
  2293.   plane { <A, B, C>, D }
  2294. it can be represented by the formula: 
  2295.    A*x + B*y + C*z = D
  2296. Therefore our example "plane {y,4}" is actually the polynomial equation  "y=4".  You can think of this as a set of all x,y,z points where all have y  values equal to 4, regardless of the x or z values. m
  2297. This equation is a "first order" polynomial because each term contains only  single powers of x, y or z.  A second order equation has terms like x^2,  y^2, z^2, xy, xz and yz.  Another name for a 2nd order equation is a  quadric equation.  Third order polys are called cubics.  A 4th order  equation is a quartic.  Such shapes are described in the sections below. 
  2298. 5.2.3.2     Quadric  
  2299. Quadric surfaces can produce shapes like ellipsoids, spheres, cones,  cylinders, paraboloids (dish shapes), and hyperboloids (saddle or hourglass  shapes).  NOTE: Do not confuse "quaDRic" with "quaRTic".  A quadric is a  2nd order polynomial while a quartic is 4th order. %
  2300. A quadric is defined in POV-Ray by: ,
  2301.   quadric { <A,B,C>, <D,E,F>, <G,H,I>, J }
  2302. where A through J are float expressions.   D
  2303. This defines a surface of x,y,z points which satisfy the equation: l
  2304.        A x^2   + B y^2   + C z^2
  2305.      + D xy    + E xz    + F yz
  2306.      + G x     + H y     + I z    + J = 0
  2307. Different values of A,B,C,...J will give different shapes. So, if you take  any three dimensional point and use its x, y, and z coordinates in the  above equation, the answer will be 0 if the point is on the surface of the  object. The answer will be negative if the point is inside the object and  positive if the point is outside the object. Here are some examples:  
  2308.      X^2 + Y^2 + Z^2 - 1 = 0  Sphere
  2309.      X^2 + Y^2 - 1 = 0        Infinitely long cylinder along the Z axis 
  2310.      X^2 + Y^2 - Z^2 = 0      Infinitely long cone along the Z axis
  2311. The easiest way to use these shapes is to include the standard file  "SHAPES.INC" into your program. It contains several pre-defined quadrics  and you can transform these pre-defined shapes (using translate, rotate,  and scale) into the ones you want. *
  2312. You can invoke them by using the syntax, 
  2313.   object { Quadric_Name }
  2314. The pre-defined quadrics are centered about the origin <0, 0, 0> and have a  radius of 1. Don't confuse radius with width. The radius is half the  diameter or width making the standard quadrics 2 units wide. '
  2315. Some of the pre-defined quadrics are, u
  2316.  Ellipsoid
  2317.  Cylinder_X, Cylinder_Y, Cylinder_Z
  2318.  QCone_X, QCone_Y, QCone_Z
  2319.  Paraboloid_X, Paraboloid_Y, Paraboloid_Z
  2320. For a complete list, see the file SHAPES.INC. 
  2321. 5.2.3.3     Poly, Cubic and Quartic ^
  2322. Higher order polynomial surfaces may be defined by the use of a poly shape.   The syntax is: )
  2323.   poly { ORDER, <T1, T2, T3, .... Tm> }
  2324. Where ORDER is a whole number from 2 to 7 inclusively that specifies the  order of the equation.  T1, T2... Tm are float values for the coefficients  of the equation.  There are "m" such terms where  )
  2325.     m=((ORDER+1)*(ORDER+2)*(ORDER+3))/6
  2326. An alternate way to specify 3rd order polys is: 
  2327.   cubic { <T1, T2,... T20> }
  2328. Also 4th order equations may be specified with:  
  2329.   quartic { <T1, T2,... T35> }
  2330. Here's a more mathematical description of quartics for those who are  interested.  Quartic surfaces are 4th order surfaces, and can be used to  describe a large class of shapes including the torus, the lemniscate, etc.  The general equation for a quartic equation in three variables is (hold  onto your hat): 
  2331.   a00 x^4 + a01 x^3 y + a02 x^3 z+ a03 x^3 + a04 x^2 y^2+ 
  2332.   a05 x^2 y z+ a06 x^2 y + a07 x^2 z^2+a08 x^2 z+a09 x^2+
  2333.   a10 x y^3+a11 x y^2 z+ a12 x y^2+a13 x y z^2+a14 x y z+ 
  2334.   a15 x y + a16 x z^3 + a17 x z^2 + a18 x z + a19 x+
  2335.   a20 y^4 + a21 y^3 z + a22 y^3+ a23 y^2 z^2 +a24 y^2 z+ 
  2336.   a25 y^2 + a26 y z^3 + a27 y z^2 + a28 y z + a29 y+ 
  2337.   a30 z^4 + a31 z^3 + a32 z^2 + a33 z + a34
  2338. To declare a quartic surface requires that each of the coefficients (a0 ->  a34) be placed in order into a single long vector of 35 terms.  `
  2339. As an example let's define a torus the hard way.  A Torus can be  represented by the equation: 
  2340.  x^4 + y^4 + z^4 + 2 x^2 y^2 + 2 x^2 z^2 + 2 y^2 z^2
  2341.  -2 (r0^2 + r1^2) x^2 + 2 (r0^2 - r1^2) y^2 
  2342.  -2 (r0^2 + r1^2) z^2 + (r0^2 - r1^2)^2 = 0
  2343. Where r0 is the "major" radius of the torus - the distance from the hole of  the donut to the middle of the ring of the donut, and r1 is the "minor"  radius of the torus - the distance from the middle of the ring of the donut  to the outer surface. The following object declaration is for a torus  having major radius 6.3 minor radius 3.5 (Making the maximum width just  under 10).  =
  2344. //Torus having major radius sqrt(40), minor radius sqrt(12) 
  2345.    quartic {
  2346.       < 1,   0,   0,   0,   2,   0,   0,   2,   0, 
  2347.      -104,   0,   0,   0,   0,   0,   0,   0,   0, 
  2348.         0,   0,   1,   0,   0,   2,   0,  56,   0,
  2349.         0,   0,   0,   1,   0, -104,  0, 784 >
  2350.       sturm
  2351.       bounded_by { // bounded_by speeds up the render,
  2352.                    // see bounded_by
  2353.                    // explanation later
  2354.                    // in docs for more info.
  2355.        sphere { <0, 0, 0>, 10 }
  2356.       }
  2357. Poly, cubic and quartics are just like quadrics in that you don't have to  understand what one is to use one. The file SHAPESQ.INC has plenty of pre- defined quartics for you to play with. The most common one is the torus or  donut. The syntax for using a pre-defined quartic is: 
  2358.     object { Quartic_Name }
  2359. As with the other shapes, these shapes can be translated, rotated, and  scaled.  Because they are infinite they do not respond to automatic  bounding.  They can be used freely in CSG because they have a clear defined  "inside".  
  2360. Polys use highly complex computations and will not always render perfectly.  If the surface is not smooth, has dropouts, or extra random pixels, try  using the optional keyword "sturm" in the definition. This will cause a  slower, but more accurate calculation method to be used. Usually, but not  always, this will solve the problem. If sturm doesn't work, try rotating,  or translating the shape by some small amount. See the sub-directory MATH  for examples of polys in scenes. 
  2361. There are really so many different quartic shapes, we can't even begin to  list or describe them all. If you are interested and mathematically  inclined, an excellent reference book for curves and surfaces where you'll  find more quartic shape formulas is: e
  2362.    "The CRC Handbook of Mathematical Curves and Surfaces"
  2363.    David von Seggern
  2364.    CRC Press
  2365.    1990
  2366. 5.2.4 CONSTRUCTIVE SOLID GEOMETRY (CSG) 
  2367. POV-Ray supports Constructive Solid Geometry (also called Boolean  operations) in order to make the shape definition abilities more powerful. 
  2368.         5.2.4.1 About
  2369.         5.2.4.2 Inside
  2370. outside
  2371.         5.2.4.3 Union
  2372.         5.2.4.4 Intersection
  2373.         5.2.4.5 Difference
  2374.         5.2.4.6 Merge
  2375. 5.2.4.1     About CSG 
  2376.        
  2377. The simple shapes used so far are nice, but not terribly useful on their  own for making realistic scenes. It's hard to make interesting objects when  you're limited to spheres, boxes, cylinders, planes, and so forth.  
  2378.        
  2379. Constructive Solid Geometry (CSG) is a technique for taking these simple  building blocks and combining them together. You can use a cylinder to bore  a hole through a sphere. You can start with solid blocks and carve away  pieces.  Objects may be combined in groups and treated as though they were  single objects. 
  2380.        
  2381. Constructive Solid Geometry allows you to define shapes which are the  union, intersection, or difference of other shapes.  Additionally you may  clip sections of objects revealing their hollow interiors. 
  2382.        
  2383. Unions superimpose two or more shapes. This has the same effect as defining  two or more separate objects, but is simpler to create and/or manipulate.  In POV-Ray 2.0 the union keyword may be used anyplace composite was used in  previous versions of POV-Ray.  Also a new type of union called "merge" can  eliminate internal surfaces on transparent or clipped objects. 
  2384.        
  2385. Intersections define the space where the two or more surfaces overlap. 
  2386.        
  2387. Differences allow you to cut one object out of another. 
  2388.        
  2389. CSG intersections, unions, and differences can consist of two or more  shapes. For example: 
  2390.        
  2391.           union {
  2392.             object{O1}
  2393.             object{O2}
  2394.             object{O3}  // any number of objects
  2395.             texture{T1}
  2396.           }
  2397.        
  2398. CSG shapes may be used in CSG shapes. In fact, CSG shapes may be used  anyplace that a standard shape is used. 
  2399.        
  2400. The order of the component shapes with the CSG doesn't matter except in a  difference shape. For CSG differences, the first shape is visible and the  remaining shapes are cut out of the first. 
  2401.        
  2402. Constructive solid geometry shapes may be translated, rotated, or scaled in  the same way as any shape. The shapes making up the CSG shape may be  individually translated, rotated, and scaled as well. 
  2403.        
  2404. When using CSG, it is often useful to invert a shape so that it's inside- out. The appearance of the shape is not changed, just the way that POV-Ray  perceives it. The inverse keyword can be used to do this for any shape.  When inverse is used, the "inside" of the shape is flipped to become the  "outside". For planes, "inside" is defined to be "in the opposite direction  to the "normal" or "up" direction.  
  2405.        
  2406. Note that performing an intersection between a shape and some other inverse  shapes is the same as performing a difference. In fact, the difference is  actually implemented in this way in the code. 
  2407.        
  2408. 5.2.4.2     Inside and outside 
  2409. Most shape primitives, like spheres, boxes, and blobs, divide the world  into two regions. One region is inside the surface and one is outside.   (The exceptions to this rule are triangles, disc and bezier patches - we'll  talk about this later.) 
  2410.        
  2411. Given any point in space, you can say it's either inside or outside any  particular primitive object (well, it could be exactly on the surface, but  numerical inaccuracies will put it to one side or the other).  
  2412.        
  2413. Even planes have an inside and an outside. By definition, the surface  normal of the plane points towards the outside of the plane. (For a simple  floor, for example, the space above the floor is "outside" and the space  below the floor is "inside". For simple floors this in un-important, but  for planes as parts of CSG's it becomes much more important). CSG uses the  concepts of inside and outside to combine shapes together. Take the  following situation: 
  2414.        
  2415. Note: The diagrams shown here demonstrate the concepts in 2D and are  intended only as an analogy to the 3D case.  
  2416.        
  2417. Note that the triangles and triangle-based shapes cannot be used as solid  objects in CSG since they have no clear inside and outside. 
  2418. In this diagram, point 1 is inside object A only.  Point 2 is inside B  only.  Point 3 is inside both A and B while point 0 is outside everything. 
  2419.        
  2420.          * = Object A
  2421.          % = Object B
  2422.        
  2423.                             *  0
  2424.                            * *    %
  2425.                           *   *  % %
  2426.                          *     *%   %
  2427.                         *  1   %*    %
  2428.                        *      %  * 2  %
  2429.                       *      % 3  *    %
  2430.                      *******%*******    %
  2431.                            %             %
  2432.                           %%%%%%%%%%%%%%%%%
  2433.        
  2434. Complex shapes may be created by combining other shapes using a technique  called "Constructive Solid Geometry" (or CSG for short).  The CSG shapes  are difference, intersection, and union. The following gives a simple 2D  overview of how these functions work.  
  2435. 5.2.4.3     Union   
  2436. Unions are simply "glue", used bind two or more shapes into a single entity  that can be manipulated as a single object.  The diagram above shows the  union of A and B.  The new object created by the union operation can then  be scaled, translated, and rotated as a single shape.  The entire union can  share a single texture, but each object contained in the union may also  have its own texture, which will override any matching texture statements  in the parent object: 
  2437.       union {
  2438.         sphere { <0, 0.5, 0> 1 pigment { Red } }
  2439.         sphere { <0, 0.0, 0> 1 }
  2440.         sphere { <0,-0.5, 0> 1 }
  2441.         pigment { Blue }
  2442.         finish { Shiny }
  2443.       }
  2444. This union will contain three spheres.  The first sphere is explicitly  colored Red while the other two will be shiny blue.  Note that the shiny  finish does NOT apply to the first sphere.  This is because the  "pigment{Red}" is actually shorthand for "texture{pigment{Red}}".  It  attaches an entire texture with default normals and finish.  The textures  or pieces of textures attached to the union apply ONLY to components with  no textures.  These texturing rules also apply to intersection, difference  and merge as well. 
  2445. Earlier versions of POV-Ray placed restrictions on unions so you often had  to combine objects with composite statements.  Those earlier restrictions  have been lifted so composite is no longer needed.  Composite is still  supported for backwards compatibility but it is recommended that union now  be used in it's place since future support for the composite keyword is not  guarantied. 
  2446. 5.2.4.4     Intersection 
  2447. A point is inside the intersection if it's inside both A AND B. This  "logical AND's" the shapes and gets the common part, most useful for  "cutting" infinite shapes off.  The diagram below consists of only those  parts common to A and B. 
  2448.        
  2449.        
  2450.                                %*
  2451.                               %  *
  2452.                              % 3  *
  2453.                             %*******
  2454. For example: p
  2455.      intersection {
  2456.        sphere {<-0.75,0,0>,1}
  2457.        sphere {< 0.75,0,0>,1}
  2458.        pigment {Yellow}
  2459.      }
  2460. 5.2.4.5     Difference 
  2461. A point is inside the difference if it's inside A but not inside B. The  results is a "subtraction" of the 2nd shape from the first shape: 
  2462.        
  2463.                             *
  2464.                            * *
  2465.                           *   *
  2466.                          *     *
  2467.                         *  1   %
  2468.                        *      %
  2469.                       *      %
  2470.                      *******%
  2471. For example: r
  2472.      difference {
  2473.        sphere {<-0.75,0,0>,1}
  2474.        sphere {< 0.75,0,-0.25>,1}
  2475.        pigment {Yellow}
  2476.      }
  2477. 5.2.4.6     Merge 
  2478. As can be seen in the diagram for union, the inner surfaces where the  objects overlap is still present.  On transparent or clipped objects these  inner surfaces cause problems.  A merge object works just like union but it  eliminates the inner surfaces like this: 
  2479.                             *
  2480.                            * *    %
  2481.                           *   *  % %
  2482.                          *     *%   %
  2483.                         *            %
  2484.                        *              %
  2485.                       *                %
  2486.                      *******%           %
  2487.                            %             %
  2488.                           %%%%%%%%%%%%%%%%%
  2489.        
  2490. 5.2.5 LIGHT SOURCES 
  2491. The last object we'll cover is the light source.  Light sources have no  visible shape of their own.  They are just points or areas which emit  light. s
  2492.          5.2.5.1 Point
  2493. Lights
  2494.          5.2.5.2 Spotlights
  2495.          5.2.5.3 Area
  2496. Lights
  2497.          5.2.5.4 Looks_like
  2498. 5.2.5.1     Point Lights v
  2499. Most light sources are infinitely small points which emit light.  Point  light sources are treated like shapes, but they are invisible points from  which light rays stream out. They light objects and create shadows and  highlights. Because of the way ray tracing works, lights do not reflect  from a surface.  You can use many light sources in a scene, but each light  source used will increase rendering time. The brightness of a light is  determined by its color. A bright color is a bright light, a dark color, a  dark one. White is the brightest possible light, Black is completely dark  and Gray is somewhere in the middle. #
  2500. The syntax for a light source is: <
  2501.     light_source { <X, Y, Z> color red #, green #, blue #}
  2502. Where X, Y and Z are the coordinates of the location and "color" is any  color or color identifier. For example, -
  2503.     light_source { <3, 5, -6> color Gray50}
  2504. is a 50% Gray light at X=3, Y=5, Z=-6. Q
  2505. Point light sources in POV-Ray do not attenuate, or get dimmer, with  distance. 
  2506. 5.2.5.2     Spotlights 
  2507. A spotlight is a point light source where the rays of light are constrained  by a cone. The light is bright in the center of the spotlight and falls  off/darkens to soft shadows at the edges of the circle. 
  2508. The syntax is: #
  2509. Syntax:   light_source { <CENTER> 
  2510.               color red #, green #, blue #
  2511.               spotlight
  2512.               point_at <POINT>
  2513.               radius #
  2514.               falloff #
  2515.               tightness #
  2516.           }
  2517. A spotlight is positioned using two vectors.  The first vector is the usual  <CENTER> vector that you would use to position a point light source. 
  2518. The second vector is the point_at <POINT>, the vector position of the point the light is pointing at, similar to the look_at in a camera  description. f
  2519. The following illustrations will be helpful in understanding how these  values relate to each other: 
  2520.            (+) Spotlight <center>
  2521.            / \
  2522.           /   \
  2523.          /     \
  2524.         /       \
  2525.        /         \
  2526.       /           \
  2527.       +-----*-----+
  2528.             ^ point_at <point>
  2529. The center is specified the same way as a normal point light_source. G
  2530. Point_at <POINT> is the location that the cone of light is aiming at. O
  2531. Spotlights also have three other parameters: radius, falloff, and  tightness. D
  2532. If you think of a spotlight as two nested cones,  the inner cone would be  specified by the radius parameter, and would be fully lit.  The outer cone  would be the falloff cone and beyond it would be totally unlit.  The values  for these two parameters are specified in degrees of the half angle at the  peak of each cone: 
  2533.            (+) Spotlight <center>
  2534.             |\ <-----  angle measured here
  2535.             | \
  2536.             || \
  2537.             ||  \      shaded area = radius cone
  2538.             |||  \     outer line = falloff cone
  2539.             ||||  \
  2540.             |||||  \
  2541.             +-------+
  2542. The radius# is the radius, in degrees, of the bright circular hotspot at  the center of the spotlight's area of affect. 
  2543. The falloff# is the falloff angle of the radius of the total spotlight  area, in degrees. This is the value where the light "falls off" to zero  brightness.  Falloff should be larger than the radius. Both values should  be between 1 and 180. w
  2544. The tightness value specifies how quickly the light dims, or falls off, in  the region between the radius (full brightness) cone and the falloff (full  darkness) cone.  The default value for tightness is 10.  Lower tightness  values will make the spot have very soft edges. High values will make the  edges sharper, the spot "tighter".  Values from 1 to 100 are acceptable. 
  2545. Spotlights may used anyplace that a normal light source is used. Like  normal light sources, they are invisible points. They are treated as shapes  and may be included in CSG shapes.  They may also be used in conjunction  with area_lights. 
  2546. Example: 
  2547.    // This is the spotlight.
  2548.    light_source {
  2549.       <10, 10, 0>
  2550.       color red 1, green 1, blue 0.5
  2551.       spotlight
  2552.       point_at <0, 1, 0>
  2553.       tightness 50
  2554.       radius 11
  2555.       falloff 25
  2556.      }
  2557. 5.2.5.3     Area Lights 
  2558. Regular light sources in POV-Ray are modeled as point light sources, that  is they emit light from a single point in space. Because of this the  shadows created by these lights have the characteristic sharp edges that  most of us are use to seeing in ray traced images. The reason for the  distinct edges is that a point light source is either fully in view or it  is fully blocked by an object. A point source can never be partially  blocked. E
  2559. Area lights on the other hand occupy a finite area of space. Since it is  possible for an area light to be partially blocked by an object the shadows  created will have soft or "fuzzy" edges. The softness of the edge is  dependent on the dimensions of the light source and it's distance from the  object casting the shadow. 
  2560. The area lights used in POV-Ray are rectangular in shape, sort of like a  flat panel light. Rather than performing the complex calculations that  would be required to model a true area light, POV-Ray approximates an area  light as an array of "point" light sources spread out over the area  occupied by the light. The intensity of each individual point light in the  array is dimmed so that the total amount of light emitted by the light is  equal to the light color specified in the declaration. 
  2561. Syntax: 
  2562. light_source { (
  2563.    <X, Y, Z> color red # green # blue #
  2564.    area_light <X1, Y1, Z1>, <X2, Y2, Z2>, N1, N2
  2565.    adaptive #
  2566.    jitter
  2567.    [optional spotlight parameters]
  2568. The light's location and color are specified in the same way as a regular light source. l
  2569. The area_light command defines the size and orientation of the area light  as well as the number of lights in the light source array.  The vectors  <X1,Y1,Z1> and <X2,Y2,Z2> specify the lengths and directions of the edges  of the light. Since the area lights are rectangular in shape these vectors  should be perpendicular to each other. The larger the size of the light the  thicker that the soft part of the shadow will be. The numbers N1 and N2  specify the dimensions of the array of point lights. The larger the number  of lights you use the smoother your shadows will be but the longer they  will take to render. 
  2570. The adaptive command is used to enable adaptive sampling of the light  source. By default POV-Ray calculates the amount of light that reaches a  surface from an area light by shooting a test ray at every point light  within the array. As you can imagine this is VERY slow. Adaptive sampling  on the other hand attempts to approximate the same calculation by using a  minimum number of test rays. The number specified after the keyword  controls how much adaptive sampling is used. The higher the number the more  accurate your shadows will be but the longer they will take to render. If  you're not sure what value to use a good starting point is 'adaptive 1'.   The adaptive command only accepts integer values and cannot be set lower  than 0. Adaptive sampling is explained in more detail later. 
  2571. The jitter command is optional. When used it causes the positions of the  point lights in the array to be randomly jittered to eliminate any shadow  banding that may occur. The jittering is completely random from render to  render and should not be used when generating animations. -
  2572. Note: It's possible to specify spotlight parameters along with area_light  parameters to create "area spotlights." Using area spotlights is a good way  to speed up scenes that use area lights since you can confine the lengthy  soft shadow calculations to only the parts of your scene that need them. 
  2573. Example: 
  2574. light_source { 
  2575.    <0, 50, 0> color White
  2576.    area_light <5, 0, 0>, <0, 0, 10>, 5, 5
  2577.    adaptive 1
  2578.    jitter
  2579. This defines an area light that extends 5 units along the x axis and 10  units along the z axis and is centered at the location <0,50,0>. The light  consists of a 5 by 5 jittered array of point sources for a total of 25  point lights. A minimum of 9 shadow rays will be used each time this light  is tested. "
  2580.                      / * * * * *
  2581.                    / * * * * *           Y
  2582.         <0,0,10> / * * * * *             |     Z
  2583.                / * * * * *               |   /
  2584.              / * * * * *                 | /
  2585.            +----------->                 +------X
  2586.               <5,0,0>
  2587. An interesting effect that can be created using area lights is a linear  light. Rather than having a rectangular shape, a linear light stretches  along a line sort of like a thin fluorescent tube. To create a linear light  just create an area light with one of the array dimensions set to 1. 
  2588. Example: 
  2589. light_source { 
  2590.    <0, 50, 0> color White
  2591.    area_light <40, 0, 0>, <0, 0, 1>, 100, 1
  2592.    adaptive 4
  2593.    jitter
  2594. This defines a linear light that extends from <-40/2,50,0> to <+40/2,50,0>  and consists of 100 point sources along it's length. The vector <0,0,1> is  ignored in this case since a linear light has no width. Note: If the linear  light is fairly long you'll usually need to set the adaptive parameter  fairly high as in the above example. 
  2595. When performing adaptive sampling POV-Ray starts by shooting a test ray at  each of the four corners of the area light. If the amount of light received  from all four corners is approximately the same then the area light is  assumed to be either fully in view or fully blocked. The light intensity is  then calculated as the average intensity of the light received from the  four corners.  However, if the light intensity from the four corners  differs significantly then the area light is partially blocked. The light  is the split into four quarters and each section is sampled as described  above. This allows POV-Ray to rapidly approximate how much of the area  light is in view without having to shoot a test ray at every light in the  array. 
  2596. While the adaptive sampling method is fast (relatively speaking) it can  sometimes produces inaccurate shadows. The solution is to reduce the amount  of adaptive sampling without completely turning it off. The number after  the adaptive keyword adjusts the number of times that the area light will  be split before the adaptive phase begins. For example if you use "adaptive  0" a minimum of 4 rays will be shot at the light. If you use "adaptive 1" a  minimum of 9 rays will be shot (adaptive 2 = 25 rays, adaptive 3 = 81 rays,  etc). Obviously the more shadow rays you shoot the slower the rendering  will be so you should use the lowest value that gives acceptable results. =
  2597. The number of rays never exceeds the values you specify for rows and  columns of points.  For example: area_light x,y,4,4 specifies a 4 by 4  array of lights.  If you specify adaptive 3 it would mean that you should  start with a 5 by 5 array.  In this case no adaptive sampling is done.  The  4 by 4 array is used. 
  2598. 5.2.5.4     Looks_like 
  2599. Normally the light source itself has no visible shape.  The light simply  radiates from an invisible point or area.  You may give a light source a  any shape by adding a "looks_like{OBJECT}" statement.  For example: }
  2600.         light_source {
  2601.            <100,200,-300> color White
  2602.            looks_like {sphere{<0,0,0>,1 texture{T1}}
  2603.         }
  2604. This creates a visible sphere which is automatically translated to the  light's location <100,200,-300> even though the sphere has <0,0,0> as its  center.  There is an implied "no_shadow" also attached to the sphere so  that light is not blocked by the sphere.  Without the automatic no_shadow,  the light inside the sphere would not escape. The sphere would, in effect,  cast a shadow over everything. 
  2605.        
  2606. If you want the attached object to block light then you should attach it  with a union and not a looks_like as follows: p
  2607.         union {
  2608.           light_source {<100,200,-300> color White}
  2609.           object {My_Lamp_Shade}
  2610.         }
  2611. Presumably parts of the lamp shade are open to let SOME light out. 
  2612. 5.3   OBJECT MODIFIERS ---------------------- 
  2613. A variety of modifiers may be attached to objects.  Transformations such as  translate, rotate and scale have already been discussed.  Textures are in a  section of their own below.  Here are three other important modifiers:  clipped_by, bounded_by and no_shadow.  Although the examples below use  object statements and object identifiers, these modifiers may be used on  any type of object such as sphere, box etc. T
  2614.          5.3.1   CLIPPED_BY
  2615.          5.3.2   BOUNDED_BY
  2616.          5.3.3   NO_SHADOW
  2617. 5.3.1 CLIPPED_BY 
  2618. The "clipped_by" statement is technically an object modifier but it  provides a type of CSG similar to CSG intersection.  You attach a clipping  object like this: R
  2619.         object {
  2620.            My_Thing
  2621.            clipped_by{plane{y,0}}
  2622.         }
  2623. Every part of the object "My_Thing" that is inside the plane is retained  while the remaining part is clipped off and discarded.  In an intersection  object, the hole is closed off.  With clipped_by it leaves an opening.  For  example this diagram shows our object "A" being clipped_by a plane{y,0}. 
  2624.                        *       *
  2625.                       *         *
  2626.                      *           *
  2627.                     ***************
  2628. Clipped_by may be used to slice off portions of any shape. In many cases it  will also result in faster rendering times than other methods of altering a  shape. 
  2629. Often you will want to use the clipped_by and bounded_by options with the  same object.  The following shortcut saves typing and uses less memory. ~
  2630.         object {
  2631.            My_Thing
  2632.            bounded_by{box{<0,0,0>,<1,1,1>}}
  2633.            clipped_by{bounded_by}
  2634.         }
  2635. This tells POV-Ray to use the same box as a clip that was used as a bounds. 
  2636. 5.3.2 BOUNDED_BY f
  2637. The calculations necessary to test if a ray hits an object can be quite  time consuming.  Each ray has to be tested against every object in the  scene.  POV-Ray attempts so speed up the process by building a set of  invisible boxes, called bounding slabs, which cluster the objects together.   This way a ray that travels in one part of the scene doesn't have to be  tested against objects in another far away part of the scene.  When large  number objects are present the slabs are nested inside each other.  POV-Ray  can use slabs on any finite object.  However infinite objects such as  plane, quadric, quartic, cubic & poly cannot be automatically bound.  Also  CSG objects cannot be efficiently bound by automatic methods.  By attaching  a bounded_by statement to such shapes you can speed up the testing of the  shape and make it capable of using bounding slabs. 
  2638. If you use bounding shapes around any complex objects you can speed up the  rendering. Bounding shapes tell the ray tracer that the object is totally  enclosed by a simple shape. When tracing rays, the ray is first tested  against the simple bounding shape. If it strikes the bounding shape, then  the ray is further tested against the more complicated object inside.  Otherwise the entire complex shape is skipped, which greatly speeds  rendering.   `
  2639. To use bounding shapes, simply include the following lines in the  declaration of your object: T
  2640.        
  2641.             bounded_by {
  2642.                  object { ... }
  2643.             }
  2644.        
  2645.        An example of a Bounding Shape:
  2646.        
  2647.             intersection {
  2648.                 sphere {<0,0,0>, 2}
  2649.                 plane  {<0,1,0>, 0}
  2650.                 plane  {<1,0,0>, 0}
  2651.                 bounded_by {sphere {<0,0,0>, 2}}
  2652.             }
  2653.        
  2654. The best bounding shape is a sphere or a box since these shapes are highly  optimized, although, any shape may be used.  If the bounding shape is  itself a finite shape which responds to bounding slabs then the object  which it encloses will also be used in the slab system. v
  2655. CSG shapes can benefit from bounding slabs without a bounded_by statement  however they may do so inefficiently in intersection, difference and merge.   In these three CSG types the automatic bound used covers all of the  component objects in their entirety.  However the result of these  intersections may result in a smaller object.  Compare the sizes of the  illustrations for union and intersection in the CSG section above.  It is  possible to draw a much smaller box around the intersection of A and B than  the union of A and B yet the automatic bounds are the size of union{A B}  regardless of the kind of CSG specified. 
  2656. While it is almost always a good idea to manually add a bounded_by to  intersection, difference and merge, it is often best to NOT bound a union.   If a union has no bounded_by and no clipped_by then POV-Ray can internally  split apart the components of a union and apply automatic bounding slabs to  any of its finite parts.  Note that some utilities such as RAW2POV may be  able to generate bounds more efficiently than POV-Ray's current system.   However most unions you create yourself can be easily bounded by the  automatic system.  For technical reasons POV-Ray cannot split a merge  object.  It is probably best to hand bound a merge, especially if it is  very complex. b
  2657. Note that if bounding shape is too small or positioned incorrectly, it may  clip the object in undefined ways or the object may not appear at all.  To  do true clipping, use clipped_by as explained above. Often you will want to  use the clipped_by and bounded_by options with the same object.  The  following shortcut saves typing and uses less memory. ~
  2658.         object {
  2659.            My_Thing
  2660.            clipped_by{box{<0,0,0>,<1,1,1>}}
  2661.            bounded_by{clipped_by}
  2662.         }
  2663. This tells POV-Ray to use the same box as a bounds that was used as a clip. 
  2664. 5.3.3 NO_SHADOW 
  2665. You may specify the no_shadow keyword in object and that object will not  cast a shadow.  This is useful for special effects and for creating the  illusion that a light source actually is visible.  This keyword was  necessary in earlier versions of POV-Ray which did not have the  "looks_like" statement.  Now it is useful for creating things like laser  beams or other unreal effects. '
  2666. Simply attach the keyword as follows: C
  2667.         object {
  2668.           My_Thing
  2669.           no_shadow
  2670.         }
  2671. 5.4   TEXTURES -------------- 
  2672. Textures are the materials from which the objects in POV-Ray are made. They  specifically describe the surface coloring, shading, and properties like  transparency and reflection. 
  2673. You can create your own textures using the parameters described below, or  you can use the many pre-defined high quality textures that have been  provided in the files TEXTURES.INC and STONES.INC. The tutorial in section  4 above introduces the basics of defining textures and attaching them to  objects.  It explains how textures are made up of three portions, a color  pattern called "pigment", a bump pattern called "normal", and surface  properties called "finish".  >
  2674. The most complete form for defining a texture is as follows: s
  2675.   texture {
  2676.     TEXTURE_IDENTIFIER
  2677.     pigment {...}
  2678.     normal {...}
  2679.     finish {...}
  2680.     TRANSFORMATIONS...
  2681. Each of the items in a texture are optional but if they are present, the  identifier must be first and the transformations bust be last.  The  pigment, normal and finish parameters modify any pigment, normal and finish  already specified in the TEXTURE_IDENTIFIER.  If no texture identifier is  specified then the pigment, normal and finish statements modify the current  default values.  TRANSFORMATIONs are translate, rotate and scale  statements.  They should be specified last. ^
  2682. The sections below describe all of the options available in pigments,  normals and finishes. 
  2683.          5.4.1   PIGMENT
  2684.          5.4.2   NORMAL
  2685.          5.4.3   FINISH
  2686.          5.4.4   SPECIAL
  2687. TEXTURES
  2688.          5.4.5   LAYERED
  2689. TEXTURES
  2690.          5.4.6   DEFAULT
  2691. TEXTURE
  2692. 5.4.1 PIGMENT r
  2693. The color or pattern of colors for an object is defined by a pigment  statement.  A pigment statement is part of a texture specification.   However it can be tedious to type "texture{pigment{...}}" just to add a  color to an object.  Therefore you may attach a pigment directly to an  object without explicitly specifying that it as part of a texture.  For  example... =
  2694.  this...                        can be shortened to this...
  2695.   object {                           object {                   
  2696.     My_Object                          My_Object                
  2697.     texture {                          pigment {color Purple} 
  2698.       pigment {color Purple}         }                        
  2699.     }                                  
  2700.   }                                                           
  2701. The color you define is the way you want it to look if fully illuminated.   You pick the basic color inherent in the object and POV-Ray brightens or  darkens it depending on the lighting in the scene.  The parameter is called  "pigment" because we are defining the basic color the object actually IS  rather than how it LOOKS. >
  2702. The most complete form for defining a pigment is as follows: f
  2703.   pigment {
  2704.     PIGMENT_IDENTIFIER
  2705.     PATTERN_TYPE
  2706.     PIGMENT_MODIFIERS
  2707.     TRANSFORMATIONS...
  2708. Each of the items in a pigment are optional but if they are present, they  should be in the order shown above to insure that the results are as  expected.  Any items after the PIGMENT_IDENTIFIER modify or override  settings given in the IDENTIFIER.  If no identifier is specified then the  items modify the pigment values in the current default texture.   TRANSFORMATIONs are translate, rotate and scale statements.  They apply  only to the pigment and not to other parts of the texture.  They should be  specified last. 
  2709. The various PATTERN_TYPEs fall into roughly 4 categories.  Each category is  discussed below.  They are solid color, color list patterns, color mapped  patterns and image maps. 
  2710.          5.4.1.1 Color
  2711.          5.4.1.2 Color
  2712. Patterns
  2713. checker
  2714. hexagon
  2715.          5.4.1.3 Color
  2716. Mapped
  2717. Patterns
  2718.          5.4.1.4 Image
  2719.          5.4.1.5 Pigment
  2720. Modifiers
  2721. 5.4.1.1     Color 
  2722. The simplest type of pigment is a solid color.  To specify a solid color  you simply put a color specification inside a pigment.  For example... 
  2723.   pigment {color Orange}
  2724. A color specification consists of the keyword "color" followed a color  identifier or by a specification of the amount or red, green, blue and  transparency in the surface.  For example: (
  2725.   color red 0.5   green 0.2   blue 1.0
  2726. The float values between 0.0 and 1.0 are used to specify the intensity of  each primary color of light.  Note that we use additive color primaries  like the color phosphors on a color computer monitor or TV.  Thus... )
  2727.   color red 1.0   green 1.0   blue 1.0 
  2728.  ...specifies full intensity of all primary colors which is white light.  
  2729. The primaries may be given in any order and if any primary is unspecified  its value defaults to zero. 
  2730. In addition to the primary colors a 4th value called "filter" specifies the  amount of transparency.  For example a piece of red tinted cellophane might  have... 
  2731.   color red 1.0  filter 1.0
  2732. Lowering the filter value would let less light through.  The default value  if no filter is specified is 0.0 or no transparency.  Note that the example  has an implied "green 0.0  blue 0.0" which means that no green or blue  light can pass through.  Often users mistakenly specify a clear object  by... 
  2733.   color filter 1.0
  2734. but this has implied red, green and blue values of zero.  You've just  specified a totally black filter so no light passes through.  The correct  way is... 5
  2735.   color red 1.0   green 1.0   blue 1.0   filter 1.0
  2736. Note in earlier versions of POV-Ray the keyword "alpha" was used for  transparency.  However common usage of "alpha" in this context usually  means that light passes through unaffected.  In POV-Ray however, light is  filtered when it passes through a colored surface.  The program works the  same as it always did but the keyword has been changed to make its meaning  clearer. *
  2737. A short-cut way to specify a color is... 
  2738.   color rgb<0.2, 0.5, 0.9>
  2739.       or
  2740.   color rgbf<0.2, 0.8, 1.0, 0.7>
  2741. Color specifications are used elsewhere in POV-Ray.  Unless stated  otherwise, all of the above information on color specs given above applies  to any color spec. 
  2742. Color identifiers may be declared.  For examples see COLORS.INC.  A color  identifier contains red, blue, green and filter values even if they are not  explicitly specified.  For example: D
  2743.   color filter 1.0 My_Color // here My_Color overwrites the filter
  2744.   color My_Color filter 1.0 // this changes My_Color's filter value to 1.0
  2745. When using a color specification to give an object a solid color pigment,  the keyword "color" may be omitted.  For example... =
  2746.   pigment {red 1  blue 0.5}
  2747.         or
  2748.   pigment {My_Color}
  2749. are legal. 
  2750. 5.4.1.2     Color List Patterns -- checker and hexagon 
  2751. Two of the simplest color patterns available are the checker and hexagon  patterns.  These patterns take a simple list of colors one after the other.   For example a checker pattern is specified by... (
  2752.   pigment {checker color C1  color C2}
  2753. This produces a checkered pattern consisting of alternating squares of  color C1 and C2.  If no colors are specified then default blue and green  colors are used. 
  2754. All color patterns in POV-Ray are 3 dimensional.  For every x,y,z point in  space, the pattern has a unique color.  In the case of a checker pattern it  is actually a series of cubes that are one unit in size.  Imagine a bunch  of 1 inch cubes made from two different colors of modeling clay.  Now  imagine arranging the cubes in an alternating check pattern and stacking  them in layer after layer so that the colors still alternated in every  direction.  Eventually you would have a larger cube.  The pattern of checks  on each side is what the POV-Ray checker pattern produces when applied to a  box object.  Finally imagine cutting away at the cube until it is carved  into a smooth sphere or any other shape.  This is what the checker pattern  would look like on an object of any kind. g
  2755. Color patterns do not wrap around the surfaces like putting wallpaper on an  object.  The patterns exist in 3-d and the objects are carved from them  like carving stacked colored cubes.  In a later section we describe wood  and marble patterns for example.  The wood grain or stone swirls exist  through the whole object but they appear only at the surface. k
  2756. Another pattern that uses a list of colors is the hexagon pattern.  A  hexagon pattern is specified by... 2
  2757.   pigment {hexagon color C1  color C2  color C3}
  2758. Hex pattern generates a repeating pattern of hexagons in the XZ plane.  In  this instance imagine tall rods that are hexagonal in shape and are  parallel to the Y axis and grouped in bundles like this... 
  2759.            _____
  2760.           /     \
  2761.          /   C2  \_____
  2762.         |\       /     \
  2763.         | \_____/   C3  \
  2764.         | /     \       /|
  2765.          /   C1  \_____/ |
  2766.         |\       /|    | |
  2767.         | \_____/ |    | |
  2768.         | |     | |    | |
  2769.         | |     | |    | |
  2770.         | |     | |    | |
  2771.         | |     | |    | |
  2772.         | |     | |    |
  2773.         | |     | |    |
  2774.           |     |
  2775.           |     |
  2776. The three colors will repeat the pattern shown above with hexagon C1  centered at the origin.  Each side of the hexagon is one unit long.  The  hexagonal "rods" of color extend infinitely in the +Y and -Y directions.   If no colors are specified then default blue, green, and red colors are  used. 
  2777. 5.4.1.3     Color Mapped Patterns \
  2778. Most of the color patterns do not use abrupt color changes of just two or  three colors like those in the checker or hexagon patterns.  They instead  use smooth transitions of many colors that gradually change from one point  to the next.  The colors are defined in a color map that describes how the  pattern blends from one color to the next.   H
  2779.         5.4.1.3.1   Gradient
  2780.         5.4.1.3.2   Color
  2781.         5.4.1.3.3   Marble
  2782.         5.4.1.3.4   Wood
  2783.         5.4.1.3.5   Onion
  2784.         5.4.1.3.6   Leopard
  2785.         5.4.1.3.7   Granite
  2786.         5.4.1.3.8   Bozo
  2787.         5.4.1.3.9   Spotted
  2788.         5.4.1.3.10  Agate
  2789.         5.4.1.3.11  Mandel
  2790.         5.4.1.3.12  Radial
  2791. 5.4.1.3.1   Gradient  W
  2792. This simplest such pattern is the "gradient" pattern.  It is specified as  follows... 
  2793.   pigment {gradient VECTOR}
  2794. where VECTOR is a vector pointing in the direction that the colors blend.   For example: 
  2795.       sphere {
  2796.         <0, 1, 2>, 2
  2797.         pigment { gradient x } // bands of color vary as you move
  2798.                                // along the "x" direction.
  2799.       }
  2800. This produces a series of smooth bands of color that look like layers of  color next to each other.  Points at x=0 are black.  As the X location  increases it smoothly turns to white at x=1.  Then it starts over with  black and gradually turns white at x=2.  The pattern reverses for negative  values of X.  Using "gradient y" or "gradient z" makes the colors blend  along the y or z axis.  Any vector may be used but x, y and z are most  common. 
  2801. 5.4.1.3.2   Color Maps 
  2802. The gray scale default colors of the gradient pattern isn't a very  interesting sight.  The real power comes from specifying a color map to  define how the colors should blend. 
  2803. Each of the various pattern types available is in fact a mathematical  function that takes any x,y,z location and turns it into a number between  0.0 and 1.0.  That number is used to specify what mix of colors to use from  the color map.  
  2804. A color map is specified by... x
  2805.       color_map {
  2806.         [ NUM_1 color C1]
  2807.         [ NUM_2 color C2]
  2808.         [ NUM_3 color C3]
  2809.          ...
  2810.         }
  2811. Where NUM_1, NUM_2... are float values between 0.0 and 1.0 inclusive.  C1,  C2 ... are color specifications.  NOTE: the [] brackets are part of the  actual statement.  They are not notational symbols denoting optional parts.   The brackets surround each entry in the color map.  There may be from 2 to  20 entries in the map.  
  2812. For example, 
  2813.       sphere {
  2814.         <0,1,2>, 2
  2815.         pigment {
  2816.           gradient x
  2817.           color_map {
  2818.             [0.1  color Red]
  2819.             [0.3  color Yellow]
  2820.             [0.6  color Blue]
  2821.             [0.6  color Green]
  2822.             [0.8  color Cyan]
  2823.           }
  2824.         }
  2825.       }
  2826. The pattern function is evaluated and the result is a value from 0.0 to  1.0.  If the value is less than the first entry (in this case 0.1) then the  first color (Red) is used.  Values from 0.1 to 0.3 use a blend of red and  yellow using linear interpolation of the two colors.  Similarly values from  0.3 to 0.6 blend from yellow to blue.  Note that the 3rd and 4th entries  both have values of 0.6.  This causes an immediate abrupt shift of color  from blue to green.  Specifically a value that is less than 0.6 will be  blue but exactly equal to 0.6 will be green.  Moving along, values from 0.6  to 0.8 will be a blend of green and cyan.  Finally any value greater than  or equal to 0.8 will be cyan. r
  2827. If you want areas of unchanging color you simply specify the same color for  two adjacent entries.  For example: 
  2828.       color_map {
  2829.         [0.1  color Red]
  2830.         [0.3  color Yellow]
  2831.         [0.6  color Yellow]
  2832.         [0.8  color Green]
  2833.       }
  2834. In this case any value from 0.3 to 0.6 will be pure yellow. 
  2835. 5.4.1.3.3   Marble y
  2836. A "gradient x" pattern uses colors from the color map from 0.0 up to 1.0 at  location x=1 but then jumps back to the first color for x=1.00000001 (or  some tiny fraction above 1.0) and repeats the pattern again and again.  The  marble pattern is similar except that it uses the color map from 0 to 1 but  then it reverses the map and blends from 1 back to zero.  For example: 
  2837.       pigment { 
  2838.         gradient x
  2839.         color_map {
  2840.           [0.0  color Yellow]
  2841.           [1.0  color Cyan]
  2842.         }
  2843.       }
  2844. This blends from yellow to cyan and then it abruptly changes back to yellow  and repeats.  However replacing "gradient x" with "marble" smoothly blends  from yellow to cyan as the x coordinate goes from 0.0 to 0.5 and then  smoothly blends back from cyan to yellow by x=1.0. 
  2845. When used with a "turbulence" modifier and an appropriate color map, this  pattern looks like veins of color of real marble, jade or other types of  stone. By default, marble has no turbulence. 
  2846. 5.4.1.3.4   Wood 
  2847. Wood uses the color map to create concentric cylindrical bands of color  centered on the Z axis.  These bands look like the growth rings and veins  in real wood.  Small amounts of turbulence should be added to make it look  more realistic. By default, wood has no turbulence. g
  2848. Like marble, wood uses color map values 0 to 1 then repeats the colors in  reverse order from 1 to 0. 
  2849. 5.4.1.3.5   Onion 
  2850. Onion is a pattern of concentric spheres like the layers of an onion.  It  uses colors from a color map from 0 to 1, 0 to 1 etc without reversing. 
  2851. 5.4.1.3.6   Leopard  
  2852. Leopard creates regular geometric pattern of circular spots.  It uses  colors from a color map from 0 to 1, 0 to 1 etc without reversing. 
  2853. 5.4.1.3.7   Granite  
  2854. This pattern uses a simple 1/f fractal noise function to give a pretty darn  good granite pattern. Typically used with small scaling values (2.0 to  5.0).  This pattern is used with creative color maps in STONES.INC to  create some gorgeous layered stone textures. By default, granite has no  turbulence.  It uses colors from a color map from 0 to 1, 0 to 1 etc  without reversing. 
  2855. 5.4.1.3.8   Bozo  
  2856. The bozo color pattern takes a noise function and maps it onto the surface  of an object. It uses colors from a color map from 0 to 1, 0 to 1 etc  without reversing. g
  2857. Noise in ray tracing is sort of like a random number generator, but it has  the following properties: M
  2858.   1) It's defined over 3D space i.e., it takes x, y, and z and returns the 
  2859. noise value there. H
  2860.   2) If two points are far apart, the noise values at those points are 
  2861. relatively random. M
  2862.   3) If two points are close together, the noise values at those points are 
  2863. close to each other. P
  2864. You can visualize this as having a large room and a thermometer that ranges  from 0.0 to 1.0. Each point in the room has a temperature. Points that are  far apart have relatively random temperatures. Points that are close  together have close temperatures. The temperature changes smoothly, but  randomly as we move through the room.  
  2865. Now, let's place an object into this room along with an artist. The artist  measures the temperature at each point on the object and paints that point  a different color depending on the temperature. What do we get? A POV-Ray  bozo texture! 
  2866. 5.4.1.3.9   Spotted  
  2867. This uses the same noise pattern as bozo but it is unaffected by  turbulence.  It uses colors from a color map from 0 to 1, 0 to 1 etc  without reversing. 
  2868. 5.4.1.3.10  Agate  6
  2869. This pattern is very beautiful and similar to marble, but uses a different  turbulence function. The turbulence keyword has no effect, and as such it  is always very turbulent. You may control the amount of the built-in  turbulence by adding the "agate_turb" keyword followed by a float value.   For example: k
  2870.       pigment { 
  2871.         agate
  2872.         agate_turb 0.5
  2873.         color_map {
  2874.           ...
  2875.         }
  2876.       }
  2877. 5.4.1.3.11  Mandel 
  2878. The mandel pattern computes the standard Mandelbrot fractal pattern and  projects it onto the X-Y plane.  It uses the X and Y coordinates to compute  the Mandelbrot set.  The pattern is specified with the keyword mandel  followed by an integer number.  This number is the maximum number of  iterations to be used to compute the set.  Typical values range from 10 up  to 256 but any positive integer may be used.  For example: 
  2879.       sphere { 
  2880.        <0, 0, 0>, 1 
  2881.        pigment {
  2882.          mandel 25
  2883.          color_map {
  2884.            [0.0  color Cyan]
  2885.            [0.3  color Yellow]
  2886.            [0.6  color Magenta]
  2887.            [1.0  color Cyan]
  2888.          }
  2889.          scale .5
  2890.        }
  2891.       }
  2892. The value passed to the color map is computed by the formula: 7
  2893.         value = number_of_iterations / max_iterations
  2894. The color extends infinitely in the Z direction similar to a planar image  map.   
  2895. 5.4.1.3.12  Radial A
  2896. The radial pattern is a radial blend that wraps around the +Y axis.  The  color for value 0.0 starts at the +X direction and wraps the color map  around from east to west with 0.25 in the -Z direction, 0.5 in -X, 0.75 at  +Z and back to 1.0 at +X.  See the "frequency" and "phase" pigment  modifiers below for examples. 
  2897. 5.4.1.4     Image Maps 
  2898. When all else fails and none of the above pigment pattern types meets your  needs, you can use an image map to wrap a 2-D bit-mapped image around your  3-D objects. 
  2899.          5.4.1.4.1   Specifying
  2900. image
  2901.          5.4.1.4.2   The
  2902. "once"
  2903. option.
  2904.          5.4.1.4.3   The
  2905. "map_type"
  2906. option.
  2907.          5.4.1.4.4   The
  2908. "filter"
  2909. options.
  2910.          5.4.1.4.5   The
  2911. "interpolate"
  2912. option.
  2913. 5.4.1.4.1   Specifying an image map.  
  2914. The syntax for image_map is... U
  2915.   pigment {
  2916.     image_map {
  2917.       FILE_TYPE "filename"
  2918.       MODIFIERS...
  2919.     }
  2920. Where FILE_TYPE is one of the following keywords "gif", "tga", "iff" or  "dump".  This is followed by the name of the file in quotes.  Several  optional modifiers may follow the file specification.  The modifiers are  described below.  Note: Earlier versions of POV-Ray allowed some modifiers  before the FILE_TYPE but that syntax is being phased out in favor of the  syntax described here. 
  2921. Filenames specified in the image_map statements will be searched for in the  home (current) directory first, and if not found, will then be searched for  in directories specified by any "-L" (library path) options active. This  would facilitate keeping all your image maps files in a separate  subdirectory, and giving an "-L" option on the command line to where your  library of image maps are.  
  2922. By default, the image is mapped onto the X-Y plane.  The image is  "projected" onto the object as though there were a slide projector  somewhere in the -Z direction.  The image exactly fills the square area  from x,y coordinates (0,0) to (1,1) regardless of the image's original size  in pixels.  If you would like to change this default, you may translate,  rotate or scale the pigment or texture to map it onto the object's surface  as desired.  
  2923. In the section 5.4.1.2 above when we explained checker pigment patterns, we  described the checks as solid cubes of colored clay from which objects are  carved.  With image maps you should imagine that each pixel is a long,  thin, square, colored rod that extends parallel to the Z axis.  The image  is made from rows and columns of these rods bundled together and the object  is then carved from the bundle. 
  2924. If you would like to change this default orientation, you may translate,  rotate or scale the pigment or texture to map it onto the object's surface  as desired.  
  2925. 5.4.1.4.2   The "once" option. @
  2926. Normally there are an infinite number of repeating images created over  every unit square of the X-Y plane like tiles.  By adding the keyword  "once" after a file name, you can eliminate all other copies of the image  except the one at (0,0) to (1,1).  Areas outside this unit square are  treated as fully transparent. W
  2927. Note: The "once" keyword may also be used with bump_map and material_map  statements. 
  2928. 5.4.1.4.3   The "map_type" option. 
  2929. The default projection of the image onto the X-Y plane is called a "planar  map type".  This option may be changed by adding the "map_type" keyword  followed by a number specifying the way to wrap the image around the  object. D
  2930. A "map_type 0" gives the default planar mapping already described. 
  2931. A "map_type 1" is a spherical mapping.  It assumes that the object is a  sphere of any size sitting at the origin.  The Y axis is the north/south  pole of the spherical mapping.  The top and bottom edges of the image just  touch the pole regardless of any scaling.  The left edge of the image  begins at the positive X axis and wraps the image around the sphere from  "west" to "east" in a -Y rotation.  The image covers the sphere exactly  once.  The "once" keyword has no meaning for this type. B
  2932. With "map_type 2" you get a cylindrical mapping.  It assumes that a  cylinder of any diameter lies along the Y axis.  The image wraps around the  cylinder just like the spherical map but the image remains 1 unit tall from  y=0 to y=1.  This band of color is repeated at all heights unless the  "once" keyword is applied. M
  2933. Finally "map_type 5" is a torus or donut shaped mapping.  It assumes that a  torus of major radius 1 sits at the origin in the X-Z plane.  The image is  wrapped around similar to spherical or cylindrical maps.  However the top  and bottom edges of the map wrap over and under the torus where they meet  each other on the inner rim. ,
  2934. Types 3 and 4 are still under development. [
  2935. Note: The "map_type" option may also be applied to bump_map and  material_map statements. 
  2936. 5.4.1.4.4   The "filter" options. 
  2937. To make all or part of an image map transparent, you can specify filter  values for the color palette/registers of GIF or IFF pictures (at least for  the modes that use palettes/color maps). You can do this by adding the  keyword "filter" following the filename.  The keyword is followed by two  numbers.  The first number is the palette/register number value and 2nd is  the amount of transparency. The values should be separated by a comma.  For  example: 
  2938.    image_map { 
  2939.      gif "mypic.gif"
  2940.      map_type 0 
  2941.      filter 0, 0.5 // Make color 0 50% transparent
  2942.      filter 5, 1.0 // Make color 5 100% transparent
  2943.      filter 8, 0.3 // Make color 8 30% transparent
  2944.     }
  2945. You can give the entire image a filter value using "filter all VALUE".  For  example: T
  2946.    image_map { 
  2947.      gif "stnglass.gif"
  2948.      map_type 0 
  2949.      filter all 0.9
  2950.     }
  2951. NOTE: Transparency works by filtering light by its original color.  Adding  "filter" to the color black still leaves you with black no matter how high  the filter value is. If you want a color to be clear, add filter 1 to the  color white. 
  2952. 5.4.1.4.5   The "interpolate" option. 
  2953. Adding the "interpolate" keyword can smooths the jagged look of an image or  bump map.  When POV-Ray asks a color or bump amount for an image or bump  map, it often asks for a point that is not directly on top of one pixel,  but sort of between several different colored pixels.  Interpolations  returns an "in-between" value so that the steps between the pixels in the  image or bump map will look smoother. 1
  2954. There are currently two types of interpolation: Q
  2955.    Normalized Distance -- interpolate 4
  2956.    Bilinear            -- interpolate 2
  2957. Default is no interpolation. Normalized distance is the slightly faster of  the two, bilinear does a better job of picking the between color. Normally,  bilinear is used. 
  2958. If your bump or image map looks jaggy, try using interpolation instead of  going to a higher resolution image.  The results can be very good.  For  example: P
  2959.    image_map { 
  2960.      gif "mypic.gif"
  2961.      map_type 0 
  2962.      interpolate 2
  2963.     }
  2964. 5.4.1.5     Pigment Modifiers 
  2965. After specifying the pigment type such as marble, wood etc and adding an  optional color map, you may add any of several modifiers. 
  2966.         5.4.1.5.1   Turbulence
  2967.         5.4.1.5.2   Octaves
  2968.         5.4.1.5.3   Omega
  2969.         5.4.1.5.4   Lambda
  2970.         5.4.1.5.5   Quick_color
  2971.         5.4.1.5.6   Frequency
  2972. Phase
  2973.         5.4.1.5.7   Transforming
  2974. pigments
  2975. 5.4.1.5.1   Turbulence 
  2976. The keyword "turbulence" followed by a float or vector may be used to stir  up the color pattern.  Typical values range from the default 0.0 which is  no turbulence to 1.0 which is very turbulent.  If a vector is specified  then different amounts of turbulence are applied in the x, y and z  directions.  For example "turbulence <1.0, 0.6, 0.1>" has much turbulence  in the x direction, a moderate amount in the y direction and a small amount  in the z direction. 
  2977. Turbulence uses a noise function called DNoise.  This is sort of like noise  used in the bozo pattern except that instead of giving a single value it  gives a direction. You can think of it as the direction that the wind is  blowing at that spot. (
  2978. Turbulence which uses DNoise to push a point around a few times.  We locate  the point we want to color (P), then push it around a bit using turbulence  to get to a final point (Q) then look up the color of point Q in our  ordinary boring textures. That's the color that's used for the point P. 
  2979. It in effect says "Don't give me the color at this spot... take a few  random steps in a different direction and give me that color.  Each step is  typically half as long as the one before.  For example: 
  2980.          P ------------------------->
  2981.                   First Move        /
  2982.                                    /
  2983.                                   /
  2984.                                  /Second
  2985.                                 /  Move
  2986.                                /
  2987.                         ______/
  2988.                         \
  2989.                          \
  2990.                           Q - Final point.
  2991. The magnitude of these steps is controlled by the turbulence value. 
  2992. 5.4.1.5.2   Octaves 
  2993. The number of steps used by turbulence is controlled by the "octaves"  value.  The values may range from 1 up to 10.  The default value of  "octaves 6" is fairly close to the upper limit; you won't see much change  by setting it to a higher value because the extra steps are too small.  You  can achieve some very interesting wavy effects by specifying lower values.  Setting octaves higher can slow down rendering because more steps are  computed. 
  2994. 5.4.1.5.3   Omega 
  2995. The keyword "omega" followed by a float value may be added to change the  turbulence calculations.  Each successive octave of turbulence is  multiplied by the omega value. The default "omega 0.5" means that each  octave is 1/2 the size of the previous one.  Higher omega values mean that  2nd, 3rd, 4th and up octaves contribute more turbulence giving a sharper,  "krinkly" look while smaller omegas give a fuzzy kind of turbulence that  gets blury in places. 
  2996. 5.4.1.5.4   Lambda 
  2997. The lambda parameter controls how statistically different the random move  of an octave is compared to its previous octave.  The default value for  this is "lambda 2".  Values close to lambda 1.0 will straighten out the  randomness of the path in the diagram above.  Higher values can look more  "swirly" under some circumstances.  More tinkering by POV-Ray users may  lead us to discover ways to make good use of this parameter.  For now just  tinker and enjoy. 
  2998. 5.4.1.5.5   Quick_color H
  2999. When developing POV-Ray scenes its often useful to do low quality test runs  that render faster.  The +Q command line switch can be used to turn off  some time consuming color pattern and lighting calculations to speed things  up.  However all settings of +Q5 or lower turns off pigment calculations  and creates gray objects. 
  3000. By adding a "quick_color" to a pigment you tell POV-Ray what solid color to  use for quick renders instead of a patterned pigment.  For example: 
  3001.    pigment {
  3002.      gradient x
  3003.      color_map{
  3004.        [0 color Yellow][0.3 color Cyan][0.6 color Magenta][1 color Cyan]
  3005.      }
  3006.      turbulence 0.5  lambda 1.5  omega 0.75  octaves 8
  3007.      quick_color Neon_Pink
  3008. This tells POV-Ray to use solid Neon_Pink for test runs at quality +Q5 or  lower but to use the turbulent gradient pattern for rendering at +Q6 and  higher. )
  3009. Note that solid color pigments such as: 
  3010.    pigment {color Magenta}
  3011. automatically set the quick_color to that value.  You may override this if  you want.  Suppose you have 10 spheres on the screen and all are Yellow.   If you want to identify them individually you could give each a different  quick_color like this: ?
  3012.    sphere {<1,2,3>,4 pigment {color Yellow  quick_color Red}}
  3013.    sphere {<-1,-2,-3>,4 pigment {color Yellow  quick_color Blue}}
  3014.  ...and so on.  At +Q6 or higher they will all be Yellow but at +Q5 or 
  3015. lower each would be different colors so you could identify them. 
  3016. 5.4.1.5.6   Frequency and Phase C
  3017. The frequency and phase keywords were originally intended for the normal  patterns ripples and waves discussed in the next section.  With version 2.0  they were extended to pigments to make the radial and mandel pigment  pattern easier to use.  As it turned out it was simple to make them apply  to any color map pattern. 
  3018. The frequency keyword adjusts the number of times that a color map repeats  over one cycle of a pattern.  For example gradient x covers color map  values 0 to 1 over the range x=0 to x=1.  By adding "frequency 2" the color  map repeats twice over that same range.  The same effect can be achieved  using "scale x*0.5" so the frequency keyword isn't that useful for patterns  like gradient.  
  3019. However the radial pattern wraps the color map around the +Y axis once.  If  you wanted two copies of the map (or 3 or 10 or 100) you'd have to build a  bigger map.  Adding "frequency 2" causes the color map to be used twice per  revolution.  Try this: 
  3020.       sphere {<0,0,0>,3
  3021.         pigment {
  3022.           radial
  3023.           color_map{[0.5 color Red][0.5 color White]}
  3024.           frequency 6
  3025.         }
  3026.         rotate -x*90
  3027.       }
  3028. The result is 6 sets of red and white radial stripes evenly spaced around  the sphere. :
  3029. Note "frequency -1" reverses the entries in a color_map. 
  3030. The phase keyword takes values from 0.0 to 1.0 and rotates the color map  entries.  In the example above if you render successive frames at phase 0  then phase 0.1, phase 0.2 etc you could create an animation that rotates  the stripes.  The same effect can be easily achieved by rotating the radial  pigment using "rotate y*Angle" but there are other uses where phase can be  handy.   >
  3031. Sometimes you create a great looking gradient or wood color map but you  want the grain slightly adjusted in or out.  You could re-order the color  map entries but that's a pain.  A phase adjustment will shift everything  but keep the same scale.  Try animating a mandel pigment for a color  palette rotation effect. 
  3032. 5.4.1.5.7   Transforming pigments 
  3033. You may modify pigment patterns with "translate", "rotate" and "scale"  commands.  Note that placing these transforms inside the texture but  outside the pigment will transform the entire texture.  However placing  them inside the pigment transforms just the pigment.  For example: 
  3034.       sphere {<0,0,0>,3
  3035.         texture {
  3036.           pigment {
  3037.             checker color Red color White
  3038.             scale <2,1,3>  // affects pigment only... not normal
  3039.           }
  3040.           normal {
  3041.             bumps 0.3
  3042.             scale 0.4      // affects bump normal only... not pigment
  3043.           }
  3044.           finish {Shiny}
  3045.           translate 5*x    // affects entire texture
  3046.         }
  3047.         translate y*2      // affects object and texture
  3048.       }
  3049. Note that transforms affect the entire pigment regardless of the ordering  of other parameters.  For example: =
  3050.   This...                         ...is the same as this...
  3051.      pigment {                          pigment {                    
  3052.        bozo                               bozo                       
  3053.        turbulence 0.3                     scale 2                              
  3054.        scale 2                            turbulence 0.3   
  3055.      }                                  }                            
  3056. The scaling before or after turbulence makes no difference.  In general it  is best to put all transformations last for the sake of clarity. 
  3057. 5.4.2 NORMAL ,
  3058. Ray tracing is known for the dramatic way it depicts reflection, refraction  and lighting effects.  Much of our perception depends on the reflective  properties of an object.  Ray tracing can exploit this by playing tricks on  our perception to make us see complex details that aren't really there. 
  3059. Suppose you wanted a very bumpy surface on the object.  It would be very  difficult to mathematically model lots of bumps.  We can however simulate  the way bumps look by altering the way light reflects off of the surface.   Reflection calculations depend on a vector called a "surface normal"  vector.  This is a vector which points away from the surface and is  perpendicular to it.  By artificially modifying (or perturbing) this normal  vector you can simulate bumps.   (
  3060. The "normal {...}" statement is the part of a texture which defines the  pattern of normal perturbations to be applied to an object.  Like the  pigment statement, you can omit the surrounding texture block to save  typing.  Do not forget however that there is a texture implied. For  example... =
  3061.  this...                        can be shortened to this...
  3062.   object {                           object {                   
  3063.     My_Object                          My_Object                
  3064.     texture {                          pigment {color Purple} 
  3065.       pigment {color Purple}           normal {bumps 0.3}                        
  3066.       normal {bumps 0.3}             }
  3067.     }                                  
  3068.   }                                                           
  3069. Note that attaching a normal pattern does not really modify the surface.   It only affects the way light reflects or refracts at the surface so that  it looks bumpy. =
  3070. The most complete form for defining a normal is as follows: j
  3071.   normal {
  3072.     NORMAL_IDENTIFIER
  3073.     NORMAL_PATTERN_TYPE
  3074.     NORMAL_MODIFIERS
  3075.     TRANSFORMATIONS...
  3076. Each of the items in a normal are optional but if they are present, they  should be in the order shown above to insure that the results are as  expected.  Any items after the NORMAL_IDENTIFIER modify or override  settings given in the IDENTIFIER.  If no identifier is specified then the  items modify the normal values in the current default texture.   TRANSFORMATIONs are translate, rotate and scale statements.  They apply  only to the normal and not to other parts of the texture.  They should be  specified last. 
  3077. There are 6 different NORMAL_PATTERN_TYPEs discussed below.  They are  bumps, dents, ripples, waves, wrinkles and bump_map.   
  3078.          5.4.2.1 Bumps
  3079.          5.4.2.2 Dents
  3080.          5.4.2.3 Ripples
  3081.          5.4.2.4 Waves
  3082.          5.4.2.5 Wrinkles
  3083.          5.4.2.6 Bump_map
  3084.          5.4.2.7 Normal
  3085. Modifiers
  3086. 5.4.2.1     Bumps 
  3087. A smoothly rolling random pattern of bumps can be created with the "bumps"  normal pattern.  Bumps uses the same random noise function as the bozo and  spotted pigment patterns, but uses the derived value to perturb the surface  normal or, in other words, make the surface look bumpy. This gives the  impression of a "bumpy" surface, random and irregular, sort of like an  orange.  
  3088. After the bumps keyword, you supply a single floating point value for the  amount of surface perturbation.  Values typically range from 0.0 (No Bumps)  to 1.0 or greater (Extremely Bumpy). For example: 
  3089.       sphere {
  3090.         <0, 1, 2>, 2
  3091.         texture {
  3092.           pigment {color Yellow}
  3093.           normal {bumps 0.4   scale 0.2}
  3094.           finish {phong 1}
  3095.         }
  3096.       }
  3097. This tells POV-Ray to use a bump pattern to modify the surface normal.  The  value 0.4 controls the apparent depth of the bumps.  Usually the bumps are  about 1 unit wide which doesn't work very well with a sphere of radius 2.   The scale makes the bumps 1/5th as wide but does not affect their depth.  
  3098. 5.4.2.2     Dents 
  3099. The "dents" pattern is especially interesting when used with metallic  textures, it gives impressions into the metal surface that look like dents  have been beaten into the surface with a hammer. A single value is supplied  after the dents keyword to indicate the amount of denting required. Values  range from 0.0 (Showroom New) to 1.0 (Insurance Wreck). Scale the pattern  to make the pitting more or less frequent. 
  3100. 5.4.2.3     Ripples Y
  3101. The ripples bump pattern make a surface look like ripples of water. The  ripples option requires a value to determine how deep the ripples are.   Values range from 0.0 to 1.0 or more.  The ripples radiate from 10 random  locations inside the unit cube area <0,0,0> to <1,1,1>.  Scale the pattern  to make the centers closer or farther apart.   
  3102. The frequency keyword changes the spacing between ripples.  The phase  keyword can be used to move the ripples outwards for realistic animation. 
  3103. 5.4.2.4     Waves 
  3104. This works in a similar way to ripples except that it makes waves with  different frequencies. The effect is to make waves that look more like deep  ocean waves.  The waves option requires a value to determine how deep the  waves are.  Values range from 0.0 to 1.0 or more.  The waves radiate from  10 random locations inside the unit cube area <0,0,0> to <1,1,1>.  Scale  the pattern to make the centers closer or farther apart.   
  3105. The frequency keyword changes the spacing between waves.  The phase keyword  can be used to move the waves outwards for realistic animation. 
  3106. 5.4.2.5     Wrinkles m
  3107. This is sort of a 3-D bumpy granite. It uses a similar 1/f fractal noise  function to perturb the surface normal in 3-D space. With a transparent  color pattern, could look like wrinkled cellophane. Requires a single value  after the wrinkles keyword to indicate the amount of wrinkling desired.  Values from 0.0 (No Wrinkles) to 1.0 (Very Wrinkled) are typical.  
  3108. 5.4.2.6     Bump_map 
  3109. When all else fails and none of the above normal pattern types meets your  needs, you can use a bump map to wrap a 2-D bit-mapped bump pattern around  your 3-D objects. 
  3110. Instead of placing the color of the image on the shape like an image_map,  bump_map perturbs the surface normal based on the color of the image at  that point. The result looks like the image has been embossed into the  surface.  By default, bump_map uses the brightness of the actual color of  the pixel. Colors are converted to gray scale internally before calculating  height.  Black is a low spot, white is a high spot. The image's index  values may be used instead (see use_index) below.   
  3111.          5.4.2.6.1   Specifying
  3112.          5.4.2.6.2   Bump_size
  3113.          5.4.2.6.3   Use_index
  3114. use_color
  3115.          5.4.2.6.4   The
  3116. "once"
  3117. option.
  3118.          5.4.2.6.5   The
  3119. "map_type"
  3120. option.
  3121.          5.4.2.6.6   The
  3122. "interpolate"
  3123. option.
  3124. 5.4.2.6.1   Specifying a bump map. 
  3125. The syntax for bump_map is... S
  3126.   normal {
  3127.     bump_map {
  3128.       FILE_TYPE "filename"
  3129.       MODIFIERS...
  3130.     }
  3131. Where FILE_TYPE is one of the following keywords "gif", "tga", "iff" or  "dump".  This is followed by the name of the file in quotes.  Several  optional modifiers may follow the file specification.  The modifiers are  described below.  Note: Earlier versions of POV-Ray allowed some modifiers  before the FILE_TYPE but that syntax is being phased out in favor of the  syntax described here. 
  3132. Filenames specified in the bump_map statements will be searched for in the  home (current) directory first, and if not found, will then be searched for  in directories specified by any "-L" (library path) options active. This  would facilitate keeping all your bump maps files in a separate  subdirectory, and giving an "-L" option on the command line to where your  library of bump maps are.  
  3133. By default, the bump is mapped onto the X-Y plane.  The bump is "projected"  onto the object as though there were a slide projector somewhere in the -Z  direction.  The bump exactly fills the square area from x,y coordinates  (0,0) to (1,1) regardless of the bump's original size in pixels.  If you  would like to change this default, you may translate, rotate or scale the  normal or texture to map it onto the object's surface as desired.  
  3134. If you would like to change this default orientation, you may translate,  rotate or scale the normal or texture to map it onto the object's surface  as desired.  
  3135. 5.4.2.6.2   Bump_size 
  3136. The relative bump_size can be scaled using bump_size modifier. The  bump_size number can be any number other than 0. Valid numbers are 2, .5,  -33, 1000, etc. For example: O
  3137.   normal {
  3138.     bump_map { 
  3139.       gif "stuff.gif" 
  3140.       bump_size 5
  3141.     }
  3142. 5.4.2.6.3   Use_index & use_color 
  3143. Usually the bump_map converts the color of the pixel in the map to a  grayscale intensity value in the range 0.0 to 1.0 and calculates the bumps  based on that value.  If you specify use_index, bump_map uses the color's  palette number to compute as the height of the bump at that point. So,  color #0 would be low and color #255 would be high. The actual color of the  pixels doesn't matter when using the index.  The "use_color" keyword may be  specified to explicitly note that the color methods should be used instead. 
  3144. 5.4.2.6.4   The "once" option. F
  3145. Normally there are an infinite number of repeating bump_maps created over  every unit square of the X-Y plane like tiles.  By adding the keyword  "once" after a file name, you can eliminate all other copies of the  bump_map except the one at (0,0) to (1,1).  Areas outside this unit square  are treated as fully transparent. X
  3146. Note: The "once" keyword may also be used with image_map and material_map  statements. 
  3147. 5.4.2.6.5   The "map_type" option. 
  3148. The default projection of the bump onto the X-Y plane is called a "planar  map type".  This option may be changed by adding the "map_type" keyword  followed by a number specifying the way to wrap the bump around the object. D
  3149. A "map_type 0" gives the default planar mapping already described. 
  3150. A "map_type 1" is a spherical mapping.  It assumes that the object is a  sphere of any size sitting at the origin.  The Y axis is the north/south  pole of the spherical mapping.  The top and bottom edges of the bump_map  just touch the pole regardless of any scaling.  The left edge of the  bump_map begins at the positive X axis and wraps the pattern around the  sphere from "west" to "east" in a -Y rotation.  The pattern covers the  sphere exactly once.  The "once" keyword has no meaning for this type. ?
  3151. With "map_type 2" you get a cylindrical mapping.  It assumes that a  cylinder of any diameter lies along the Y axis.  The bump pattern wraps  around the cylinder just like the spherical map but remains 1 unit tall  from y=0 to y=1.  This band of bumps is repeated at all heights unless the  "once" keyword is applied. T
  3152. Finally "map_type 5" is a torus or donut shaped mapping.  It assumes that a  torus of major radius 1 sits at the origin in the X-Z plane.  The bump  pattern is wrapped around similar to spherical or cylindrical maps.   However the top and bottom edges of the map wrap over and under the torus  where they meet each other on the inner rim. ,
  3153. Types 3 and 4 are still under development. \
  3154. Note: The "map_type" option may also be applied to image_map and  material_map statements. 
  3155. 5.4.2.6.6   The "interpolate" option. q
  3156. Adding the "interpolate" keyword can smooths the jagged look of a bump map.   When POV-Ray asks bump amount for a bump map, it often asks for a point  that is not directly on top of one pixel, but sort of between several  different colored pixels.  Interpolations returns an "in-between" value so  that the steps between the pixels in the bump map will look smoother. 1
  3157. There are currently two types of interpolation: Q
  3158.    Normalized Distance -- interpolate 4
  3159.    Bilinear            -- interpolate 2
  3160. Default is no interpolation. Normalized distance is the slightly faster of  the two, bilinear does a better job of picking the between color. Normally,  bilinear is used. 
  3161. If your bump map looks jaggy, try using interpolation instead of going to a  higher resolution image.  The results can be very good. 
  3162. 5.4.2.7     Normal Modifiers b
  3163. After specifying the normal type such as bumps, dents etc you may add any  of several modifiers. t
  3164.          5.4.2.7.1   Turbulence
  3165.          5.4.2.7.2   Frequency
  3166. Phase
  3167.          5.4.2.7.3   Transforming
  3168. normals
  3169. 5.4.2.7.1   Turbulence 
  3170. The keyword "turbulence" followed by a float or vector may be used to stir  up the color pattern.  Typical values range from the default 0.0 which is  no turbulence to 1.0 which is very turbulent.  If a vector is specified  then different amounts of turbulence is applied in the x, y and z  directions.  For example "turbulence <1.0, 0.6, 0.1>" has much turbulence  in the x direction, a moderate amount in the y direction and a small amount  in the z direction. 
  3171. A complete discussion of turbulence is given under Pigment Modifiers in  section 5.4.1.5 above.  The "octaves", "omega", and "lambda" options are  also available as normal modifiers.  They discussed under that section as  well. 
  3172. 5.4.2.7.2   Frequency and Phase 
  3173. Both waves and ripples respond to a parameter called phase. The phase  option allows you to create animations in which the water seems to move.  This is done by making the phase increment slowly between frames. The range  from 0.0 to 1.0 gives one complete cycle of a wave. 
  3174. The waves and ripples textures also respond to a parameter called  frequency. If you increase the frequency of the waves, they get closer  together. If you decrease it, they get farther apart.  K
  3175. Bumps, dents, wrinkles and bump_map do not respond to frequency or phase. 
  3176. 5.4.2.7.3   Transforming normals E
  3177. You may modify normal patterns with "translate", "rotate" and "scale"  commands.  Note that placing these transforms inside the texture but  outside the normal will transform the entire texture.  However placing them  inside the normal transforms just the normal.  See section 5.4.1.5.7  Transforming Pigments for examples: 
  3178. 5.4.3 FINISH 
  3179. The finish properties of a surface can greatly affect its appearance.  How  does light reflect?  What happens when light passes through?  What kind of  highlights are visible.  To answer these questions you need a finish  statement. ,
  3180. The "finish {...}" statement is the part of a texture which defines the  various finish properties to be applied to an object.  Like the pigment or  normal statement, you can omit the surrounding texture block to save  typing.  Do not forget however that there is a texture implied. For  example... =
  3181.  this...                        can be shortened to this...
  3182.   object {                           object {                   
  3183.     My_Object                          My_Object                
  3184.     texture {                          pigment {color Purple} 
  3185.       pigment {color Purple}           finish {phong 0.3}                        
  3186.       finish {phong 0.3}             }
  3187.     }                                  
  3188.   }                                                           
  3189. The most complete form for defining a finish is as follows: :
  3190.   finish {
  3191.     FINISH_IDENTIFIER
  3192.     FINISH_ITEMS...
  3193. The FINISH_IDENTIFIER is optional but should proceed all other items.  Any  items after the FINISH_IDENTIFIER modify or override settings given in the  IDENTIFIER.  If no identifier is specified then the items modify the finish  values in the current default texture.  Note that transformations are not  allowed inside a finish because finish items cover the entire surface  uniformly.   
  3194.          5.4.3.1 Diffuse
  3195. Reflection
  3196. Items
  3197.          5.4.3.2 Specular
  3198. Reflection
  3199. Items
  3200.          5.4.3.3 Highlights
  3201.          5.4.3.4 Refraction
  3202. 5.4.3.1     Diffuse Reflection Items t
  3203. When light reflects off of a surface, the laws of physics say that it  should leave the surface at the exact same angle it came in.  This is  similar to the way a billiard ball bounces off a bumper of a pool table.   This perfect reflection is called "specular" reflection.  However only very  smooth polished surfaces reflect light in this way.  Most of the time,  light reflects and is scattered in all directions by the roughness of the  surface.  This scattering is called "diffuse reflection" because the light  diffuses or spreads in a variety of directions.  It accounts for the  majority of the reflected light we see. +
  3204. In the real world, light may come from any of three possible sources.  1)It  can come directly from actual light sources which are illuminating an  object.  2)It can bounce from other objects such as mirrors via specular  reflection.  For example shine a flashlight onto a mirror.  3)It can bounce  from other objects via diffuse reflections. Look at some dark area under a  desk or in a corner.  Even though a lamp may not directly illuminate that  spot you can still see a little bit because light comes from diffuse  reflection off of nearby objects. 
  3205.          5.4.3.1.1   Diffuse
  3206.          5.4.3.1.2   Brilliance
  3207.          5.4.3.1.3   Crand
  3208. Graininess
  3209.          5.4.3.1.4   Ambient
  3210. 5.4.3.1.1   Diffuse e
  3211. POV-Ray and most other ray tracers can only simulate directly, one of these  three types of illumination.  That is the light which comes directly from  the light source which diffuses in all directions.  The keyword "diffuse"  is used in a finish statement to control how much light of this direct  light is reflected via diffuse reflection.  For example: 
  3212.       finish {diffuse 0.7}
  3213. means that 70% of the light seen comes from direct illumination from light  sources.  The default value is diffuse 0.6. 
  3214. 5.4.3.1.2   Brilliance J
  3215. The amount of direct light that diffuses from an object depends upon the  angle at which it hits the surface.  When light hits at a shallow angle it  illuminates less.  When it is directly above a surface it illuminates more.   The "brilliance" keyword can be used in a finish statement to vary the way  light falls off depending upon the angle of incidence.  This controls the  tightness of the basic diffuse illumination on objects and slightly adjusts  the appearance of surface shininess.  Objects may appear more metallic by  increasing their brilliance. The default value is 1.0. Higher values from  3.0 to about 10.0 cause the light to fall off less at medium to low angles.   There are no limits to the brilliance value. Experiment to see what works  best for a particular situation. This is best used in concert with  highlighting. 
  3216. 5.4.3.1.3   Crand Graininess 
  3217. Very rough surfaces, such as concrete or sand, exhibit a dark graininess in  their apparent color.  This is caused by the shadows of the pits or holes  in the surface.  The "crand" keyword can be added to cause a minor random  darkening the diffuse reflection of direct illumination.  Typical values  range from "crand 0.01" to "crand 0.5" or higher.  The default value is 0.   For example: 
  3218.       finish {crand 0.05}
  3219. The grain or noise introduced by this feature is applied on a pixel-by- pixel basis.  This means that it will look the same on far away objects as  on close objects.  The effect also looks different depending upon the  resolution you are using for the rendering.  For these reasons it is not a  very accurate way to model the rough surface effect, but some objects still  look better with a little crand thrown in. 
  3220. In previous versions of POV-Ray there was no "crand" keyword.  Any lone  float value found inside a texture{...} which was not preceded by a keyword  was interpreted as a randomness value. 
  3221. NOTE: This should not be used when rendering animations.  This is the one  of a few truly random features in POV-Ray, and will produce an annoying  flicker of flying pixels on any textures animated with a "crand" value. 
  3222.        
  3223. 5.4.3.1.4   Ambient 
  3224. The light you see in dark shadowed areas comes from diffuse reflection off  of other objects.  This light cannot be directly modeled using ray tracing.   However we can use a trick called "ambient lighting" to simulate the light  inside a shadowed area.   
  3225. Ambient light is light that is scattered everywhere in the room. It bounces  all over the place and manages to light objects up a bit even where no  light is directly shining.  Computing real ambient light would take far too  much time, so we simulate ambient light by adding a small amount of white  light to each texture whether or not a light is actually shining on that  texture. 
  3226. This means that the portions of a shape that are completely in shadow will  still have a little bit of their surface color. It's almost as if the  texture glows, though the ambient light in a texture only affects the shape  it is used on.  
  3227. The default value is very little ambient light (0.1). The value can range  from 0.0 to 1.0.  Ambient light affects both shadowed and non-shadowed  areas so if you turn up the ambient value you may want to turn down the  diffuse value. |
  3228. Note that this method doesn't account for the color of surrounding objects.   If you walk into a room that has red walls, floor and ceiling then your  white clothing will look pink from the reflected light.  POV-Ray's ambient  shortcut doesn't account for this.  There is also no way to model specular  reflected indirect illumination such as the flashlight shining in a mirror. 
  3229. 5.4.3.2     Specular Reflection Items 
  3230. When light does not diffuse and it DOES reflect at the same angle as it  hits an object, it is called "specular reflection".  Such mirror-like  reflection is controlled by the "reflection" keyword in a finish statement.   For example: 5
  3231.       finish {reflection 1.0  ambient 0  diffuse 0}
  3232. This gives the object a mirrored finish. It will reflect all other  elements in the scene.  The value can range from 0.0 to 1.0. By default  there is no reflection. l
  3233. Adding reflection to a texture makes it take longer to render because an  additional ray must be traced.   
  3234. NOTE: Although such reflection is called "specular" it is not controlled by  the POV-Ray "specular" keyword.  That keyword controls a "specular"  highlight. 
  3235. 5.4.3.3     Highlights 
  3236. A highlights are the bright spots that appear when a light source reflects  off of a smooth object.  They are a blend of specular reflection and  diffuse reflection.  They are specular-like because they depend upon  viewing angle and illumination angle.  However they are diffuse-like  because some scattering occurs.  In order to exactly model a highlight you  would have to calculate specular reflection off of thousands of microscopic  bumps called micro facets.  The more that micro facets are facing the  viewer, the shinier the object appears, and the tighter the highlights  become. POV-Ray uses two different models to simulate highlights without  calculating micro facets.  They are the specular and phong models. 
  3237. Note that specular and phong highlights are NOT mutually exclusive. It is  possible to specify both and they will both take effect. Normally, however,  you will only specify one or the other. 
  3238.          5.4.3.3.1   Phong
  3239. Highlights
  3240.          5.4.3.3.2   Specular
  3241. Highlight
  3242.          5.4.3.3.3   Metallic
  3243. Highlight
  3244. Modifier
  3245. 5.4.3.3.1   Phong Highlights 
  3246. The "phong" keyword controls the amount of Phong highlighting on the  object.  It causes bright shiny spots on the object that are the color of  the light source being reflected. |
  3247. The Phong method measures the average of the facets facing in the mirror  direction from the light sources to the viewer.  
  3248. Phong's value is typically from 0.0 to 1.0, where 1.0 causes complete  saturation to the light source's color at the brightest area (center) of  the highlight. The default phong 0.0 gives no highlight. 
  3249. The size of the highlight spot is defined by the phong_size value.  The  larger the phong_size, the tighter, or smaller, the highlight and the  shinier the appearance. The smaller the phong_size, the looser, or larger,  the highlight and the less glossy the appearance. 
  3250. Typical values range from 1.0 (Very Dull) to 250 (Highly Polished) though  any values may be used. Default phong_size is 40 (plastic) if phong_size is  not specified.  For example: )
  3251.       finish {phong 0.9  phong_size 60}
  3252. If "phong" is not specified then "phong_size" has no effect. 
  3253. 5.4.3.3.2   Specular Highlight 
  3254. A specular highlight is very similar to Phong highlighting, but uses  slightly different model.  The specular model more closely resembles real  specular reflection and provides a more credible spreading of the  highlights occur near the object horizons.  
  3255. Specular's value is typically from 0.0 to 1.0, where 1.0 causes complete  saturation to the light source's color at the brightest area (center) of  the highlight. The default specular 0.0 gives no highlight. 
  3256. The size of the spot is defined by the value given for roughness.  Typical  values range from 1.0 (Very Rough -- large highlight) to 0.0005 (Very  Smooth -- small highlight). The default value, if roughness is not  specified, is 0.05 (Plastic).     
  3257. It is possible to specify "wrong" values for roughness that will generate  an error when you try to render the file. Don't use 0 and if you get  errors, check to see if you are using a very, very small roughness value  that may be causing the error.  For example: -
  3258.       finish {specular 0.9  roughness 0.02}
  3259. If "specular" is not specified then "roughness" has no effect. 
  3260. 5.4.3.3.3   Metallic Highlight Modifier A
  3261. The keyword "metallic" may be used with phong or specular highlights.  This  keyword indicates that the color of the highlights will be filtered by the  surface color instead of directly using the light_source color. Note that  the keyword has no numeric value after it.  You either have it or you  don't.  For example: 3
  3262.       finish {phong 0.9  phong_size 60  metallic}
  3263. If "phong" or "specular" is not specified then "metallic" has no effect. 
  3264. 5.4.3.4     Refraction 5
  3265. When light passes through a surface either into or out of a dense medium,  the path of the ray of light is bent.  Such bending is called refraction.   Normally transparent or semi-transparent surfaces in POV-Ray do not refract  light.  Adding "refraction 1.0" to the finish statement turns on  refraction.   
  3266. Note: It is recommended that you only use "refraction 0" or "refraction 1".   Values in between will darken the refracted light in ways that do not  correspond to any physical property.  Many POV-Ray scenes were created with  intermediate refraction values before this "bug" was discovered so the  "feature" has been maintained.  A more appropriate way to reduce the  brightness of refracted light is to change the "filter" value in the colors  specified in the pigment statement.  Note also that "refraction" does not  cause the object to be transparent.  Transparency is only occurs if there  is a non-zero "filter" value in the color. n
  3267. The amount of bending or refracting of light depends upon the density of  the material.  Air, water, crystal, diamonds all have different density and  thus refract differently.  The "index of refraction" or "ior" value is used  by scientists to describe the relative density of substances.  The "ior"  keyword is used in POV-Ray to specify the value.  For example: 
  3268.       texture {
  3269.         pigment { White filter 0.9 }
  3270.         finish {
  3271.           refraction 1
  3272.           ior 1.5
  3273.         }
  3274.       }
  3275. The default ior value of 1.0 will give no refraction.  The index of  refraction for air is 1.0, water is 1.33, glass is 1.5, and diamond is 2.4.  The file IOR.INC pre-defines several useful values for ior. '
  3276. NOTE: If a texture has a filter component and no value for refraction and  ior are supplied, the renderer will simply transmit the ray through the  surface with no bending.  In layered textures, the refraction and ior  keywords MUST be in the last texture, otherwise they will not take effect. 
  3277. 5.4.4 SPECIAL TEXTURES 
  3278. Most textures consist of a single pigment, normal and finish specification  which applies to the entire surface.  However two special textures have  been implemented that extend the "checker" and "image_map" concepts to  cover not just pigment but the entire texture. 6
  3279.          5.4.4.1 Tiles
  3280.          5.4.4.2 Material_Map
  3281. 5.4.4.1     Tiles 
  3282. This first special texture is the "tiles" texture.  It works just like the  "checker" pigment pattern except it colors the blocks with entire textures  rather than solid colors. 
  3283. The syntax is: 
  3284.       texture{
  3285.         tiles {
  3286.           texture {... put in a texture here ... }
  3287.         tile2
  3288.           texture {... this is the second tile texture }
  3289.         }
  3290.        // Optionally put translate, rotate or scale here
  3291.       }
  3292. For example: v
  3293.     texture{
  3294.        tiles {
  3295.           texture { Jade }
  3296.        tile2
  3297.           texture { Red_Marble }
  3298.        } 
  3299.     }
  3300. The textures used in each tile may be any type of texture including more  tiles or regular textures made from pigment, normal and finish statements.   Note that no other pigment, normal or finish statements may be added to the  texture.  This is illegal: 
  3301.       texture {
  3302.         tiles {
  3303.           texture {T1}
  3304.         tile2
  3305.           texture {T2}
  3306.         }
  3307.         finish {phong 1.0}
  3308.       }
  3309. The finish must be individually added to each texture. 
  3310. Note that earlier versions of POV-Ray used only the pigment parts of the  textures in the tiles.  Normals and finish were ignored.  Also layered  textures were not supported.  In order to correct these problems the above  restrictions on syntax were necessary.  This means some POV-Ray 1.0 scenes  using tiles many need minor modifications that cannot be done automatically  with the version compatibility mode. t
  3311. The textures within a tiles texture may be layered but tiles textures do  don't work as part of a layered texture. 
  3312. 5.4.4.2     Material_Map 
  3313. The "material_map" special texture extends the concept of "image_map" to  apply to entire textures rather than solid colors.  A material_map allows  you to wrap a 2-D bit-mapped texture pattern around your 3-D objects. 
  3314. Instead of placing a solid color of the image on the shape like an  image_map, an entire texture is specified based on the index or color of  the image at that point.  You must specify a list of textures to be used  like a "texture palette" rather than the usual color palette.   
  3315. When used with mapped file types such as GIF, the index of the pixel is  used as an index into the list of textures you supply.  For unmapped file  types such as TGA, the 8 bit value of the red component in the range 0-255  is used as an index.   
  3316. If the index of a pixel is greater than the number of textures in your list  then the index is taken modulo N where N is the length of your list of  textures.   \
  3317.          5.4.4.2.1   Specifying
  3318. material
  3319.          5.4.4.2.2   Material_map
  3320. options.
  3321. 5.4.4.2.1   Specifying a material map. #
  3322. The syntax for material_map is... 
  3323.       texture {
  3324.         material_map {
  3325.           FILE_TYPE "filename"
  3326.           MODIFIERS...
  3327.           texture {...} // First used for index 0
  3328.           texture {...} // Second texture used for index 1
  3329.           texture {...} // Third texture used for index 2
  3330.           texture {...} // Fourth texture used for index 3
  3331.                         // and so on for however many used.
  3332.         }
  3333.         TRANSFORMATION...
  3334.       }
  3335. If particular index values are not used in an image then it may be  necessary to supply dummy textures.  It may be necessary to use a paint  program or other utility to examine the map file's palette to determine how  to arrange the texture list. 
  3336. In the syntax above, FILE_TYPE is one of the following keywords "gif",  "tga", "iff" or "dump".  This is followed by the name of the file in  quotes.  Several optional modifiers may follow the file specification.  The  modifiers are described below.  Note: Earlier versions of POV-Ray allowed  some modifiers before the FILE_TYPE but that syntax is being phased out in  favor of the syntax described here. 
  3337. Filenames specified in the material_map statements will be searched for in  the home (current) directory first, and if not found, will then be searched  for in directories specified by any "-L" (library path) options active.  This would facilitate keeping all your material maps files in a separate  subdirectory, and giving an "-L" option on the command line to where your  library of material maps are.  
  3338. By default, the material is mapped onto the X-Y plane.  The material is  "projected" onto the object as though there were a slide projector  somewhere in the -Z direction.  The material exactly fills the square area  from x,y coordinates (0,0) to (1,1) regardless of the material's original  size in pixels.  If you would like to change this default, you may  translate, rotate or scale the normal or texture to map it onto the  object's surface as desired.  
  3339. If you would like to change this default orientation, you may translate,  rotate or scale the texture to map it onto the object's surface as desired.  
  3340. Note that no other pigment, normal or finish statements may be added to the  texture outside the material_map.  This is illegal: 
  3341.       texture {
  3342.         material_map {
  3343.           gif "matmap.gif"
  3344.           texture {T1}
  3345.           texture {T2}
  3346.           texture {T3}
  3347.         }
  3348.         finish {phong 1.0}
  3349.       }
  3350. The finish must be individually added to each texture. C
  3351. Note that earlier versions of POV-Ray allowed such specifications but they  were ignored.  The above restrictions on syntax were necessary for various  bug fixes.  This means some POV-Ray 1.0 scenes using material_maps many  need minor modifications that cannot be done automatically with the version  compatibility mode. 
  3352. The textures within a material_map texture may be layered but material_map  textures do don't work as part of a layered texture.  To use a layered  texture inside a material_map you must declare it as a texture identifier  and invoke it in the texture list. 
  3353. 5.4.4.2.2   Material_map options. A
  3354. The "once" and "map_type" options may be used with material_maps exactly  like image_map or bump_map.  The "interpolate" keyword also is allowed but  it interpolates the map indices rather than the colors.  In most cases this  results in a worse image instead of a better image.  Future versions will  fix this problem. 
  3355. 5.4.5 LAYERED TEXTURES }
  3356. It is possible to create a variety of special effects using layered  textures.  A layered texture is one where several textures that are  partially transparent are laid one on top of the other to create a more  complex texture. The different texture layers show through the transparent  portions to create the appearance of one texture that is a combination of  several textures. $
  3357. You create layered textures by listing two or more textures one right after  the other. The last texture listed will be the top layer, the first one  listed will be the bottom layer. All textures in a layered texture other  than the bottom layer should have some transparency.  For example: 
  3358.       object {
  3359.         My_Object
  3360.         texture {T1}  // the bottom layer
  3361.         texture {T2}  // a semi-transparent layer
  3362.         texture {T3}  // the top semi-transparent layer
  3363.       }
  3364. In this example T2 shows only where T3 is transparent and T1 shows only  where T2 and T3 are transparent. 
  3365. The color of underlying layers is filtered by upper layers but the results  do not look exactly like a series of transparent surfaces.  If you had a  stack of surfaces with the textures applied to each, the light would be  filtered twice: once on the way in as the lower layers are illuminated by  filtered light and once on the way out.  Layered textures do not filter the  illumination on the way in.  Other parts of the lighting calculations work  differently as well.  The result look great and allow for fantastic looking  textures but they are simply different from multiple surfaces.  See  STONES.INC in the standard include files for some magnificent layered  textures. 
  3366. Note layered textures must use the "texture{...}" wrapped around any  pigment, normal or finish statements.  Do not use multiple pigment, normal  or finish statements without putting them inside the texture statement. 1
  3367. Layered textures may be declared.  For example: j
  3368.       #declare Layered_Examp=
  3369.             texture {T1}
  3370.             texture {T2}
  3371.             texture {T3}
  3372. Then invoke it as follows: 
  3373.       object {
  3374.         My_Object
  3375.         texture {
  3376.           Layer_Examp
  3377.           // Any pigment, normal or finish here
  3378.           // modifies the bottom layer only.
  3379.         }
  3380.       }
  3381. 5.4.6 DEFAULT TEXTURE 
  3382. POV-Ray creates a default texture when it begins processing.  You may  change those defaults as described below.  Every time you specify a  "texture{...}" statement, POV-Ray creates a copy of the default texture.   Anything items you put in the texture statement override the default  settings.  If you attach a pigment, normal or finish to an object without  any texture statement then POV-Ray checks to see if a texture has already  been attached.  If it has a texture then the pigment, normal or finish will  modify that existing texture.  If no texture has yet been attached to the  object then the default texture is copied and the pigment, normal or finish  will modify that texture. z
  3383. You may change the default texture, pigment, normal or finish using the  language directive "#default {...}" as follows: ~
  3384.       #default {
  3385.         texture {
  3386.           pigment {...}
  3387.           normal  {...}
  3388.           finish  {...}
  3389.         }
  3390.       }
  3391. Or you may change just part of it like this: 1
  3392.       #default {
  3393.          pigment {...}
  3394.       }
  3395. This still changes the pigment of the default texture.  At any time there  is only one default texture made from the default pigment, normal and  finish.  The example above does not make a separate default for pigments  alone.  Note: Special textures tiles and material_map may not be used as  defaults. 
  3396. You may change the defaults several times throughout a scene as you wish.   Subsequent #default statements begin with the defaults that were in effect  at the time.  If you wish to reset to the original POV-Ray defaults then  you should first save them as follows: E
  3397.       //At top of file
  3398.       #declare Original_Default = texture {}
  3399. later after changing defaults you may restore it with... -
  3400.       #default {texture {Original_Default}}
  3401. If you do not specify a texture for an object then the default texture is  attached when the object appears in the scene.  It is not attached when an  object is declared.  For example: U
  3402.       #declare My_Object=
  3403.         sphere{<0,0,0>,1}  // Default texture not applied
  3404.       object{My_Object}    // Default texture added here
  3405. You may force a default texture to be added by using an empty texture  statement as follows: Z
  3406.       #declare My_Thing=
  3407.         sphere{<0,0,0>,1 texture{}}  // Default texture applied
  3408. The original POV-Ray defaults for all items are given throughout the  documentation under each appropriate section. 
  3409. 5.5   CAMERA ------------ T
  3410. Every scene in POV-Ray has a camera defined.  If you do not specify a  camera then a default camera is used.  The camera definition describes the  position, angle and properties of the camera viewing the scene. POV-Ray  uses this definition to do a simulation of the camera in the ray tracing  universe and "take a picture" of your scene. 
  3411. The camera simulated in POV-Ray is a pinhole camera. Pinhole cameras have a  fixed focus so all elements of the scene will always be perfectly in focus.  The pinhole camera is not able to do soft focus or depth of field effects. 
  3412. A total of 6 vectors may be specified to define the camera but only a few  of those are needed to in most cases.  Here is an introduction to simple  camera placement. 
  3413.          5.5.1   LOCATION
  3414. LOOK_AT
  3415.          5.5.2   THE
  3416. VECTOR
  3417.          5.5.3   THE
  3418. DIRECTION
  3419. VECTOR
  3420.          5.5.4   UP
  3421. RIGHT
  3422. VECTORS
  3423.          5.5.5   TRANSFORMING
  3424. CAMERA
  3425.          5.5.6   CAMERA
  3426. IDENTIFIERS
  3427. 5.5.1 LOCATION AND LOOK_AT z
  3428. Under many circumstances just two vectors in the camera statement are all  you need: location and look_at.  For example: L
  3429.       camera {
  3430.         location <3,5,-10>
  3431.         look_at  <0,2,1>
  3432.       }
  3433. The location is simply the X, Y, Z coordinates of the camera. The camera  can be located anywhere in the ray tracing universe.  The default location  is <0,0,0>.  The look_at vector tells POV-Ray to pan and tilt the camera  until it is looking at the specified X, Y, Z coordinate.  By default the  camera looks at a point one unit in the +Z direction from the location.  
  3434. The look_at specification should almost always be the LAST item in the  camera statement.  If other camera items are placed after the look_at  vector then the camera may not continue to look at the specified point. 
  3435. 5.5.2 THE SKY VECTOR Y
  3436. Normally POV-Ray pans left or right by rotating about the Y axis until it  lines up with the look_at point and then tilts straight up or down until  the point is met exactly.  However you may want to slant the camera  sideways like an airplane making a banked turn.  You may change the tilt of  the camera using the "sky" vector.  For example: e
  3437.       camera {
  3438.         location <3,5,-10>
  3439.         sky      <1,1,0>
  3440.         look_at  <0,2,1>
  3441.       }
  3442. This tells POV-Ray to roll the camera until the top of the camera is in  line with the sky vector.  Imagine that the sky vector is an antenna  pointing out of the top of the camera.  Then it uses the "sky" vector as  the axis of rotation left or right and then to tilt up or down in line with  the "sky" vector.  In effect you're telling POV-Ray to assume that the sky  isn't straight up.  Note that the sky vector must appear before the look_at  vector.  The sky vector does nothing on its own.  It only modifies the way  the look_at vector turns the camera.  The default value for sky is <0,1,0>. 
  3443. 5.5.3 THE DIRECTION VECTOR 
  3444. The "direction" vector serves two purposes.  It tells POV-Ray the initial  direction to point the camera before moving it with look_at or rotate  vectors.  It also controls the field of view.   
  3445. Note that this is only the initial direction.  Normally, you will use the  look_at keyword, not the direction vector to point the camera in its actual  direction.  2
  3446. The length of the direction vector tells POV-Ray to use a telephoto or  wide-angle view.  It is the distance from the camera location to the  imaginary "view window" that you are looking through.  A short direction  vector gives a wide angle view while a long direction gives a narrow,  telephoto view.   %
  3447. This figure illustrates the effect: 7
  3448.                  |\                                            |\
  3449.                  | \                                           | \
  3450.                  |  \                                          |  \
  3451.                  |   \                                         |   \
  3452.   Location       |   |            Location                     |   |
  3453.       *------------> |                *--------------------------> |
  3454.         Direction|   |                                         |   |
  3455.                  |   |                                         |   |
  3456.                  |   |                                         |   |
  3457.                   \  |                                          \  |
  3458.                    \ |                                           \ |
  3459.                     \|                                            \|
  3460. Short direction gives wide view...        long direction narrows view. +
  3461. The default value is "direction <0,0,1>". 
  3462. Be careful with short direction vector lengths like 1.0 and less. You may  experience distortion on the edges of your images. Objects will appear to  be shaped strangely. If this happens, move the location back and make the  direction vector longer. 
  3463. Wide angle example: g
  3464.       camera {
  3465.         location  <3,5,-10>
  3466.         direction <0,0,1>
  3467.         look_at   <0,2,1>
  3468.       }
  3469. Zoomed in telephoto example: e
  3470.       camera {
  3471.         location <3,5,-10>
  3472.         direction <0,0,8>
  3473.         look_at  <0,2,1>
  3474.       }
  3475. 5.5.4 UP AND RIGHT VECTORS 
  3476. The "up" vector defines the height of the view window.  The "right" vector  defines the width of the view window.  This figure illustrates the  relationship of these vectors: A
  3477.       --------------------------
  3478.      |             ^            |
  3479.      |   up <0,1,0>|            |
  3480.      |             |            |
  3481.      |             |            |
  3482.      |             |            |
  3483.      |             |            |
  3484.      |             |            |
  3485.      |------------------------->|
  3486.      |   right<1.33,0,0>        |
  3487.      |             |            |
  3488.      |             |            |
  3489.      |             |            |
  3490.      |             |            |
  3491.      |             |            |
  3492.      |             |            |
  3493.       --------------------------
  3494.          5.5.4.1 Aspect
  3495. Ratio
  3496.          5.5.4.2 Handedness
  3497. 5.5.4.1     Aspect Ratio 
  3498. Together these vectors define the "aspect ratio" (height to width ratio) of  the resulting image.  The default values "up <0,1,0>" and "right  <1.33,0,0>" results in an aspect ratio of about 4 to 3.  This is the aspect  ratio of a typical computer monitor.  If you wanted a tall skinny image or  a short wide panoramic image or a perfectly square image then you should  adjust the up and right vectors to the appropriate proportions. 
  3499. Most computer video modes and graphics printers use perfectly square  pixels.  For example Macintosh displays and IBM S-VGA modes 640x480,  800x600 and 1024x768 all use square pixels.  When your intended viewing  method uses square pixels then the width and height you set with the +W and  +H switches should also have the same ratio as the right and up vectors.   Note that 640/480=4/3 so the ratio is proper for this square pixel mode. _
  3500. Not all display modes use square pixels however.  For example IBM VGA mode  320x200 and Amiga 320x400 modes do not use square pixels.  These two modes  still produce a 4/3 aspect ratio image.  Therefore images intended to be  viewed on such hardware should still use 4/3 ratio on their up & right  vectors but the +W and +H settings will not be 4/3. 
  3501. For example: }
  3502.       camera {
  3503.         location <3,5,-10>
  3504.         up       <0,1,0>
  3505.         right    <1,0,0>
  3506.         look_at  <0,2,1>
  3507.       }
  3508. This specifies a perfectly square image.  On a square pixel display like  SVGA you would use +W and +H settings such as +W480 +H480 or +W600 +H600.   However on the non-square pixel Amiga 320x400 mode you would want to use  values of +W240 +H400 to render a square image. 
  3509. 5.5.4.2     Handedness     
  3510. The "right" vector also describes the direction to the right of the camera.  It tells POV-Ray where the right side of your screen is.  The sign of the  right vector also determines the "handedness" of the coordinate system in  use. The default right statement is: 
  3511.       right <1.33, 0, 0>
  3512. This means that the +X direction is to the right.  It is called a "left- handed" system because you can use your left hand to keep track of the  axes.  Hold out your left hand with your palm facing to your right.  Stick  your thumb up.  Point straight ahead with your index finger. Point your  other fingers to the right.  Your bent fingers are pointing to the +X  direction.  Your thumb now points +Y.  Your index finger points +Z. 
  3513. To use a right-handed coordinate system, as is popular in some CAD programs  and other ray tracers, make the same shape using your right hand.  Your  thumb still points up in the +Y direction and your index finger still  points forward in the +Z direction but your other fingers now say the +X is  to the left.  That means that the "right" side of your screen is now in the  -X direction. To tell POV-Ray to compensate for this you should use a  negative X value in the "right" vector like this: 
  3514.       right <-1.33, 0, 0>
  3515. Some CAD systems, like AutoCAD, also have the assumption that the Z axis is  the "elevation" and is the "up" direction instead of the Y axis. If this is  the case you will want to change your "up" and "direction" as well.  Note  that the up, right, and direction vectors must always remain perpendicular  to each other or the image will be distorted. 
  3516. 5.5.5 TRANSFORMING THE CAMERA [
  3517. The "translate" and "rotate" commands can re-position the camera once  you've defined it. 
  3518. For example: 
  3519.       camera {
  3520.         location  < 0,  0,  0>
  3521.         direction < 0,  0,  1>
  3522.         up        < 0,  1,  0>
  3523.         right     < 1,  0,  0>
  3524.         rotate    <30, 60, 30>
  3525.         translate < 5,  3,  4>
  3526.       }                   
  3527. In this example, the camera is created, then rotated by 30 degrees about the X axis, 60 degrees about the Y axis, and 30 degrees about the Z axis,  then translated to another point in space. 
  3528. 5.5.6 CAMERA IDENTIFIERS w
  3529. You may declare several camera identifiers if you wish.  This makes it easy  to quickly change cameras.  For example: 
  3530.       #declare Long_Lens=
  3531.             camera {
  3532.               location -z*100
  3533.               direction z*50
  3534.             }
  3535.       #declare Short_Lens=
  3536.             camera {
  3537.               location -z*50
  3538.               direction z*10
  3539.             }
  3540.       camera {
  3541.         Long_Lens    //edit this line to change lenses
  3542.         look_at Here
  3543.       }
  3544. 5.6   MISC FEATURES ------------------- <
  3545. Here are a variety of other topics about POV-Ray features. 
  3546.          5.6.1   FOG
  3547.          5.6.2   MAX_TRACE_LEVEL
  3548.          5.6.3   MAX_INTERSECTIONS
  3549.          5.6.4   BACKGROUND
  3550.          5.6.5   THE
  3551. #VERSION
  3552. DIRECTIVE
  3553. 5.6.1 FOG 
  3554. POV-Ray includes the ability to render fog. To add fog to a scene, place  the following declaration outside of any object definitions: }
  3555.        fog {
  3556.          color Gray70      // the fog color
  3557.          distance 200.0    // distance for 100% fog color
  3558.        }
  3559. The fog color is then blended into the current pixel color at a rate  calculated as: }
  3560.           1-exp(-depth/distance) =
  3561.           1-exp(-200/200) =
  3562.           1-exp(-1) =
  3563.           1-.37... =
  3564.           0.63...
  3565. So at depth 0, the color is pure (1.0) with no fog (0.0). At the fog  distance, you'll get 63% of the color from the object's color and 37% from  the fog color.  
  3566. Subtle use of fog can add considerable realism and depth cuing to a scene  without adding appreciably to the overall rendering times.  Using a black  or very dark gray fog can be used to simulate attenuated lighting by  darkening distant objects. 
  3567. 5.6.2 MAX_TRACE_LEVEL 
  3568. The "#max_trace_level" directive sets a variable that defines how many  levels that POV-Ray will trace a ray. This is used when a ray is reflected  or is passing through a transparent object. When a ray hits a reflective  surface, it spawns another ray to see what that point reflects, that's  trace level 1. If it hits another reflective surface, then another ray is  spawned and it goes to trace level 2. The maximum level by default is 5.  
  3569. If max trace level is reached before a non-reflecting surface is found,  then the color is returned as black. Raise max_trace_level if you see black  in a reflective surface where there should be a color. 
  3570. The other symptom you could see is with transparent objects. For instance,  try making a union of concentric spheres with the Cloud_Sky texture on  them. Make ten of them in the union with radius's from 1-10 then render the  Scene. The image will show the first few spheres correctly, then black.  This is because a new level is used every time you pass through a  transparent surface.  Raise max_trace_level to fix this problem.  For  example: 
  3571.       #max_trace_level 20
  3572. Note: Raising max_trace_level will use more memory and time and it could  cause the program to crash with a stack overflow error. Values for  max_trace_level are not restricted, so it can be set to any number as long  as you have the time and memory.  
  3573. 5.6.3 MAX_INTERSECTIONS 
  3574. POV-Ray uses a set of internal stacks to collect ray/object intersection  points.  The usual maximum number of entries in these "I-Stacks" is 64.   Complex scenes may cause these stacks to overflow.  POV-Ray doesn't stop  but it may incorrectly render your scene.  When POV-Ray finishes rendering,  a number of statistics are displayed.  If you see "I-Stack Overflows"  reported in the statistics, you should increase the stack size.  Add a  directive to your scene as follows: 
  3575.       #max_intersections 200
  3576. If the "I-Stack Overflows" remain, increase this value until they stop. 
  3577. 5.6.4 BACKGROUND 
  3578. A background color can be specified if desired.  Any ray that doesn't hit  an object will be colored with this color.  The default background is  black.  The syntax for background is: $
  3579.       background { color SkyBlue }
  3580. Using a colored background takes up no extra time for the ray tracer,  making it a very economical, although limited, feature. Only solid colors  can be specified for a background. Textures cannot be used.  No shadows  will be cast on it, which makes it very useful, but at the same time, it  has no "roundness", or shading, and can sometimes cause a scene to look  "flat".  Use background with restraint.  It's often better, although a bit  slower, to use a "sky sphere", but there are times when a solid background  is just what you need. 
  3581. 5.6.5 THE #VERSION DIRECTIVE 
  3582. Although POV-Ray 2.0 has had significant changes to the language over POV- Ray 1.0, almost all 1.0 scenes will still work if the compatibility mode is  set to 1.0.  The +MV switch described earlier, sets the initial mode.  The  default is +MV2.0.   i
  3583. Inside a scene file you may turn compatibility off or on using the  "#version" directive.  For example: B
  3584.       #version 1.0
  3585.       // Put some version 1.0 statements here
  3586.       #version 2.0
  3587.       // Put some version 2.0 statements here
  3588. Note you may not change versions inside an object or declaration. 
  3589. The primary purpose of the switch is to turn off float and expression  parsing so that commas are not needed.  It also turns off some warning  messages. 
  3590. Note some changes in tiles and material_maps cannot be fixed by turning the  version compatibility on.  It may require hand editing of those statements.   See the special texture section for details. 
  3591. Future versions of POV-Ray may not continue to maintain full backward  compatibility.  We strongly encourage you to phase in 2.0 syntax as much as  possible. 
  3592. APPENDIX A  COMMON QUESTIONS AND ANSWERS ======================================== D
  3593. Q: I get a floating point error on certain pictures. What's wrong? )
  3594. A: The ray tracer performs many thousands of floating point operations when  tracing a scene. If checks were added to each one for overflow or  underflow, the program would be much slower. If you get this problem, first  look through your scene file to make sure you're not doing something like: -
  3595. - Scaling something by 0 in any dimension.  0
  3596.   Ex: scale <34, 2, 0> will generate a warning.
  3597. - Making the look_at point the same as the location in the camera - Looking straight down at the look_at point - Defining triangles with two points the same (or nearly the same) - Using a roughness value of zero (0). ^
  3598. If it doesn't seem to be one of these problems, please let us know. If you  do have such troubles, you can try to isolate the problem in the input  scene file by commenting out objects or groups of objects until you narrow  it down to a particular section that fails. Then try commenting out the  individual characteristics of the offending object. @
  3599. Q: Are planes 2D objects or are they 3D but infinitely thin?  |
  3600. A: Neither. Planes are 3D objects that divide the world into two half- spaces. The space in the direction of the surface normal is considered  outside and the other space is inside. In other words, planes are 3D  objects that are infinitely thick. For the plane, plane { y, 0 }, every  point with a positive Y value is outside and every point with a negative Y  value is inside. 
  3601.                             ^
  3602.                             |
  3603.                             |
  3604.                             |  Outside
  3605.                      _______|_______
  3606.                          Inside
  3607. Q: I'd like to go through the program and hand-optimize the assembly code  in places to make it faster. What should I optimize?  
  3608. A: Don't bother. With hand optimization, you'd spend a lot of time to get  perhaps a 5-10% speed improvement at the cost of total loss of portability.  If you use a better ray-surface intersection algorithm, you should be able  to get an order of magnitude or more improvement. Check out some books and  papers on ray tracing for useful techniques. Specifically, check out  "Spatial Subdivision" and "Ray Coherence" techniques. D
  3609. Q: Objects on the edges of the screen seem to be distorted. Why?  
  3610. A: If the direction vector of the camera is not very long, you may get  distortion at the edges of the screen. Try moving the location back and  raising the value of the direction vector.  M
  3611. Q: How do you position planar image maps without a lot of trial and error? 
  3612. A: By default, images will be mapped onto the range 0,0 to 1,1 in the  appropriate plane. You should be able to translate, rotate, and scale the  image from there. E
  3613. Q: How do you calculate the surface normals for smooth triangles?  
  3614. A:  There are two ways of getting another program to calculate them for  you. There are now several utilities to help with this. "
  3615. 1) Depending on the type of input to the program, you may be able to  calculate the surface normals directly. For example, if you have a program  that converts B-Spline or Bezier Spline surfaces into POV-Ray format files,  you can calculate the surface normals from the surface equations. >
  3616. 2) If your original data was a polygon or triangle mesh, then it's not  quite so simple. You have to first calculate the surface normals of all the  triangles. This is easy to do - you just use the vector cross-product of  two sides (make sure you get the vectors in the right order). Then, for  every vertex, you average the surface normals of the triangles that meet at  that vertex.  These are the normals you use for smooth triangles. Look for  the utilities such as RAW2POV.  RAW2POV has an excellent bounding scheme  and the ability to specify a smoothing threshold. u
  3617. Q: When I render parts of a picture on different systems, the textures  don't match when I put them together. Why? [
  3618. A: The appearance of a texture depends on the particular random number  generator used on your system. POV-Ray seeds the random number generator  with a fixed value when it starts, so the textures will be consistent from  one run to another or from one frame to another so long as you use the same  executables. Once you change executables, you will likely change the random  number generator and, hence, the appearance of the texture. There is an  example of a standard ANSI random number generator provided in IBM.C,  include it in your machine-specific code if you are having consistency  problems. 
  3619. Q: I created an object that passes through its bounding volume. At times, I  can see the parts of the object that are outside the bounding volume. Why  does this happen?  Z
  3620. A: Bounding volumes are not designed to change the shape of the object.  They are strictly a realtime improvement feature. The ray tracer trusts you  when you say that the object is enclosed by a bounding volume. The way it  uses bounding volumes is very simple: If the ray hits the bounding volume  (or the ray's origin is inside the bounding volume),when the object is  tested against that ray. Otherwise, we ignore the object. If the object  extends beyond the bounding volume, anything goes. The results are  undefined. It's quite possible that you could see the object outside the  bounding volume and it's also possible that it could be invisible. It all  depends on the geometry of the scene. If you want this effect use a  clipped_by volume instead of bounded_by or use clipped_by { bounded_by } if  you wish to clip and bound with the same object. 
  3621. APPENDIX B  TIPS AND HINTS ========================== 
  3622.      B.1 SCENE
  3623. DESIGN
  3624.      B.2 SCENE
  3625. DEBUGGING
  3626.      B.3 ANIMATION
  3627.      B.4 TEXTURES
  3628.      B.5 HEIGHT
  3629. FIELDS
  3630.      B.6 FIELD-OF-VIEW
  3631.      B.7 CONVERTING
  3632. "HANDEDNESS"
  3633. B.1   SCENE DESIGN ------------------ 
  3634. There are a number of excellent shareware CAD style modelers available on  the DOS platform now that will create POV-Ray scene files.  The online  systems mentioned elsewhere in this document are the best places to find  these. S
  3635. Hundreds of special-purpose utilities have been written for POV-Ray; data  conversion programs, object generators, shell-style "launchers", and more.  It would not be possible to list them all here, but again, the online  systems listed will carry most of them. Most, following the POV-Ray spirit,  are freeware or inexpensive shareware. 
  3636. Some extremely elaborate scenes have been designed by drafting on graph  paper.  Raytracer Mike Miller recommends graph paper with a grid divided in  tenths, allowing natural decimal conversions. K
  3637. Start out with a "boilerplate" scene file, such as a copy of BASICVUE.POV,  and edit that.  In general, place your objects near and around the "origin"  (0, 0, 0) with the camera in the negative z direction, looking at the  origin.  Naturally, you will break from this rule many times, but when  starting out, keep things simple. 
  3638. For basic, boring, but dependable lighting, place a light source at or near  the position of the camera.  Objects will look flat, but at least you will  see them.  From there, you can move it slowly into a better position. 
  3639. B.2   SCENE DEBUGGING TIPS -------------------------- 
  3640. To see a quick version of your picture, render it very small. With fewer  pixels to calculate the ray tracer can finish more quickly. -w160 -h100 is  a good size. /
  3641. Use the +Q "quality" switch when appropriate. 
  3642. If there is a particular area of your picture that you need to see in high  resolution, perhaps with anti-aliasing on (perhaps a fine-grained wood  texture), use the +SC, +EC. +SR, and +ER switches to isolate a "window". 
  3643. If your image contains a lot of inter-reflections, set max_trace_level to a  low value such as 1 or 2.  Don't forget to put it back up when you're  finished! 
  3644. "Turn off" any unnecessary lights.  Comment out extended light and  spotlight keywords when not needed for debugging.  Again, don't forget to  put them back in before you retire for the night with a final render  running! 
  3645. If you've run into an error that is eluding you by visual examination, it's  time to start bracketing your file.  Use the block comment characters (  /* ... */ ) to disable most of your scene and try to render again.  If you  no longer get an error, the problem naturally lies somewhere within the  disabled area.  Slow and methodical testing like this will eventually get  you to a point where you will either be able to spot the bug, or go quietly  insane.  Maybe both. 
  3646. If you seem to have "lost" yourself or an object (a common experience for  beginners) there are a few tricks that can sometimes help: 
  3647.      1) Move your camera way back to provide a long range view.
  3648.      This may not help with very small objects which tend to
  3649.      be less visible at a distance, but it's a nice trick to keep
  3650.      up your sleeve.
  3651.      2) Try setting the ambient value to 1.0 if you suspect that
  3652.      the object may simply be hidden from the lights.  This will
  3653.      make it self-illuminated and you'll be able to see it even
  3654.      with no lights in the scene.
  3655.      3) Replace the object with a larger, more obvious "stand-in"
  3656.      object like a large sphere or box.  Be sure that all the
  3657.      same transformations are applied to this new shape so that
  3658.      it ends up in the same spot.
  3659. B.3   ANIMATION --------------- 
  3660. When animating objects with solid textures, the textures must move with the  object, i.e. apply the same rotate or translate functions to the texture as  to the object itself. This is now done automatically if the transformations  are placed _after_ the texture block. 
  3661. Example: H
  3662.       shape { ...
  3663.         pigment { ... }
  3664.         scale < ... >
  3665.       }
  3666. Will scale the shape and pigment texture by the same amount. 
  3667. While: H
  3668.       shape { ...
  3669.         scale < ... >
  3670.         pigment { ... }
  3671.       }
  3672. Will scale the shape, but not the pigment. 
  3673. Constants can be declared for most of the data types in the program  including floats and vectors. By writing these to #include files, you can  easily separate the parameters for an animation into a separate file. /
  3674. Some examples of declared constants would be: 
  3675.    #declare Y_Rotation = 5.0 * clock
  3676.    #declare ObjectRotation = <0, Y_Rotation, 0>
  3677.    #declare MySphere = sphere { <0, 0, 0>, 1.1234 }
  3678. Other examples can be found scattered throughout the sample scene files. 
  3679. DOS users: Get ahold of DTA.EXE (Dave's Targa Animator) for  creating .FLI/.FLC animations.  AAPLAY.EXE and PLAY.EXE are common viewers  for this type of file. 
  3680. When moving the camera in an animation (or placing one in a still image,  for that matter) avoid placing the camera directly over the origin.  This  will cause very strange errors.  Instead, move off center slightly and  avoid hovering directly over the scene. 
  3681. B.4   TEXTURES --------------     
  3682. Wood is designed like a "log", with growth rings aligned along the z axis.   Generally these will look best when scaled down by about a tenth (to a  unit-sized object). Start out with rather small value for the turbulence,  too (around 0.05 is good for starters). 
  3683. The marble texture is designed around a pigment primitive that is much like  an x-gradient.  When turbulated, the effect is different when viewed from  the "side" or from the "end".  Try rotating it by 90 degrees on the y axis  to see the difference. {
  3684. You cannot get specular highlights on a totally black object. Try using a  very dark gray, say Gray10 or Gray15, instead. 
  3685. B.5   HEIGHT FIELDS ------------------- >
  3686. Try using POV-Ray itself to create images for height_fields: 
  3687.       camera { location <0, 0, -2> }
  3688.       plane { z, 0
  3689.          finish { ambient 1 }    // needs no light sources
  3690.          pigment { bozo }        // or whatever.  Experiment.
  3691.       }
  3692. That's all you'll need to create a .tga file that can then be used as a  height field in another image! 
  3693. B.6   FIELD-OF-VIEW ------------------- D
  3694. By making the direction vector in the camera longer, you can achieve the  effect of a tele-photo lens. Shorter direction vectors will give a kind of  wide-angle affect, but you may see distortion at the edges of the image.   See the file "fov.inc" in the \POVRAY\INCLUDE directory for some predefined field-of-view values. 
  3695. If your spheres and circles aren't round, try increasing the direction  vector slightly.  Often a value of 1.5 works better than the 1.0 default  when spheres appear near the edge of the screen. 
  3696. B.7   CONVERTING "HANDEDNESS" ----------------------------- 
  3697. If you are importing images from other systems, you may find that the  shapes are backwards (left-to-right inverted) and no rotation can make them  correct. g
  3698. Often, all you have to do is negate the terms in the right vector of the  camera to flip the camera left-to-right (use the "right-hand" coordinate  system).  Some programs seem to interpret the coordinate systems  differently, however, so you may need to experiment with other camera  transformations if you want the y and z vectors to work as POV-Ray does. 
  3699. APPENDIX C  SUGGESTED READING ============================= L
  3700. First, a shameless plug for two books that are specifically about POV-Ray: 
  3701.      The Waite Group's Ray Tracing Creations
  3702.      By Drew Wells & Chris Young
  3703.      ISBN 1-878739-27-1
  3704.      Waite Group Press
  3705.      1993
  3706. and m
  3707.      The Waite Group's Image Lab
  3708.      By Tim Wegner
  3709.      ISBN 1-878739-11-5
  3710.      Waite Group Press
  3711.      1992
  3712. Image Lab by Tim Wegner contains a chapter about POV-Ray. Tim is the co- author of the best selling book, Fractal Creations, also from the Waite  Group.  i
  3713. Ray Tracing Creations by Drew Wells and Chris Young is an entire book about  ray tracing with POV-Ray.  
  3714. This section lists several good books or periodicals that you should be  able to locate in your local computer book store or your local university  library.  y
  3715.     "An Introduction to Ray tracing"
  3716.     Andrew S. Glassner (editor)
  3717.     ISBN 0-12-286160-4
  3718.     Academic Press
  3719.     1989
  3720.     "3D Artist" Newsletter
  3721.     ("The Only Newsletter about Affordable 
  3722.       PC 3D Tools and Techniques")
  3723.     Publisher: Bill Allen
  3724.     P.O. Box 4787
  3725.     Santa Fe, NM 87502-4787
  3726.     (505) 982-3532
  3727.     "Image Synthesis:  Theory and Practice"
  3728.     Nadia Magnenat-Thalman and Daniel Thalmann
  3729.     Springer-Verlag
  3730.     1987
  3731.     "The RenderMan Companion"
  3732.     Steve Upstill
  3733.     Addison Wesley
  3734.     1989
  3735.     "Graphics Gems"
  3736.     Andrew S. Glassner (editor)
  3737.     Academic Press
  3738.     1990
  3739.     "Fundamentals of Interactive Computer Graphics"
  3740.     J. D. Foley and A. Van Dam
  3741.     ISBN 0-201-14468-9
  3742.     Addison-Wesley
  3743.     1983
  3744.     "Computer Graphics:  Principles and Practice (2nd Ed.)" 
  3745.     J. D. Foley, A. van Dam, J. F. Hughes
  3746.     ISBN 0-201-12110-7
  3747.     Addison-Wesley,
  3748.     1990
  3749.     "Computers, Pattern, Chaos, and Beauty"
  3750.     Clifford Pickover
  3751.     St. Martin's Press
  3752.     "SIGGRAPH Conference Proceedings"
  3753.     Association for Computing Machinery
  3754.     Special Interest Group on Computer Graphics
  3755.     "IEEE Computer Graphics and Applications"
  3756.     The Computer Society
  3757.     10662, Los Vaqueros Circle
  3758.     Los Alamitos, CA 90720
  3759.     "The CRC Handbook of Mathematical Curves and Surfaces"
  3760.     David von Seggern
  3761.     CRC Press
  3762.     1990
  3763.     "The CRC Handbook of Standard Mathematical Tables"
  3764.     CRC Press
  3765.     The Beginning of Time
  3766. APPENDIX D  LEGAL INFORMATION ============================= 
  3767. The following is legal information pertaining to the use of the Persistence  of Vision Ray Tracer a.k.a POV-Ray. It applies to all POV-Ray source files,   executable (binary) files, scene files, documentation files contained in  the official POV archives.  (Certain portions refer to custom versions of  the software,  there are specific rules listed below for these versions  also.)  All of these are referred to here as "the software".  
  3768. THIS NOTICE MUST ACCOMPANY ALL OFFICIAL OR CUSTOM PERSISTENCE OF VISION  FILES. IT MAY NOT BE REMOVED OR MODIFIED. THIS INFORMATION PERTAINS TO ALL  USE OF THE PACKAGE WORLDWIDE.  THIS DOCUMENT SUPERSEDES ALL PREVIOUS  LICENSES OR DISTRIBUTION POLICIES. 6
  3769.                         IMPORTANT LEGAL INFORMATION
  3770. Permission is granted to the user to use the Persistence of Vision  Raytracer and all associated files in this package to create and render  images. The use of this software for the purpose of creating images is  free. The creator of a scene file and the image created from the scene  file, retains all rights to the image and scene file they created and may  use them for any purpose commercial or non-commercial.   b
  3771. The user is also granted the right to use the scenes files and include  files distributed in the INCLUDE and DEMO sub-directories of the POVDOC  archive when creating their own scenes.  Such permission does not extend to  files in the POVSCN archive.  POVSCN files are for your enjoyment and  education but may not be the basis of any derivative works. 
  3772. This software package and all of the files in this archive are copyrighted  and may only be distributed and/or modified according to the guidelines  listed below.  The spirit of the guidelines below is to promote POV-Ray as  a standard ray tracer, provide the full POV-Ray package freely to as many  users as possible, prevent POV-Ray users and developers from being taken  advantage of, enhance the life quality of those who come in contact with  POV-Ray.  This legal document was created so these goals could be realized.   You are legally bound to follow these rules, but we hope you will follow  them as a matter of ethics, rather than fear of litigation. 
  3773. No portion of this package may be separated from the package and  distributed separately other than under the conditions specified in the  guidelines below.   y
  3774. This software may be bundled in other software packages according to the  conditions specified in the guidelines below. H
  3775. This software may be included in software-only compilations using media  such as, but not limited to, floppy disk, CD-ROM, tape backup, optical  disks, hard disks, or memory cards.  There are specific rules and  guidelines listed below for the provider to follow in order to legally  offer POV-Ray with a software compilation. 
  3776. The user is granted the privilege to modify and compile the source for  their own personal use in any fashion they see fit.  What you do with the  software in your own home is your business. 
  3777. If the user wishes to distribute a modified version of the software (here  after referred to as a "custom version") they must follow the guidelines  listed below.  These guidelines have been established to promote the growth  of POV-Ray and prevent difficulties for users and developers alike.  Please  follow them carefully for the benefit of all concerned when creating a  custom version.   
  3778. You may not incorporate any portion of the POV-Ray source code in any  software other than a custom version of POV-Ray.  However authors who  contribute source to POV-Ray may still retain all rights to use their  contributed code for any purpose as described below. {
  3779. The user is encouraged to send enhancements and bug fixes to the POV-Team,  but the team is in no way required to utilize these enhancements or fixes.   By sending material to the POV-Team, the contributor asserts that he owns  the materials or has the right to distribute these materials.  He  authorizes the POV-Team to use the materials any way they like.  The  contributor still retains rights to the donated material, but by donating  you grant equal rights to the POV-Team.  The POV-Team doesn't have to use  the material, but if we do, you do not acquire any rights related to POV- Ray.  We will give you credit if applicable. 9
  3780.                     GENERAL RULES FOR ALL DISTRIBUTION
  3781. The permission to distribute this package under certain very specific  conditions is granted in advance, provided that the above and following  conditions are met. j
  3782. These archives must not be re-archived using a different method without the  explicit permission of the POV-Team.  You may rename the archives only to  meet the file name conventions of your system or to avoid file name  duplications but we ask that you try to keep file names as similar to the  originals as possible.  (For example:POVDOC.ZIP to POVDOC20.ZIP) S
  3783. You must distribute a full package of archives as described in the next  section. J
  3784. Non-commercial distribution (such as a user copying the software for a  personal friend or colleague and not charging money or services for that  copy) has no other restrictions.  This does not include non-profit  organizations or computer clubs. These groups should use the  Shareware/Freeware distribution company rules below. 
  3785. The POV-Team reserves the right to withdraw distribution privileges from  any group, individual, or organization for any reason. 6
  3786.                        DEFINITION OF "FULL PACKAGE"
  3787. POV-Ray is contained in 4 archives for each hardware platform.  1) An  executable archive, 2) A documentation archive, 3) Sample scene archives,  4) Source code archive. E
  3788. A "full package" is defined as one of the following bundle options: 
  3789.    1  All archives (executable, docs, scenes, source)
  3790.    2  User archives (executable, docs, scenes but no source)
  3791.    3  Programmer archives (source, docs, scenes but no executable)
  3792. POV-Ray is officially distributed for IBM-PC compatibles running MS-Dos;  Apple Macintosh; and Commodore Amiga.  Other systems may be added in the  future. 
  3793. Distributors need not support all platforms but for each platform you  support you must distribute a full package.  For example an IBM-only BBS  need not distribute the Mac versions. ?
  3794.               CONDITIONS FOR DISTRIBUTION OF CUSTOM VERSIONS
  3795. You may distribute custom compiled versions only if you comply with the  following conditions. L
  3796.      Mark your version clearly on all modified files stating this to be a 
  3797. modified and unofficial version. D
  3798.      Make all of your modifications to POV-Ray freely and publicly 
  3799. available. M
  3800.      You must provide all POV-Ray support for all users who use your custom 
  3801. version.  The POV-Ray Team is not obligated to provide you or your users  any technical support. L
  3802.      You must provide documentation for any and all modifications that you 
  3803. have made to the program that you are distributing. J
  3804.      Include clear and obvious information on how to obtain the official 
  3805. POV-Ray. I
  3806.      Include contact and support information for your version.  Include 
  3807. this information in the DISTRIBUTION_MESSAGE macros in the source file  FRAME.H and insure that the program prominently displays this information.   Include all credits and credit screens for the official version. &
  3808.      Include a copy of this document.
  3809.                     CONDITIONS FOR COMMERCIAL BUNDLING
  3810. Vendors wishing to bundle POV-Ray with commercial software or with  publications must first obtain explicit permission from the POV-Ray Team.   This includes any commercial software or publications, such as, but not  limited to, magazines, books, newspapers, or newsletters in print or  machine readable form. 
  3811. The POV-Ray Team will decide if such distribution will be allowed on a  case-by-case basis and may impose certain restrictions as it sees fit.  The  minimum terms are given below. Other conditions may be imposed. J
  3812.      Purchasers of your product must not be led to believe that they are
  3813. paying for POV-Ray.  Any mention of the POV-Ray bundle on the box, in advertising or in instruction manuals must be clearly marked with a disclaimer that POV-Ray is free software and can be obtained for free or nominal cost from various sources. I
  3814.      Include clear and obvious information on how to obtain the official
  3815. POV-Ray. p
  3816.      Include a copy of this document.
  3817.      You must provide all POV-Ray support for all users who acquired POV-
  3818. Ray through your product.  The POV-Ray Team is not obligated to provide you or your customers any technical support. 
  3819.      Include a credit page or pages in your documentation for POV-Ray.
  3820.      If you modify any portion POV-Ray for use with your hardware or
  3821. software, you must follow the custom version rules in addition to these rules. v
  3822.      Include contact and support information for your product.
  3823.      Must include official documentation with product.
  3824.          CONDITIONS FOR SHAREWARE/FREEWARE DISTRIBUTION COMPANIES
  3825. Shareware and freeware distribution companies may distribute the archives  under the conditions following this section.  
  3826. You must notify us that you are distributing POV-Ray and must provide us  with information on how to contact you should any support issues arise.  
  3827. No more than five dollars U.S. ($5) can be charged per disk for the copying  of this software and the media it is provided on. Space on each disk must  used completely.  The company may not put each archive on a separate disk  and charge for three disks if all three archives will fit on one disk. If  more than one disk is needed to store the archives then more than one disk  may be used and charged for. 
  3828. Distribution on high volume media such as backup tape or CD-ROM is  permitted if the total cost to the user is no more than $0.10 per megabyte  of data.  For example a CD-ROM with 600 meg could cost no more than $60.00. =
  3829.                  CONDITIONS FOR ON-LINE SERVICES AND BBS'S
  3830. On-line services and BBS's may distribute the POV-Ray archives under the  conditions following this section.  z
  3831. The archives must be all be easily available on the service and should be  grouped together in a similar on-line area.   
  3832. It is strongly requested that BBS operators remove prior versions of POV- Ray to avoid user confusion and simplify or minimize our support efforts. 
  3833. The on-line service or BBS may only charge standard usage rates for the  downloading of this software. A premium may not be charged for this  package. I.E. CompuServe or America On-Line may make these archives  available to their users, but they may only charge regular usage rates for  the time required to download. They must also make the all of the archives  available in the same forum, so they can be easily located by a user. ,
  3834.                                 DISCLAIMER
  3835. This software is provided as is without any guarantees or warranty.   Although the authors have attempted to find and correct any bugs in the  package, they are not responsible for any damage or losses of any kind  caused by the use or misuse of the package. The authors are under no  obligation to provide service, corrections, or upgrades to this package. 
  3836. APPENDIX E  CONTACTING THE AUTHORS ================================== 
  3837. We love to hear about how you're using and enjoying the program. We also  will do our best try to solve any problems you have with POV-Ray and  incorporate good suggestions into the program. 
  3838. If you have a question regarding commercial use of, distribution of, or  anything particularly sticky, please contact Chris Young, the development  team coordinator. Otherwise, spread the mail around. We all love to hear  from you! 
  3839. The best method of contact is e-mail through CompuServe for most of us.  America On-Line and Internet can now send mail to CompuServe, also, just  use the Internet address and the mail will be sent through to CompuServe  where we read our mail daily.  
  3840. Please do not send large files to us through the e-mail without asking  first. We pay for each minute on CompuServe and large files can get  expensive. Send a query before you send the file, thanks! 
  3841.  Chris Young
  3842.  (Team Coordinator. Worked on everything.)
  3843.  CIS: 76702,1655
  3844.  Internet 76702.1655@compuserve.com
  3845.  US Mail:
  3846.   3119 Cossell Drive
  3847.   Indianapolis, IN 46224 U.S.A.
  3848.  Drew Wells 
  3849.  (Former team leader. Worked on everything.)
  3850.  CIS: 73767,1244
  3851.  Internet: 73767.1244@compuserve.com
  3852.  AOL: Drew Wells
  3853.  Prodigy: SXNX74A (Not used often)
  3854.  Other authors and contributors in alphabetical order:
  3855.  -----------------------------------------------------
  3856.  David Buck
  3857.  (Original author of DKBTrace)
  3858.  (Primary developer, quadrics, docs)
  3859.  INTERNET:(preferred) dbuck@ccs.carleton.ca
  3860.  CIS: 70521,1371
  3861.  Aaron Collins
  3862.  (Co-author of DKBTrace 2.12)
  3863.  (Primary developer, IBM-PC display code,phong) 
  3864.  CIS: 70324,3200
  3865.  Alexander Enzmann
  3866.  (Primary developer, Blobs, quartics, boxes, spotlights) 
  3867.  CIS: 70323,2461
  3868.  INTERNET: xander@mitre.com
  3869.  Dan Farmer
  3870.  (Primary developer, docs, scene files)
  3871.  CIS:70703,1632
  3872.  Douglas Muir
  3873.  (Bump maps and height fields)
  3874.  CIS: 76207,662
  3875.  Internet:dmuir@media-lab.media.mit.edu
  3876.  Bill Pulver
  3877.  (Time code and IBM-PC compile)
  3878.  CIS: 70405,1152
  3879.  Charles Marslette
  3880.  (IBM-PC display code)
  3881.  CIS: 75300,1636
  3882.  Mike Miller
  3883.  (Artist, scene files, stones.inc)
  3884.  CIS: 70353,100
  3885.  Jim Nitchals
  3886.  (Mac version, scene files)
  3887.  CIS: 73117,3020
  3888.  AppleLink: jimn8
  3889.  Internet: 73117.3020@compuserve.com
  3890.  Eduard Schwan
  3891.  (Mac version, docs)
  3892.  CIS: 71513,2161
  3893.  AppleLink: JL.Tech
  3894.  Internet: 71513.2161@compuserve.com
  3895.  Randy Antler
  3896.  (IBM-PC display code enhancements)
  3897.  CIS: 71511,1015
  3898.  David Harr
  3899.  (Mac balloon help)
  3900.  CIS: 72117,1704
  3901.  Scott Taylor
  3902.  (Leopard and Onion textures)
  3903.  CIS: 72401,410
  3904.  Chris Cason
  3905.  (colour X-Windows display code)
  3906.  CIS: 100032,1644
  3907.  Dave Park 
  3908.  (Amiga support; added AGA video code)
  3909.  CIS: 70004,1764
  3910.