1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448
|
<!-- This file copyright Persistence of Vision Raytracer Pty. Ltd. 2003-2004 -->
<html>
<head>
<!-- NOTE: In order to users to help find information about POV-Ray using -->
<!-- web search engines, we ask you to *not* let them index documentation -->
<!-- mirrors because effectively, when searching, users will get hundreds -->
<!-- of results containing the same information! For this reason, the two -->
<!-- meta tags below disable archiving and indexing of this page by all -->
<!-- search engines that support these meta tags. -->
<meta content="noarchive" name="robots">
<meta content="noindex" name="robots">
<meta content="no-cache" http-equiv="Pragma">
<meta content="0" http-equiv="expires">
<title>3.2 Scene Description Language</title>
<link href="povray35.css" rel="stylesheet" type="text/css">
</head>
<body>
<table class="NavBar" width="100%">
<tr>
<td align="left" nowrap="" valign="middle" width="32">
<a href="s_95.html"><img alt="previous" border="0" src="prev.png"></a>
</td>
<td align="left" valign="middle" width="30%">
<a href="s_95.html">3.1.2 Command-line Options</a>
</td>
<td align="center" valign="middle">
<strong class="NavBar">POV-Ray 3.6 for UNIX documentation</strong><br> <strong>3.2
Scene Description Language</strong>
</td>
<td align="right" valign="middle" width="30%">
<a href="s_97.html">3.2.1 Language Basics</a>
</td>
<td align="right" nowrap="" valign="middle" width="32">
<a href="s_97.html"><img alt="next" border="0" src="next.png"></a>
</td>
</tr>
</table>
<h2><a name="s03_02">3.2 </a>Scene Description Language</h2>
<a name="s03_02_i1"><a name="s03_02_i2">
<p>
The reference section describes the POV-Ray <em>scene description language</em>. It is supposed to be used as a
reference for looking up things. It does not contain detailed explanations on how scenes are written or how POV-Ray is
used. It just explains all features, their syntax, applications, limits, drawbacks, etc.
</p>
<p>
The scene description language allows you to describe the world in a readable and convenient way. Files are created
in plain ASCII text using an editor of your choice. The input file name is specified using the <code> Input_File_Name</code>=<em>file</em>
option or <code>+I</code><em>file</em> switch. By default the files have the extension <code>.pov</code>. POV-Ray
reads the file, processes it by creating an internal model of the scene and then renders the scene.
</p>
<p>
The overall syntax of a scene is shown below. See "<a href="#l52">Notation and Basic Assumptions</a>" for
more information on syntax notation.
</p>
<pre>
SCENE:
SCENE_ITEM...
SCENE_ITEM:
LANGUAGE_DIRECTIVES |
camera { CAMERA_ITEMS... } |
OBJECTS |
ATMOSPHERIC_EFFECTS |
global_settings { GLOBAL_ITEMS }
</pre>
<p>
In plain English, this means that a scene contains one or more scene items and that a scene item may be any of the
five items listed below it. The items may appear in any order. None is a required item. In addition to the syntax
depicted above, a <em>LANGUAGE_DIRECTIVE</em> may also appear anywhere embedded in other statements between any two
tokens. There are some restrictions on nesting directives also.
</p>
<p>
For details on those five items see section "<a href="#l53">Language Directives</a>", section "<a href="#l54">Object</a>s",
section "<a href="#l55">Camera</a>", section "<a href="#l56">Atmospheric Effects</a>" and section
"<a href="#l57">Global Settings</a>" for details.
</p>
<p><strong>
Section Contents
</strong>
<ul>
<li>
<a href="s_97.html#s03_02_01">3.2.1 Language Basics</a>
<ul>
<li>
<a href="s_97.html#s03_02_01_01">3.2.1.1 Identifiers and Keywords</a>
<li>
<a href="s_97.html#s03_02_01_02">3.2.1.2 Comments</a>
<li>
<a href="s_97.html#s03_02_01_03">3.2.1.3 Float Expressions</a>
<ul>
<li>
<a href="s_97.html#s03_02_01_03_01">3.2.1.3.1 Literals</a>
<li>
<a href="s_97.html#s03_02_01_03_02">3.2.1.3.2 Identifiers</a>
<li>
<a href="s_97.html#s03_02_01_03_03">3.2.1.3.3 Operators</a>
<li>
<a href="s_97.html#s03_02_01_03_04">3.2.1.3.4 Functions</a>
<li>
<a href="s_97.html#s03_02_01_03_05">3.2.1.3.5 Built-in Constants</a>
<li>
<a href="s_97.html#s03_02_01_03_06">3.2.1.3.6 Built-in Variables</a>
</ul>
<li>
<a href="s_97.html#s03_02_01_04">3.2.1.4 Vector Expressions</a>
<ul>
<li>
<a href="s_97.html#s03_02_01_04_01">3.2.1.4.1 Literals</a>
<li>
<a href="s_97.html#s03_02_01_04_02">3.2.1.4.2 Identifiers</a>
<li>
<a href="s_97.html#s03_02_01_04_03">3.2.1.4.3 Operators</a>
<li>
<a href="s_97.html#s03_02_01_04_04">3.2.1.4.4 Operator Promotion</a>
<li>
<a href="s_97.html#s03_02_01_04_05">3.2.1.4.5 Functions</a>
<li>
<a href="s_97.html#s03_02_01_04_06">3.2.1.4.6 Built-in Constants</a>
</ul>
<li>
<a href="s_97.html#s03_02_01_05">3.2.1.5 Specifying Colors</a>
<ul>
<li>
<a href="s_97.html#s03_02_01_05_01">3.2.1.5.1 Color Vectors</a>
<li>
<a href="s_97.html#s03_02_01_05_02">3.2.1.5.2 Color Keywords</a>
<li>
<a href="s_97.html#s03_02_01_05_03">3.2.1.5.3 Color Identifiers</a>
<li>
<a href="s_97.html#s03_02_01_05_04">3.2.1.5.4 Color Operators</a>
<li>
<a href="s_97.html#s03_02_01_05_05">3.2.1.5.5 Common Color Pitfalls</a>
</ul>
<li>
<a href="s_97.html#s03_02_01_06">3.2.1.6 User-Defined Functions</a>
<ul>
<li>
<a href="s_97.html#s03_02_01_06_01">3.2.1.6.1 Sum and Product functions</a>
<li>
<a href="s_97.html#s03_02_01_06_02">3.2.1.6.2 Functions and Macros</a>
<li>
<a href="s_97.html#s03_02_01_06_03">3.2.1.6.3 Declaring User-Defined Float Functions</a>
<li>
<a href="s_97.html#s03_02_01_06_04">3.2.1.6.4 Declaring User-Defined Vector Functions</a>
<li>
<a href="s_97.html#s03_02_01_06_05">3.2.1.6.5 Declaring User-Defined Color Functions</a>
<li>
<a href="s_97.html#s03_02_01_06_06">3.2.1.6.6 Internal Pre-Defined Functions</a>
</ul>
<li>
<a href="s_97.html#s03_02_01_07">3.2.1.7 Strings</a>
<ul>
<li>
<a href="s_97.html#s03_02_01_07_01">3.2.1.7.1 String Literals</a>
<li>
<a href="s_97.html#s03_02_01_07_02">3.2.1.7.2 String Identifiers</a>
<li>
<a href="s_97.html#s03_02_01_07_03">3.2.1.7.3 String Functions</a>
</ul>
<li>
<a href="s_97.html#s03_02_01_08">3.2.1.8 Array Identifiers</a>
<ul>
<li>
<a href="s_97.html#s03_02_01_08_01">3.2.1.8.1 Declaring Arrays</a>
<li>
<a href="s_97.html#s03_02_01_08_02">3.2.1.8.2 Array Initializers</a>
</ul>
<li>
<a href="s_97.html#s03_02_01_09">3.2.1.9 Spline Identifiers</a>
<ul>
<li>
<a href="s_97.html#s03_02_01_09_01">3.2.1.9.1 Splines and Macros</a>
</ul>
</ul>
<li>
<a href="s_98.html#s03_02_02">3.2.2 Language Directives</a>
<ul>
<li>
<a href="s_98.html#s03_02_02_01">3.2.2.1 Include Files and the #include Directive</a>
<li>
<a href="s_98.html#s03_02_02_02">3.2.2.2 The #declare and #local Directives</a>
<ul>
<li>
<a href="s_98.html#s03_02_02_02_01">3.2.2.2.1 Declaring identifiers</a>
<li>
<a href="s_98.html#s03_02_02_02_02">3.2.2.2.2 #declare vs. #local</a>
<li>
<a href="s_98.html#s03_02_02_02_03">3.2.2.2.3 Identifier Name Collisions</a>
<li>
<a href="s_98.html#s03_02_02_02_04">3.2.2.2.4 Destroying Identifiers with #undef</a>
</ul>
<li>
<a href="s_98.html#s03_02_02_03">3.2.2.3 File I/O Directives</a>
<ul>
<li>
<a href="s_98.html#s03_02_02_03_01">3.2.2.3.1 The #fopen Directive</a>
<li>
<a href="s_98.html#s03_02_02_03_02">3.2.2.3.2 The #fclose Directive</a>
<li>
<a href="s_98.html#s03_02_02_03_03">3.2.2.3.3 The #read Directive</a>
<li>
<a href="s_98.html#s03_02_02_03_04">3.2.2.3.4 The #write Directive</a>
</ul>
<li>
<a href="s_98.html#s03_02_02_04">3.2.2.4 The #default Directive</a>
<li>
<a href="s_98.html#s03_02_02_05">3.2.2.5 The #version Directive</a>
<li>
<a href="s_98.html#s03_02_02_06">3.2.2.6 Conditional Directives</a>
<ul>
<li>
<a href="s_98.html#s03_02_02_06_01">3.2.2.6.1 The #if...#else...#end Directives</a>
<li>
<a href="s_98.html#s03_02_02_06_02">3.2.2.6.2 The #ifdef and #ifndef Directives</a>
<li>
<a href="s_98.html#s03_02_02_06_03">3.2.2.6.3 The #switch, #case, #range and #break Directives</a>
<li>
<a href="s_98.html#s03_02_02_06_04">3.2.2.6.4 The #while...#end Directive</a>
</ul>
<li>
<a href="s_98.html#s03_02_02_07">3.2.2.7 User Message Directives</a>
<ul>
<li>
<a href="s_98.html#s03_02_02_07_01">3.2.2.7.1 Text Message Streams</a>
<li>
<a href="s_98.html#s03_02_02_07_02">3.2.2.7.2 Text Formatting</a>
</ul>
<li>
<a href="s_98.html#s03_02_02_08">3.2.2.8 User Defined Macros</a>
<ul>
<li>
<a href="s_98.html#s03_02_02_08_01">3.2.2.8.1 The #macro Directive</a>
<li>
<a href="s_98.html#s03_02_02_08_02">3.2.2.8.2 Invoking Macros</a>
<li>
<a href="s_98.html#s03_02_02_08_03">3.2.2.8.3 Are POV-Ray Macros a Function or a Macro?</a>
<li>
<a href="s_98.html#s03_02_02_08_04">3.2.2.8.4 Returning a Value Like a Function</a>
<li>
<a href="s_98.html#s03_02_02_08_05">3.2.2.8.5 Returning Values Via Parameters</a>
</ul>
</ul>
</ul>
<p>
<a name="l52">
<small><strong>More about "Notation and Basic Assumptions"</strong></small>
</a>
<ul>
<li><small>
<a href="s_55.html#s02_01_07">2.1.7 Notation and Basic Assumptions</a> in 2.1 Introduction
</small>
<li><small>
<a href="s_94.html#s03_01_01">3.1.1 Notation and Basic Assumptions</a> in 3.1 Introduction
</small>
</ul>
</p>
<p>
<a name="l53">
<small><strong>More about "Language Directives"</strong></small>
</a>
<ul>
<li><small>
<a href="s_156.html#s03_08_04">3.8.4 Language Directives</a> in 3.8 Quick Reference
</small>
<li><small>
<a href="s_98.html#s03_02_02">3.2.2 Language Directives</a> in 3.2 Scene Description Language
</small>
</ul>
</p>
<p>
<a name="l54">
<small><strong>More about "Object"</strong></small>
</a>
<ul>
<li><small>
<a href="s_104.html#s03_04">3.4 Objects</a> in 3 POV-Ray Reference
</small>
<li><small>
<a href="s_125.html#s03_05_11_23">3.5.11.23 Object Pattern</a> in 3.5.11 Patterns
</small>
<li><small>
<a href="s_160.html#s03_08_08">3.8.8 Objects</a> in 3.8 Quick Reference
</small>
</ul>
</p>
<p>
<a name="l55">
<small><strong>More about "Camera"</strong></small>
</a>
<ul>
<li><small>
<a href="s_100.html#s03_03_01">3.3.1 Camera</a> in 3.3 Scene Settings
</small>
<li><small>
<a href="s_158.html#s03_08_06">3.8.6 Camera</a> in 3.8 Quick Reference
</small>
</ul>
</p>
<p>
<a name="l56">
<small><strong>More about "Atmospheric Effects"</strong></small>
</a>
<ul>
<li><small>
<a href="s_101.html#s03_03_02">3.3.2 Atmospheric Effects</a> in 3.3 Scene Settings
</small>
<li><small>
<a href="s_164.html#s03_08_12">3.8.12 Atmospheric Effects</a> in 3.8 Quick Reference
</small>
</ul>
</p>
<p>
<a name="l57">
<small><strong>More about "Global Settings"</strong></small>
</a>
<ul>
<li><small>
<a href="s_102.html#s03_03_03">3.3.3 Global Settings</a> in 3.3 Scene Settings
</small>
<li><small>
<a href="s_165.html#s03_08_13">3.8.13 Global Settings</a> in 3.8 Quick Reference
</small>
<li><small>
<a href="s_75.html#s02_03_10_04">2.3.10.4 Global settings</a> in 2.3.10 SDL tutorial: A raytracer
</small>
</ul>
</p>
<br>
<table class="NavBar" width="100%">
<tr>
<td align="left" nowrap="" valign="middle" width="32">
<a href="s_95.html"><img alt="previous" border="0" src="prev.png"></a>
</td>
<td align="left" valign="middle" width="30%">
<a href="s_95.html">3.1.2 Command-line Options</a>
</td>
<td align="center" valign="middle">
<strong>3.2 Scene Description Language</strong>
</td>
<td align="right" valign="middle" width="30%">
<a href="s_97.html">3.2.1 Language Basics</a>
</td>
<td align="right" nowrap="" valign="middle" width="32">
<a href="s_97.html"><img alt="next" border="0" src="next.png"></a>
</td>
</tr>
</table>
</body> </html>
|