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 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735
|
<!-- 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.1 Language Basics</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_96.html"><img alt="previous" border="0" src="prev.png"></a>
</td>
<td align="left" valign="middle" width="30%">
<a href="s_96.html">3.2 Scene Description Language</a>
</td>
<td align="center" valign="middle">
<strong class="NavBar">POV-Ray 3.6 for UNIX documentation</strong><br> <strong>3.2.1
Language Basics</strong>
</td>
<td align="right" valign="middle" width="30%">
<a href="s_98.html">3.2.2 Language Directives</a>
</td>
<td align="right" nowrap="" valign="middle" width="32">
<a href="s_98.html"><img alt="next" border="0" src="next.png"></a>
</td>
</tr>
</table>
<h3><a name="s03_02_01">3.2.1 </a>Language Basics</h3>
<p>
The POV-Ray language consists of identifiers, reserved keywords, floating point expressions, strings, 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.
</p>
<h4><a name="s03_02_01_01">3.2.1.1 </a>Identifiers and Keywords</h4>
<a name="s03_02_01_01_i1"><a name="Identifiers"></a><a name="s03_02_01_01_i2"><a name="identifier"></a><a name="s03_02_01_01_i3"><a name="keywords"></a><a name="s03_02_01_01_i4"><a name="keyword"></a>
<p>
POV-Ray allows you to define identifiers for later use in the scene file. An identifier may be 1 to 40 characters
long. It may consist of upper and 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.
</p>
<p>
POV-Ray has a number of reserved keywords which are listed below.
</p>
<table class="tablelist">
<tr>
<th colspan="3">a</th>
</tr>
<tr valign="top">
<td width="33%">
<a href="s_129.html#s03_06_02_02"><code>aa_level</code></a><br> <a href="s_129.html#s03_06_02_02"><code>aa_threshold</code></a><br>
<a href="s_97.html#s03_02_01_03_04"><code>abs</code></a><br> <a href="#l58"><code>absorption</code></a><br> <a href="s_108.html#s03_04_04"><code>accuracy</code></a><br>
<a href="#l59"><code>acos</code></a><br> <a href="s_97.html#s03_02_01_03_04"><code>acosh</code></a><br> <a href="s_111.html#s03_04_07_05"><code>adaptive</code></a><br>
<a href="s_102.html#s03_03_03_01"><code>adc_bailout</code></a><br> <a href="s_125.html#s03_05_11_01"><code>agate</code></a><br>
<a href="s_126.html#s03_05_12"><code>agate_turb</code></a><br> <a href="s_115.html#s03_05_01_05_02"><code>all</code></a><br>
</td>
<td width="33%">
<a href="s_108.html#s03_04_04"><code>all_intersections</code></a><br> <a href="s_115.html#s03_05_01_05_02"><code>alpha</code></a><br>
<a href="s_125.html#s03_05_11_30"><code>altitude</code></a><br> <a href="s_103.html#s03_03_04_02_02"><code>always_sample</code></a><br>
<a href="#l60"><code>ambient</code></a><br> <a href="s_102.html#s03_03_03_02"><code>ambient_light</code></a><br> <a href="#l61"><code>angle</code></a><br>
<a href="s_100.html#s03_03_01_03"><code>aperture</code></a><br> <a href="s_98.html#s03_02_02_03_01"><code>append</code></a><br>
<a href="s_101.html#s03_03_02_05"><code>arc_angle</code></a><br> <a href="s_111.html#s03_04_07_05"><code>area_light</code></a><br>
<a href="#l62"><code>array</code></a><br>
</td>
<td width="33%">
<a href="s_97.html#s03_02_01_03_04"><code>asc</code></a><br> <a href="s_102.html#s03_03_03_06"><code>ascii</code></a><br>
<a href="#l63"><code>asin</code></a><br> <a href="s_97.html#s03_02_01_03_04"><code>asinh</code></a><br> <a href="s_102.html#s03_03_03_03"><code>assumed_gamma</code></a><br>
<a href="#l64"><code>atan</code></a><br> <a href="#l65"><code>atan2</code></a><br> <a href="s_97.html#s03_02_01_03_04"><code>atanh</code></a><br>
<a href="#l66"><code>autostop</code></a><br> <a href="s_125.html#s03_05_11_02"><code>average</code></a><br>
</td>
</tr>
</table>
<table class="tablelist">
<tr valign="top">
<th align="left" colspan="3">b</th>
</tr>
<tr valign="top">
<td width="33%">
<a href="s_105.html#s03_04_01_10"><code>b_spline</code></a><br> <a href="#l67"><code>background</code></a><br>
<a href="s_105.html#s03_04_01_07"><code>bezier_spline</code></a><br> <a href="s_106.html#s03_04_02_01"><code>bicubic_patch</code></a><br>
<a href="s_126.html#s03_05_12_06_01"><code>black_hole</code></a><br> <a href="s_105.html#s03_04_01_01"><code>blob</code></a><br>
<a href="s_97.html#s03_02_01_05_02"><code>blue</code></a><br>
</td>
<td width="33%">
<a href="s_100.html#s03_03_01_03"><code>blur_samples</code></a><br> <a href="s_113.html#s03_04_09_02"><code>bounded_by</code></a><br>
<a href="s_105.html#s03_04_01_02"><code>box</code></a><br> <a href="s_125.html#s03_05_11_03"><code>boxed</code></a><br>
<a href="s_125.html#s03_05_11_04"><code>bozo</code></a><br> <a href="s_98.html#s03_02_02_06_03"><code>break</code></a><br>
<a href="s_125.html#s03_05_11_05"><code>brick</code></a><br>
</td>
<td width="33%">
<a href="s_126.html#s03_05_12"><code>brick_size</code></a><br> <a href="s_103.html#s03_03_04_02_03"><code>brightness</code></a><br>
<a href="s_117.html#s03_05_03_02_02"><code>brilliance</code></a><br> <a href="s_116.html#s03_05_02_03"><code>bump_map</code></a><br>
<a href="s_116.html#s03_05_02_03_02"><code>bump_size</code></a><br> <a href="s_125.html#s03_05_11_06"><code>bumps</code></a><br>
</td>
</tr>
</table>
<table class="tablelist">
<tr valign="top">
<th align="left" colspan="3">c</th>
</tr>
<tr valign="top">
<td width="33%">
<a href="#l68"><code>camera</code></a><br> <a href="s_98.html#s03_02_02_06_03"><code>case</code></a><br>
<a href="s_128.html#s03_06_01_07"><code>caustics</code></a><br> <a href="s_97.html#s03_02_01_03_04"><code>ceil</code></a><br>
<a href="s_125.html#s03_05_11_07"><code>cells</code></a><br> <a href="s_102.html#s03_03_03_06"><code>charset</code></a><br>
<a href="s_125.html#s03_05_11_08"><code>checker</code></a><br> <a href="s_97.html#s03_02_01_07_03"><code>chr</code></a><br>
<a href="s_111.html#s03_04_07_05"><code>circular</code></a><br> <a href="s_113.html#s03_04_09_01"><code>clipped_by</code></a><br>
<a href="s_97.html#s03_02_01_03_06"><code>clock</code></a><br> <a href="s_97.html#s03_02_01_03_06"><code>clock_delta</code></a><br>
<a href="s_97.html#s03_02_01_03_06"><code>clock_on</code></a><br> <a href="s_130.html#s03_06_03_02_02"><code>collect</code></a><br>
</td>
<td width="33%">
<a href="#l69"><code>color</code></a><br> <a href="s_115.html#s03_05_01_03"><code>color_map</code></a><br>
<a href="s_97.html#s03_02_01_05"><code>colour</code></a><br> <a href="s_115.html#s03_05_01_03"><code>colour_map</code></a><br>
<a href="s_105.html#s03_04_01_01"><code>component</code></a><br> <a href="s_110.html#s03_04_06_02"><code>composite</code></a><br>
<a href="s_97.html#s03_02_01_07_03"><code>concat</code></a><br> <a href="s_105.html#s03_04_01_03"><code>cone</code></a><br>
<a href="s_100.html#s03_03_01_03"><code>confidence</code></a><br> <a href="s_105.html#s03_04_01_08"><code>conic_sweep</code></a><br>
<a href="s_117.html#s03_05_03_05"><code>conserve_energy</code></a><br> <a href="s_108.html#s03_04_04"><code>contained_by</code></a><br>
<a href="s_126.html#s03_05_12"><code>control0</code></a><br> <a href="s_126.html#s03_05_12"><code>control1</code></a><br>
</td>
<td width="33%">
<a href="s_125.html#s03_05_11_13"><code>coords</code></a><br> <a href="#l70"><code>cos</code></a><br>
<a href="s_97.html#s03_02_01_03_04"><code>cosh</code></a><br> <a href="s_103.html#s03_03_04_02_04"><code>count</code></a><br>
<a href="s_125.html#s03_05_11_09"><code>crackle</code></a><br> <a href="s_117.html#s03_05_03_02_03"><code>crand</code></a><br>
<a href="s_105.html#s03_04_01_06"><code>cube</code></a><br> <a href="s_107.html#s03_04_03_02"><code>cubic</code></a><br>
<a href="s_105.html#s03_04_01_07"><code>cubic_spline</code></a><br> <a href="s_126.html#s03_05_12"><code>cubic_wave</code></a><br>
<a href="s_124.html#s03_05_10"><code>cutaway_textures</code></a><br> <a href="s_105.html#s03_04_01_04"><code>cylinder</code></a><br>
<a href="s_125.html#s03_05_11_10"><code>cylindrical</code></a><br>
</td>
</tr>
</table>
<table class="tablelist">
<tr valign="top">
<th align="left" colspan="3">d</th>
</tr>
<tr valign="top">
<td width="33%">
<a href="s_98.html#s03_02_02_07_01"><code>debug</code></a><br> <a href="s_98.html#s03_02_02_02_01"><code>declare</code></a><br>
<a href="s_98.html#s03_02_02_04"><code>default</code></a><br> <a href="s_97.html#s03_02_01_03_04"><code>defined</code></a><br>
<a href="s_97.html#s03_02_01_03_04"><code>degrees</code></a><br> <a href="s_129.html#s03_06_02_03"><code>density</code></a><br>
<a href="s_125.html#s03_05_11_11"><code>density_file</code></a><br> <a href="s_129.html#s03_06_02_03_03"><code>density_map</code></a><br>
</td>
<td width="33%">
<a href="s_125.html#s03_05_11_12"><code>dents</code></a><br> <a href="s_125.html#s03_05_11_11"><code>df3</code></a><br>
<a href="s_110.html#s03_04_06_04"><code>difference</code></a><br> <a href="s_117.html#s03_05_03_02_01"><code>diffuse</code></a><br>
<a href="s_97.html#s03_02_01_03_04"><code>dimension_size</code></a><br> <a href="s_97.html#s03_02_01_03_04"><code>dimensions</code></a><br>
<a href="s_100.html#s03_03_01_01_04"><code>direction</code></a><br> <a href="s_106.html#s03_04_02_02"><code>disc</code></a><br>
</td>
<td width="33%">
<a href="s_128.html#s03_06_01_05"><code>dispersion</code></a><br> <a href="s_128.html#s03_06_01_05"><code>dispersion_samples</code></a><br>
<a href="s_126.html#s03_05_12_06_05"><code>dist_exp</code></a><br> <a href="s_101.html#s03_03_02_03"><code>distance</code></a><br>
<a href="s_97.html#s03_02_01_03_04"><code>div</code></a><br> <a href="s_113.html#s03_04_09_08"><code>double_illuminate</code></a><br>
</td>
</tr>
</table>
<table class="tablelist">
<tr valign="top">
<th align="left" colspan="3">e</th>
</tr>
<tr valign="top">
<td width="33%">
<a href="s_129.html#s03_06_02_01_03"><code>eccentricity</code></a><br> <a href="s_98.html#s03_02_02_06_01"><code>else</code></a><br>
<a href="s_129.html#s03_06_02_01_02"><code>emission</code></a><br> <a href="s_98.html#s03_02_02_06_01"><code>end</code></a><br>
</td>
<td width="33%">
<a href="s_98.html#s03_02_02_07_01"><code>error</code></a><br> <a href="#l71"><code>error_bound</code></a><br>
<a href="s_108.html#s03_04_04"><code>evaluate</code></a><br> <a href="s_97.html#s03_02_01_03_04"><code>exp</code></a><br>
</td>
<td width="33%">
<a href="s_130.html#s03_06_03_05_02"><code>expand_thresholds</code></a><br> <a href="s_117.html#s03_05_03_04"><code>exponent</code></a><br>
<a href="s_125.html#s03_05_11_14"><code>exterior</code></a><br> <a href="s_129.html#s03_06_02_01_03"><code>extinction</code></a><br>
</td>
</tr>
</table>
<table class="tablelist">
<tr valign="top">
<th align="left" colspan="3">f</th>
</tr>
<tr valign="top">
<td width="33%">
<a href="s_106.html#s03_04_02_04"><code>face_indices</code></a><br> <a href="s_125.html#s03_05_11_13"><code>facets</code></a><br>
<a href="s_128.html#s03_06_01_06"><code>fade_color</code></a><br> <a href="s_128.html#s03_06_01_06"><code>fade_colour</code></a><br>
<a href="s_111.html#s03_04_07_09"><code>fade_distance</code></a><br> <a href="s_111.html#s03_04_07_09"><code>fade_power</code></a><br>
<a href="s_111.html#s03_04_07_02"><code>falloff</code></a><br> <a href="s_101.html#s03_03_02_05"><code>falloff_angle</code></a><br>
<a href="s_97.html#s03_02_01_03_05"><code>false</code></a><br> <a href="s_98.html#s03_02_02_03_02"><code>fclose</code></a><br>
</td>
<td width="33%">
<a href="s_97.html#s03_02_01_03_04"><code>file_exists</code></a><br> <a href="s_97.html#s03_02_01_05"><code>filter</code></a><br>
<a href="s_97.html#s03_02_01_03_06"><code>final_clock</code></a><br> <a href="s_97.html#s03_02_01_03_06"><code>final_frame</code></a><br>
<a href="#l72"><code>finish</code></a><br> <a href="s_100.html#s03_03_01_02_03"><code>fisheye</code></a><br> <a href="s_106.html#s03_04_02_01"><code>flatness</code></a><br>
<a href="s_126.html#s03_05_12_06_02"><code>flip</code></a><br> <a href="s_97.html#s03_02_01_03_04"><code>floor</code></a><br>
<a href="s_100.html#s03_03_01_03"><code>focal_point</code></a><br>
</td>
<td width="33%">
<a href="#l73"><code>fog</code></a><br> <a href="s_101.html#s03_03_02_03"><code>fog_alt</code></a><br>
<a href="s_101.html#s03_03_02_03"><code>fog_offset</code></a><br> <a href="s_101.html#s03_03_02_03"><code>fog_type</code></a><br>
<a href="s_98.html#s03_02_02_03_01"><code>fopen</code></a><br> <a href="s_125.html#s03_05_11_09"><code>form</code></a><br>
<a href="s_97.html#s03_02_01_03_06"><code>frame_number</code></a><br> <a href="s_126.html#s03_05_12"><code>frequency</code></a><br>
<a href="s_117.html#s03_05_03_04"><code>fresnel</code></a><br> <a href="#l74"><code>function</code></a><br>
</td>
</tr>
</table>
<table class="tablelist">
<tr valign="top">
<th align="left" colspan="3">g</th>
</tr>
<tr valign="top">
<td width="33%">
<a href="s_130.html#s03_06_03_02_01"><code>gather</code></a><br> <a href="s_115.html#s03_05_01_05_01"><code>gif</code></a><br>
<a href="s_112.html#s03_04_08"><code>global_lights</code></a><br>
</td>
<td width="33%">
<a href="#l75"><code>global_settings</code></a><br> <a href="#l76"><code>gradient</code></a><br> <a href="s_125.html#s03_05_11_18"><code>granite</code></a><br>
</td>
<td width="33%">
<a href="s_97.html#s03_02_01_05_04"><code>gray</code></a><br> <a href="s_103.html#s03_03_04_02_06"><code>gray_threshold</code></a><br>
<a href="s_97.html#s03_02_01_05_02"><code>green</code></a><br>
</td>
</tr>
</table>
<table class="tablelist">
<tr valign="top">
<th align="left" colspan="3">h</th>
</tr>
<tr valign="top">
<td width="33%">
<a href="s_105.html#s03_04_01_05"><code>height_field</code></a><br> <a href="s_125.html#s03_05_11_19"><code>hexagon</code></a><br>
</td>
<td width="33%">
<a href="s_102.html#s03_03_03_04"><code>hf_gray_16</code></a><br> <a href="s_105.html#s03_04_01_01"><code>hierarchy</code></a><br>
</td>
<td width="33%">
<a href="s_105.html#s03_04_01_06"><code>hypercomplex</code></a><br> <a href="s_113.html#s03_04_09_05"><code>hollow</code></a><br>
</td>
</tr>
</table>
<table class="tablelist">
<tr valign="top">
<th align="left" colspan="3">i</th>
</tr>
<tr valign="top">
<td width="33%">
<a href="s_98.html#s03_02_02_06_01"><code>if</code></a><br> <a href="s_98.html#s03_02_02_06_02"><code>ifdef</code></a><br>
<a href="s_115.html#s03_05_01_05_01"><code>iff</code></a><br> <a href="s_98.html#s03_02_02_06_02"><code>ifndef</code></a><br>
<a href="s_97.html#s03_02_01_03_06"><code>image_height</code></a><br> <a href="s_115.html#s03_05_01_05"><code>image_map</code></a><br>
<a href="s_125.html#s03_05_11_20"><code>image_pattern</code></a><br> <a href="s_97.html#s03_02_01_03_06"><code>image_width</code></a><br>
<a href="s_98.html#s03_02_02_01"><code>include</code></a><br>
</td>
<td width="33%">
<a href="s_97.html#s03_02_01_03_06"><code>initial_clock</code></a><br> <a href="s_97.html#s03_02_01_03_06"><code>initial_frame</code></a><br>
<a href="s_97.html#s03_02_01_03_04"><code>inside</code></a><br> <a href="s_106.html#s03_04_02_03_01"><code>inside_vector</code></a><br>
<a href="s_97.html#s03_02_01_03_04"><code>int</code></a><br> <a href="#l77"><code>interior</code></a><br> <a href="#l78"><code>interior_texture</code></a><br>
<a href="s_97.html#s03_02_01_06_06"><code>internal</code></a><br> <a href="s_126.html#s03_05_12"><code>interpolate</code></a><br>
</td>
<td width="33%">
<a href="s_110.html#s03_04_06_03"><code>intersection</code></a><br> <a href="s_129.html#s03_06_02_02"><code>intervals</code></a><br>
<a href="s_113.html#s03_04_09_04"><code>inverse</code></a><br> <a href="#l79"><code>ior</code></a><br> <a href="s_117.html#s03_05_03_06"><code>irid</code></a><br>
<a href="s_102.html#s03_03_03_05"><code>irid_wavelength</code></a><br> <a href="#l80"><code>isosurface</code></a><br>
</td>
</tr>
</table>
<table class="tablelist">
<tr valign="top">
<th align="left" colspan="3">j</th>
</tr>
<tr valign="top">
<td width="33%">
<a href="s_111.html#s03_04_07_05"><code>jitter</code></a><br> <a href="s_115.html#s03_05_01_05_01"><code>jpeg</code></a><br>
</td>
<td width="33%">
<a href="s_125.html#s03_05_11_14"><code>julia</code></a><br> <a href="s_105.html#s03_04_01_06"><code>julia_fractal</code></a><br>
</td>
<td width="33%">
</td>
</tr>
</table>
<table class="tablelist">
<tr valign="top">
<th align="left" colspan="3">l</th>
</tr>
<tr valign="top">
<td width="33%">
<a href="s_126.html#s03_05_12"><code>lambda</code></a><br> <a href="s_105.html#s03_04_01_07"><code>lathe</code></a><br>
<a href="s_125.html#s03_05_11_21"><code>leopard</code></a><br> <a href="s_112.html#s03_04_08"><code>light_group</code></a><br>
<a href="s_111.html#s03_04_07"><code>light_source</code></a><br>
</td>
<td width="33%">
<a href="s_105.html#s03_04_01_07"><code>linear_spline</code></a><br> <a href="s_105.html#s03_04_01_08"><code>linear_sweep</code></a><br>
<a href="s_97.html#s03_02_01_03_04"><code>ln</code></a><br> <a href="s_103.html#s03_03_04_02_15"><code>load_file</code></a><br>
<a href="s_98.html#s03_02_02_02"><code>local</code></a><br>
</td>
<td width="33%">
<a href="s_100.html#s03_03_01_01_01"><code>location</code></a><br> <a href="s_97.html#s03_02_01_03_04"><code>log</code></a><br>
<a href="s_100.html#s03_03_01_01_01"><code>look_at</code></a><br> <a href="s_111.html#s03_04_07_07"><code>looks_like</code></a><br>
<a href="s_103.html#s03_03_04_02_07"><code>low_error_factor</code></a><br>
</td>
</tr>
</table>
<table class="tablelist">
<tr valign="top">
<th align="left" colspan="3">m</th>
</tr>
<tr valign="top">
<td width="33%">
<a href="#l81"><code>macro</code></a><br> <a href="s_125.html#s03_05_11_14"><code>magnet</code></a><br>
<a href="s_126.html#s03_05_12_06_05"><code>major_radius</code></a><br> <a href="s_125.html#s03_05_11_14"><code>mandel</code></a><br>
<a href="s_126.html#s03_05_12_07_02"><code>map_type</code></a><br> <a href="s_125.html#s03_05_11_22"><code>marble</code></a><br>
<a href="#l82"><code>material</code></a><br> <a href="s_119.html#s03_05_05_03"><code>material_map</code></a><br> <a href="#l83"><code>matrix</code></a><br>
<a href="#l84"><code>max</code></a><br> <a href="s_97.html#s03_02_01_04_05"><code>max_extent</code></a><br>
</td>
<td width="33%">
<a href="s_108.html#s03_04_04"><code>max_gradient</code></a><br> <a href="s_102.html#s03_03_03_08"><code>max_intersections</code></a><br>
<a href="s_105.html#s03_04_01_06"><code>max_iteration</code></a><br> <a href="s_103.html#s03_03_04_02_08"><code>max_sample</code></a><br>
<a href="s_108.html#s03_04_04"><code>max_trace</code></a><br> <a href="s_102.html#s03_03_03_07"><code>max_trace_level</code></a><br>
<a href="#l85"><code>media</code></a><br> <a href="s_111.html#s03_04_07_11"><code>media_attenuation</code></a><br> <a href="s_111.html#s03_04_07_10"><code>media_interaction</code></a><br>
<a href="s_110.html#s03_04_06_05"><code>merge</code></a><br> <a href="#l86"><code>mesh</code></a><br>
</td>
<td width="33%">
<a href="s_106.html#s03_04_02_04"><code>mesh2</code></a><br> <a href="s_117.html#s03_05_03_03_03"><code>metallic</code></a><br>
<a href="s_129.html#s03_06_02_02"><code>method</code></a><br> <a href="s_125.html#s03_05_11_09"><code>metric</code></a><br>
<a href="#l87"><code>min</code></a><br> <a href="s_97.html#s03_02_01_04_05"><code>min_extent</code></a><br> <a href="s_103.html#s03_03_04_02_10"><code>minimum_reuse</code></a><br>
<a href="s_97.html#s03_02_01_03_04"><code>mod</code></a><br> <a href="s_126.html#s03_05_12"><code>mortar</code></a><br>
</td>
</tr>
</table>
<table class="tablelist">
<tr valign="top">
<th align="left" colspan="3">n</th>
</tr>
<tr valign="top">
<td width="33%">
<a href="s_97.html#s03_02_01_09"><code>natural_spline</code></a><br> <a href="s_103.html#s03_03_04_02_11"><code>nearest_count</code></a><br>
<a href="s_97.html#s03_02_01_03_05"><code>no</code></a><br> <a href="s_116.html#s03_05_02_04"><code>no_bump_scale</code></a><br>
<a href="s_113.html#s03_04_09_07"><code>no_image</code></a><br>
</td>
<td width="33%">
<a href="s_113.html#s03_04_09_07"><code>no_reflection</code></a><br> <a href="s_113.html#s03_04_09_06"><code>no_shadow</code></a><br>
<a href="#l88"><code>noise_generator</code></a><br> <a href="#l89"><code>normal</code></a><br> <a href="s_106.html#s03_04_02_04"><code>normal_indices</code></a><br>
</td>
<td width="33%">
<a href="s_116.html#s03_05_02_02"><code>normal_map</code></a><br> <a href="s_106.html#s03_04_02_04"><code>normal_vectors</code></a><br>
<a href="s_102.html#s03_03_03_09"><code>number_of_waves</code></a><br>
</td>
</tr>
</table>
<table class="tablelist">
<tr valign="top">
<th align="left" colspan="3">o</th>
</tr>
<tr valign="top">
<td width="33%">
<a href="#l90"><code>object</code></a><br> <a href="s_126.html#s03_05_12"><code>octaves</code></a><br>
<a href="s_97.html#s03_02_01_03_05"><code>off</code></a><br> <a href="s_126.html#s03_05_12_06_02"><code>offset</code></a><br>
<a href="s_126.html#s03_05_12"><code>omega</code></a><br>
</td>
<td width="33%">
<a href="s_100.html#s03_03_01_02_05"><code>omnimax</code></a><br> <a href="s_97.html#s03_02_01_03_05"><code>on</code></a><br>
<a href="s_126.html#s03_05_12_07_01"><code>once</code></a><br> <a href="s_125.html#s03_05_11_24"><code>onion</code></a><br>
<a href="#l91"><code>open</code></a><br>
</td>
<td width="33%">
<a href="s_111.html#s03_04_07_05"><code>orient</code></a><br> <a href="s_126.html#s03_05_12_06_05"><code>orientation</code></a><br>
<a href="s_100.html#s03_03_01_02_02"><code>orthographic</code></a><br>
</td>
</tr>
</table>
<table class="tablelist">
<tr valign="top">
<th align="left" colspan="3">p</th>
</tr>
<tr valign="top">
<td width="33%">
<a href="s_100.html#s03_03_01_02_06"><code>panoramic</code></a><br> <a href="s_111.html#s03_04_07_04"><code>parallel</code></a><br>
<a href="#l92"><code>parametric</code></a><br> <a href="s_130.html#s03_06_03_02_02"><code>pass_through</code></a><br>
<a href="#l93"><code>pattern</code></a><br> <a href="s_100.html#s03_03_01_02_01"><code>perspective</code></a><br> <a href="s_115.html#s03_05_01_05_01"><code>pgm</code></a><br>
<a href="s_126.html#s03_05_12"><code>phase</code></a><br> <a href="s_117.html#s03_05_03_03_01"><code>phong</code></a><br>
<a href="s_117.html#s03_05_03_03_01"><code>phong_size</code></a><br> <a href="#l94"><code>photons</code></a><br>
</td>
<td width="33%">
<a href="s_97.html#s03_02_01_03_05"><code>pi</code></a><br> <a href="#l95"><code>pigment</code></a><br>
<a href="s_115.html#s03_05_01_04"><code>pigment_map</code></a><br> <a href="s_125.html#s03_05_11_25"><code>pigment_pattern</code></a><br>
<a href="s_125.html#s03_05_11_26"><code>planar</code></a><br> <a href="s_107.html#s03_04_03_01"><code>plane</code></a><br>
<a href="s_115.html#s03_05_01_05_01"><code>png</code></a><br> <a href="s_111.html#s03_04_07_02"><code>point_at</code></a><br>
<a href="s_107.html#s03_04_03_02"><code>poly</code></a><br> <a href="s_126.html#s03_05_12"><code>poly_wave</code></a><br>
<a href="s_106.html#s03_04_02_05"><code>polygon</code></a><br>
</td>
<td width="33%">
<a href="s_105.html#s03_04_01_05"><code>pot</code></a><br> <a href="#l96"><code>pow</code></a><br> <a href="s_115.html#s03_05_01_05_01"><code>ppm</code></a><br>
<a href="s_105.html#s03_04_01_06"><code>precision</code></a><br> <a href="s_109.html#s03_04_05"><code>precompute</code></a><br>
<a href="s_103.html#s03_03_04_02_13"><code>pretrace_end</code></a><br> <a href="s_103.html#s03_03_04_02_13"><code>pretrace_start</code></a><br>
<a href="s_105.html#s03_04_01_08"><code>prism</code></a><br> <a href="s_97.html#s03_02_01_06_01"><code>prod</code></a><br>
<a href="s_111.html#s03_04_07_08"><code>projected_through</code></a><br> <a href="s_105.html#s03_04_01_06"><code>pwr</code></a><br>
</td>
</tr>
</table>
<table class="tablelist">
<tr valign="top">
<th align="left" colspan="3">q</th>
</tr>
<tr valign="top">
<td width="33%">
<a href="s_105.html#s03_04_01_07"><code>quadratic_spline</code></a><br> <a href="s_107.html#s03_04_03_03"><code>quadric</code></a><br>
<a href="s_107.html#s03_04_03_02"><code>quartic</code></a><br>
</td>
<td width="33%">
<a href="s_105.html#s03_04_01_06"><code>quaternion</code></a><br> <a href="s_115.html#s03_05_01_06"><code>quick_color</code></a><br>
<a href="s_115.html#s03_05_01_06"><code>quick_colour</code></a><br>
</td>
<td width="33%">
<a href="s_125.html#s03_05_11_27"><code>quilted</code></a><br>
</td>
</tr>
</table>
<table class="tablelist">
<tr valign="top">
<th align="left" colspan="3">r</th>
</tr>
<tr valign="top">
<td width="33%">
<a href="s_125.html#s03_05_11_28"><code>radial</code></a><br> <a href="s_97.html#s03_02_01_03_04"><code>radians</code></a><br>
<a href="#l97"><code>radiosity</code></a><br> <a href="s_111.html#s03_04_07_02"><code>radius</code></a><br> <a href="#l98"><code>rainbow</code></a><br>
<a href="s_126.html#s03_05_12"><code>ramp_wave</code></a><br> <a href="#l99"><code>rand</code></a><br> <a href="s_98.html#s03_02_02_06_03"><code>range</code></a><br>
<a href="s_129.html#s03_06_02_02"><code>ratio</code></a><br>
</td>
<td width="33%">
<a href="s_98.html#s03_02_02_03_03"><code>read</code></a><br> <a href="s_105.html#s03_04_01_06"><code>reciprocal</code></a><br>
<a href="s_103.html#s03_03_04_02_14"><code>recursion_limit</code></a><br> <a href="s_97.html#s03_02_01_05_02"><code>red</code></a><br>
<a href="s_117.html#s03_05_03_04"><code>reflection</code></a><br> <a href="s_117.html#s03_05_03_04"><code>reflection_exponent</code></a><br>
<a href="#l100"><code>refraction</code></a><br> <a href="s_98.html#s03_02_02_07_01"><code>render</code></a><br> <a href="s_126.html#s03_05_12_06_02"><code>repeat</code></a><br>
</td>
<td width="33%">
<a href="s_97.html#s03_02_01_05_01"><code>rgb</code></a><br> <a href="s_97.html#s03_02_01_05_01"><code>rgbf</code></a><br>
<a href="s_97.html#s03_02_01_05_01"><code>rgbft</code></a><br> <a href="s_97.html#s03_02_01_05_01"><code>rgbt</code></a><br>
<a href="s_100.html#s03_03_01_01_05"><code>right</code></a><br> <a href="s_125.html#s03_05_11_29"><code>ripples</code></a><br>
<a href="#l101"><code>rotate</code></a><br> <a href="s_117.html#s03_05_03_03_02"><code>roughness</code></a><br>
</td>
</tr>
</table>
<table class="tablelist">
<tr valign="top">
<th align="left" colspan="3">s</th>
</tr>
<tr valign="top">
<td width="33%">
<a href="s_129.html#s03_06_02_02"><code>samples</code></a><br> <a href="s_103.html#s03_03_04_02_15"><code>save_file</code></a><br>
<a href="#l102"><code>scale</code></a><br> <a href="s_126.html#s03_05_12"><code>scallop_wave</code></a><br> <a href="s_129.html#s03_06_02_01_03"><code>scattering</code></a><br>
<a href="s_97.html#s03_02_01_03_04"><code>seed</code></a><br> <a href="s_97.html#s03_02_01_03_04"><code>select</code></a><br>
<a href="s_111.html#s03_04_07_06"><code>shadowless</code></a><br> <a href="#l103"><code>sin</code></a><br> <a href="s_126.html#s03_05_12"><code>sine_wave</code></a><br>
<a href="s_97.html#s03_02_01_03_04"><code>sinh</code></a><br> <a href="s_125.html#s03_05_11_13"><code>size</code></a><br>
<a href="s_100.html#s03_03_01_01_02"><code>sky</code></a><br> <a href="#l104"><code>sky_sphere</code></a><br> <a href="s_105.html#s03_04_01_06"><code>slice</code></a><br>
<a href="s_125.html#s03_05_11_30"><code>slope</code></a><br>
</td>
<td width="33%">
<a href="s_116.html#s03_05_02_01"><code>slope_map</code></a><br> <a href="s_105.html#s03_04_01_05"><code>smooth</code></a><br>
<a href="s_106.html#s03_04_02_06"><code>smooth_triangle</code></a><br> <a href="s_125.html#s03_05_11_09"><code>solid</code></a><br>
<a href="s_105.html#s03_04_01_12"><code>sor</code></a><br> <a href="s_130.html#s03_06_03_02_01"><code>spacing</code></a><br>
<a href="s_117.html#s03_05_03_03_02"><code>specular</code></a><br> <a href="s_105.html#s03_04_01_09"><code>sphere</code></a><br>
<a href="s_105.html#s03_04_01_10"><code>sphere_sweep</code></a><br> <a href="s_125.html#s03_05_11_31"><code>spherical</code></a><br>
<a href="s_125.html#s03_05_11_32"><code>spiral1</code></a><br> <a href="s_125.html#s03_05_11_33"><code>spiral2</code></a><br>
<a href="#l105"><code>spline</code></a><br> <a href="s_110.html#s03_04_06_02_01"><code>split_union</code></a><br> <a href="s_111.html#s03_04_07_02"><code>spotlight</code></a><br>
<a href="s_125.html#s03_05_11_34"><code>spotted</code></a><br>
</td>
<td width="33%">
<a href="#l106"><code>sqr</code></a><br> <a href="s_97.html#s03_02_01_03_04"><code>sqrt</code></a><br>
<a href="s_98.html#s03_02_02_07_01"><code>statistics</code></a><br> <a href="s_97.html#s03_02_01_07_03"><code>str</code></a><br>
<a href="s_97.html#s03_02_01_03_04"><code>strcmp</code></a><br> <a href="s_105.html#s03_04_01_01"><code>strength</code></a><br>
<a href="s_97.html#s03_02_01_03_04"><code>strlen</code></a><br> <a href="s_97.html#s03_02_01_07_03"><code>strlwr</code></a><br>
<a href="s_97.html#s03_02_01_07_03"><code>strupr</code></a><br> <a href="s_113.html#s03_04_09_09"><code>sturm</code></a><br>
<a href="s_97.html#s03_02_01_07_03"><code>substr</code></a><br> <a href="s_97.html#s03_02_01_06_01"><code>sum</code></a><br>
<a href="s_105.html#s03_04_01_11"><code>superellipsoid</code></a><br> <a href="s_98.html#s03_02_02_06_03"><code>switch</code></a><br>
<a href="s_102.html#s03_03_03_06"><code>sys</code></a><br>
</td>
</tr>
</table>
<table class="tablelist">
<tr valign="top">
<th align="left" colspan="3">t</th>
</tr>
<tr valign="top">
<td width="33%">
<a href="s_97.html#s03_02_01_04_03"><code>t</code></a><br> <a href="#l107"><code>tan</code></a><br> <a href="s_97.html#s03_02_01_03_04"><code>tanh</code></a><br>
<a href="s_130.html#s03_06_03_02_02"><code>target</code></a><br> <a href="s_105.html#s03_04_01_13"><code>text</code></a><br>
<a href="#l108"><code>texture</code></a><br> <a href="#l109"><code>texture_list</code></a><br> <a href="s_119.html#s03_05_05_01"><code>texture_map</code></a><br>
<a href="s_115.html#s03_05_01_05_01"><code>tga</code></a><br> <a href="s_117.html#s03_05_03_06"><code>thickness</code></a><br>
</td>
<td width="33%">
<a href="s_105.html#s03_04_01_01"><code>threshold</code></a><br> <a href="s_115.html#s03_05_01_05_01"><code>tiff</code></a><br>
<a href="s_111.html#s03_04_07_02"><code>tightness</code></a><br> <a href="s_119.html#s03_05_05_02"><code>tile2</code></a><br>
<a href="s_119.html#s03_05_05_02"><code>tiles</code></a><br> <a href="s_105.html#s03_04_01_10"><code>tolerance</code></a><br>
<a href="s_126.html#s03_05_12_06_05"><code>toroidal</code></a><br> <a href="s_105.html#s03_04_01_14"><code>torus</code></a><br>
<a href="s_97.html#s03_02_01_04_05"><code>trace</code></a><br> <a href="#l110"><code>transform</code></a><br>
</td>
<td width="33%">
<a href="#l111"><code>translate</code></a><br> <a href="s_97.html#s03_02_01_05"><code>transmit</code></a><br>
<a href="s_106.html#s03_04_02_06"><code>triangle</code></a><br> <a href="s_126.html#s03_05_12"><code>triangle_wave</code></a><br>
<a href="s_97.html#s03_02_01_03_05"><code>true</code></a><br> <a href="s_105.html#s03_04_01_13"><code>ttf</code></a><br>
<a href="s_101.html#s03_03_02_03"><code>turb_depth</code></a><br> <a href="#l112"><code>turbulence</code></a><br> <a href="s_106.html#s03_04_02_01"><code>type</code></a><br>
</td>
</tr>
</table>
<table class="tablelist">
<tr valign="top">
<th align="left" colspan="3">u</th>
</tr>
<tr valign="top">
<td width="33%">
<a href="s_97.html#s03_02_01_04_03"><code>u</code></a><br> <a href="s_106.html#s03_04_02_01"><code>u_steps</code></a><br>
<a href="s_100.html#s03_03_01_02_04"><code>ultra_wide_angle</code></a><br> <a href="s_98.html#s03_02_02_02_04"><code>undef</code></a><br>
<a href="s_110.html#s03_04_06_02"><code>union</code></a><br>
</td>
<td width="33%">
<a href="s_100.html#s03_03_01_01_05"><code>up</code></a><br> <a href="s_125.html#s03_05_11_20"><code>use_alpha</code></a><br>
<a href="s_116.html#s03_05_02_03_03"><code>use_color</code></a><br> <a href="s_116.html#s03_05_02_03_03"><code>use_colour</code></a><br>
<a href="s_116.html#s03_05_02_03_03"><code>use_index</code></a><br>
</td>
<td width="33%">
<a href="s_102.html#s03_03_03_06"><code>utf8</code></a><br> <a href="s_106.html#s03_04_02_04"><code>uv_indices</code></a><br>
<a href="#l113"><code>uv_mapping</code></a><br> <a href="#l114"><code>uv_vectors</code></a><br>
</td>
</tr>
</table>
<table class="tablelist">
<tr valign="top">
<th align="left" colspan="3">v</th>
</tr>
<tr valign="top">
<td width="33%">
<a href="s_97.html#s03_02_01_04_03"><code>v</code></a><br> <a href="s_106.html#s03_04_02_01"><code>v_steps</code></a><br>
<a href="s_97.html#s03_02_01_03_04"><code>val</code></a><br> <a href="s_100.html#s03_03_01_03"><code>variance</code></a><br>
<a href="s_97.html#s03_02_01_04_05"><code>vaxis_rotate</code></a><br>
</td>
<td width="33%">
<a href="s_97.html#s03_02_01_04_05"><code>vcross</code></a><br> <a href="s_97.html#s03_02_01_03_04"><code>vdot</code></a><br>
<a href="s_98.html#s03_02_02_05"><code>version</code></a><br> <a href="s_106.html#s03_04_02_04"><code>vertex_vectors</code></a><br>
<a href="s_97.html#s03_02_01_03_04"><code>vlength</code></a><br>
</td>
<td width="33%">
<a href="s_97.html#s03_02_01_04_05"><code>vnormalize</code></a><br> <a href="s_97.html#s03_02_01_04_05"><code>vrotate</code></a><br>
<a href="s_97.html#s03_02_01_07_03"><code>vstr</code></a><br> <a href="s_97.html#s03_02_01_04_05"><code>vturbulence</code></a><br>
</td>
</tr>
</table>
<table class="tablelist">
<tr valign="top">
<th align="left" colspan="3">w</th>
</tr>
<tr valign="top">
<td width="33%">
<a href="s_98.html#s03_02_02_07_01"><code>warning</code></a><br> <a href="#l115"><code>warp</code></a><br>
<a href="s_105.html#s03_04_01_05"><code>water_level</code></a><br>
</td>
<td width="33%">
<a href="s_125.html#s03_05_11_35"><code>waves</code></a><br> <a href="s_98.html#s03_02_02_06_04"><code>while</code></a><br>
<a href="s_101.html#s03_03_02_05"><code>width</code></a><br>
</td>
<td width="33%">
<a href="#l116"><code>wood</code></a><br> <a href="s_125.html#s03_05_11_37"><code>wrinkles</code></a><br>
<a href="s_98.html#s03_02_02_03_04"><code>write</code></a><br>
</td>
</tr>
</table>
<table class="tablelist">
<tr valign="top">
<th align="left" colspan="3">x</th>
</tr>
<tr valign="top">
<td width="33%">
<a href="s_97.html#s03_02_01_04_03"><code>x</code></a><br>
</td>
<td width="33%">
</td>
<td width="33%">
</td>
</tr>
</table>
<table class="tablelist">
<tr valign="top">
<th align="left" colspan="3">y</th>
</tr>
<tr valign="top">
<td width="33%">
<a href="s_97.html#s03_02_01_04_03"><code>y</code></a><br>
</td>
<td width="33%">
<a href="s_97.html#s03_02_01_03_05"><code>yes</code></a><br>
</td>
<td width="33%">
</td>
</tr>
</table>
<table class="tablelist" summary="All reserved keywords">
<tr valign="top">
<th align="left" colspan="3">z</th>
</tr>
<tr valign="top">
<td width="33%">
<a href="s_97.html#s03_02_01_04_03"><code>z</code></a><br>
</td>
<td width="33%">
</td>
<td width="33%">
</td>
</tr>
</table>
<p>
All reserved words are fully lower case. Therefore it is recommended that your identifiers contain at least one
upper case character so it is sure to avoid conflict with reserved words.
</p>
<h4><a name="s03_02_01_02">3.2.1.2 </a>Comments</h4>
<a name="s03_02_01_02_i1"><a name="comment"></a>
<p>
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 your information. There are two types of comments in POV-Ray.
</p>
<p>
Two slashes are used for single line comments. Anything on a line after a double slash (<code>//</code>) is ignored
by the ray-tracer. For example:
</p>
<pre>
// This line is ignored
</pre>
<p>
You can have scene file information on the line in front of the comment as in:
</p>
<pre>
object { FooBar } // this is an object
</pre>
<p>
The other type of comment is used for multiple lines. It starts with "<code>/*</code>" and ends with
"<code>*/</code>". Everything in-between is ignored. For example:
</p>
<pre>
/* These lines
are ignored
by the
ray-tracer */
</pre>
<p>
This can be useful if you want to temporarily remove elements from a scene file. <code>/*</code> ... <code>*/</code>
comments can <em>comment out</em> lines containing other <code>//</code> comments and thus can be used to temporarily
or permanently comment out parts of a scene. <code> /*</code> ... <code>*/</code> comments can be nested, the
following is legal:
</p>
<pre>
/* This is a comment
// This too
/* This also */
*/
</pre>
<p>
Use comments liberally and generously. Well used, they really improve the readability of scene files.
</p>
<h4><a name="s03_02_01_03">3.2.1.3 </a>Float Expressions</h4>
<a name="s03_02_01_03_i1"><a name="s03_02_01_03_i2">
<p>
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. Floats may be specified using literals, identifiers or functions which return
float values. You may also create very complex float expressions from combinations of any of these using various
familiar operators.
</p>
<p>
Where POV-Ray needs an integer value it allows you to specify a float value and it truncates it to an integer. When
POV-Ray needs a logical or boolean value it interprets any non-zero float as true and zero as false. Because float
comparisons are subject to rounding errors POV-Ray accepts values extremely close to zero as being false when doing
boolean functions. Typically values whose absolute values are less than a preset value <em> epsilon</em> are
considered false for logical expressions. The value of <em> epsilon</em> is system dependent but is generally about
1.0e-10. Two floats <em>a</em> and <em>b</em> are considered to be equal if <em>abs(a-b) < epsilon.</em>
</p>
<p>
The full syntax for float expressions is given below. Detailed explanations are given in the following
sub-sections.
</p>
<pre>
FLOAT:
NUMERIC_TERM [SIGN NUMERIC_TERM]...
SIGN:
+ | -
NUMERIC_TERM:
NUMERIC_FACTOR [MULT NUMERIC_FACTOR]...
MULT:
* | /
NUMERIC_FACTOR:
FLOAT_LITERAL |
FLOAT_IDENTIFIER |
SIGN NUMERIC_FACTOR |
FLOAT_FUNCTION |
FLOAT_BUILT-IN_IDENT |
( FULL_EXPRESSION ) |
! NUMERIC_FACTOR
VECTOR DECIMAL_POINT DOT_ITEM FLOAT_LITERAL:
[DIGIT...] [DECIMAL_POINT] DIGIT... [EXP [SIGN] DIGIT...]
DIGIT:
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
DECIMAL_POINT:
.
EXP:
e | E
DOT_ITEM:
x | y | z | t | u | v | red | blue | green | filter |
transmit | gray
FLOAT_FUNCTION:
abs( FLOAT ) | acos( FLOAT ) | acosh( FLOAT ) | asc( STRING ) |
asin( FLOAT ) | asinh( FLOAT ) | atan( FLOAT) | atanh( FLOAT) |
atan2( FLOAT , FLOAT ) | ceil( FLOAT ) | cos( FLOAT ) |
cosh( FLOAT ) | defined(IDENTIFIER ) | degrees( FLOAT ) |
dimensions( ARRAY_IDENTIFIER ) |
dimension_size( ARRAY_IDENTIFIER , FLOAT ) |
div( FLOAT , FLOAT ) | exp( FLOAT ) | file_exists( STRING ) |
floor( FLOAT ) | int( FLOAT ) | ln(Float | log( FLOAT ) |
max( FLOAT , FLOAT, ... ) | min( FLOAT , FLOAT, ... ) |
mod( FLOAT , FLOAT ) | pow( FLOAT , FLOAT ) |
radians( FLOAT ) | rand( FLOAT ) | seed( FLOAT ) |
select( FLOAT, FLOAT, FLOAT [,FLOAT]) | sin( FLOAT ) |
sinh( FLOAT ) | sqrt( FLOAT ) | strcmp( STRING , STRING ) |
strlen( STRING ) | tan( FLOAT ) | tanh( FLOAT ) |
val( STRING ) | vdot( VECTOR , VECTOR ) | vlength( VECTOR ) |
FLOAT_BUILT-IN_IDENT:
clock | clock_delta | clock_on | false | final_clock |
final_frame | frame_number | initial_clock | initial_frame |
image_width | image_height | no | off | on | pi | true |
version | yes |
FULL_EXPRESSION:
LOGICAL_EXPRESSION [? FULL_EXPRESSION : FULL_EXPRESSION]
LOGICAL_EXPRESSION:
REL_TERM [LOGICAL_OPERATOR REL_TERM]...
LOGICAL_OPERATOR:
& | | (note: this means an ampersand or a
vertical bar is a logical operator)
REL_TERM:
FLOAT [REL_OPERATOR FLOAT]...
REL_OPERATOR:
< | <= | = | >= | > | !=
INT:
FLOAT (note: any syntax which requires a
integer INT will accept a FLOAT
and it will be truncated to an
integer internally by POV-Ray).
</pre>
<p class="Note">
<strong>Note:</strong> <em>FLOAT_IDENTIFIERS</em> are identifiers previously declared to have float
values. The <em>DOT_ITEM</em> syntax is actually a vector or color operator but it returns a float value. See "<a href="s_97.html#s03_02_01_04_03">Vector
Operators</a>" or "Color Operators" for details. An <em> ARRAY_IDENTIFIER</em> is just the identifier
name of a previously declared array, it does not include the <code>[]</code> braces nor the index. The syntax for <em>STRING</em>
is in the section "<a href="#l117">Strings</a>".
</p>
<h5><a name="s03_02_01_03_01">3.2.1.3.1 </a>Literals</h5>
<a name="s03_02_01_03_01_i1"><a name="s03_02_01_03_01_i2">
<p>
Float literals are represented by an optional sign ("+" or "-") 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:
</p>
<p>
<code> -2.0 -4 34 3.4e6 2e-5 .3 0.6</code>
</p>
<h5><a name="s03_02_01_03_02">3.2.1.3.2 </a>Identifiers</h5>
<a name="s03_02_01_03_02_i1"><a name="Identifiers, float"></a><a name="s03_02_01_03_02_i2"><a name="Float, identifiers"></a>
<p>
Float identifiers may be declared to make scene files more readable and to parameterize scenes so that changing a
single declaration changes many values. An identifier is declared as follows.
</p>
<pre>
FLOAT_DECLARATION:
#declare IDENTIFIER = EXPRESSION; |
#local IDENTIFIER = EXPRESSION;
</pre>
<p>
Where <em>IDENTIFIER</em> is the name of the identifier up to 40 characters long and <em>EXPRESSION</em> is any
valid expression which evaluates to a float value.
</p>
<p class="Note">
<strong>Note:</strong> there should be a semi-colon after the expression in a float declaration. If
omitted, it generates a warning and some macros may not work properly. See " <a href="s_98.html#s03_02_02_02_02">#declare
vs. #local</a>" for information on identifier scope.
</p>
<p>
Here are some examples.
</p>
<pre>
#declare Count = 0;
#declare Rows = 5.3;
#declare Cols = 6.15;
#declare Number = Rows*Cols;
#declare Count = Count+1;
</pre>
<p>
As the last example shows, you can re-declare a float identifier and may use previously declared values in that
re-declaration. There are several built-in identifiers which POV-Ray declares for you. See "Float Expressions: <a href="s_97.html#s03_02_01_03_06">Built-in
Variables</a>" for details.
</p>
<h5><a name="s03_02_01_03_03">3.2.1.3.3 </a>Operators</h5>
<a name="s03_02_01_03_03_i1"><a name="Operators, float"></a><a name="s03_02_01_03_03_i2"><a name="Float, operators"></a>
<p>
<strong>Arithmetic expressions:</strong> Basic math expressions can be created from float literals, identifiers or
functions using the following operators in this order of precedence...
</p>
<table summary="Arithmetic expressions" width="75%">
<tr>
<td width="30%">
<code>( )</code>
</td>
<td width="70%">
expressions in parentheses first
</td>
</tr>
<tr>
<td>
<code>+A -A !A</code>
</td>
<td>
unary minus, unary plus and logical "not"
</td>
</tr>
<tr>
<td>
<code>A*B A/B</code>
</td>
<td>
multiplication and division
</td>
</tr>
<tr>
<td>
<code>A+B A-B</code>
</td>
<td>
addition and subtraction
</td>
</tr>
</table>
<p>
Relational, logical and conditional expressions may also be created. However there is a restriction that these
types of expressions must be enclosed in parentheses first. This restriction, which is not imposed by most computer
languages, is necessary because POV-Ray allows mixing of float and vector expressions. Without the parentheses there
is an ambiguity problem. Parentheses are not required for the unary logical not operator "!" as shown above.
The operators and their precedence are shown here.
</p>
<p>
<strong> Relational expressions:</strong> The operands are arithmetic expressions and the result is always boolean
with 1 for true and 0 for false. All relational operators have the same precedence.
</p>
<table summary="Relational expressions" width="75%">
<tr>
<td width="30%">
<code>(A < B)</code>
</td>
<td width="70%">
A is less than B
</td>
</tr>
<tr>
<td>
<code>(A <= B)</code>
</td>
<td>
A is less than or equal to B
</td>
</tr>
<tr>
<td>
<code>(A = B)</code>
</td>
<td>
A is equal to B (actually abs(A-B)<EPSILON)
</td>
</tr>
<tr>
<td>
<code>(A != B)</code>
</td>
<td>
A is not equal to B (actually abs(A-B)>=EPSILON)
</td>
</tr>
<tr>
<td>
<code>(A >= B)</code>
</td>
<td>
A is greater than or equal to B
</td>
</tr>
<tr>
<td>
<code>(A > B)</code>
</td>
<td>
A is greater than B
</td>
</tr>
</table>
<p>
<strong>Logical expressions:</strong> The operands are converted to boolean values of 0 for false and 1 for true.
The result is always boolean. All logical operators have the same precedence.
</p>
<p class="Note">
<strong>Note:</strong> these are not bit-wise operations, they are logical.
</p>
<table summary="Logical expressions" width="75%">
<tr>
<td width="30%">
<code>(A & B)</code>
</td>
<td width="70%">
true only if both A and B are true, false otherwise
</td>
</tr>
<tr>
<td>
<code>(A | B)</code>
</td>
<td>
true if either A or B or both are true
</td>
</tr>
</table>
<p>
<strong>Conditional expressions:</strong> The operand C is boolean while operands A and B are any expressions. The
result is of the same type as A and B.
</p>
<table summary="Conditional expressions" width="75%">
<tr>
<td width="30%">
<code>(C ? A : B)</code>
</td>
<td width="70%">
if C then A else B
</td>
</tr>
</table>
<p>
Assuming the various identifiers have been declared, the following are examples of valid expressions...
</p>
<pre>
1+2+3 2*5 1/3 Row*3 Col*5
(Offset-5)/2 This/That+Other*Thing
((This<That) & (Other>=Thing)?Foo:Bar)
</pre>
<p>
Expressions are evaluated left to right with innermost parentheses evaluated first, then unary +, - or !, then
multiply or divide, then add or subtract, then relational, then logical, then conditional.
</p>
<h5><a name="s03_02_01_03_04">3.2.1.3.4 </a>Functions</h5>
<a name="s03_02_01_03_04_i1"><a name="Float, functions"></a><a name="s03_02_01_03_04_i2"><a name="Functions, float"></a>
<p>
POV-Ray defines a variety of built-in functions for manipulating floats, vectors and strings. Function calls
consist of a keyword which specifies the name of the function followed by a parameter list enclosed in parentheses.
Parameters are separated by commas. For example:
</p>
<pre>
keyword(param1,param2)
</pre>
<p>
The following are the functions which return float values. They take one or more float, integer, vector, or string
parameters. Assume that <code> A</code> and <code>B</code> are any valid expression that evaluates to a float; <code>I</code>
is a float which is truncated to integer internally, <code>S</code>, <code>S1</code>, <code>S2</code> etc. are
strings, and <code> V</code>, <code>V1</code>, <code>V2</code> etc. are any vector expressions.<code>O</code> is an
object identifier to a pre-declared object.
</p>
<p>
<a name="s03_02_01_03_04_i3"><a name="abs"></a> <code>abs(A)</code> Absolute value of <code>A</code>. If <code>A</code>
is negative, returns <code>-A</code> otherwise returns <code>A</code>.
</p>
<p>
<a name="s03_02_01_03_04_i4"><a name="acos"></a> <code> acos(A)</code> Arc-cosine of <code>A</code>. Returns the
angle, measured in radians, whose cosine is <code>A</code>.
</p>
<p>
<a name="s03_02_01_03_04_i5"><a name="acosh"></a> <code>acosh(A)</code> inverse hyperbolic cosine of <code>A</code>.
</p>
<p>
<a name="s03_02_01_03_04_i6"><a name="asc"></a> <code> asc(S)</code> Returns an integer value in the range 0 to 255
that is the ASCII value of the first character of the string <code>S</code>. For example <code> asc("ABC")</code>
is 65 because that is the value of the character "A".
</p>
<p>
<a name="s03_02_01_03_04_i7"><a name="asin"></a> <code>asin(A)</code> Arc-sine of <code> A</code>. Returns the
angle, measured in radians, whose sine is <code> A</code>.
</p>
<p>
<a name="s03_02_01_03_04_i8"><a name="asinh"></a> <code>asinh(A)</code> invers hyperbolic sine of <code>A</code>
</p>
<p>
<a name="s03_02_01_03_04_i9"><a name="atan2"></a> <code> atan2(A,B)</code> Arc-tangent of <code>(A/B)</code>.
Returns the angle, measured in radians, whose tangent is <code> (A/B)</code>. Returns appropriate value even if <code>B</code>
is zero. Use <code>atan2(A,1)</code> to compute usual atan(A) function.
</p>
<p>
<a name="s03_02_01_03_04_i10"><a name="atanh"></a> <code>atanh(A)</code> invers hyperbolic tangent of <code>A</code>
</p>
<p>
<a name="s03_02_01_03_04_i11"><a name="ceil"></a> <code> ceil(A)</code> Ceiling of <code> A</code>. Returns the
smallest integer greater than <code>A</code>. Rounds up to the next higher integer.
</p>
<p>
<a name="s03_02_01_03_04_i12"><a name="cos"></a> <code>cos(A)</code> Cosine of <code>A</code>. Returns the cosine
of the angle <code>A</code>, where <code>A</code> is measured in radians.
</p>
<p>
<a name="s03_02_01_03_04_i13"><a name="cosh"></a> <code>cosh(A)</code> The hyperbolic cosine of <code>A</code>.
</p>
<p>
<a name="s03_02_01_03_04_i14"><a name="defined"></a> <code> defined(</code><em>IDENTIFIER</em><code>)</code>
Returns <code> true</code> if the identifier is currently defined, <code> false</code> otherwise. This is especially
useful for detecting end-of-file after a <code> #read</code> directive because the file identifier is automatically
undefined when end-of-file is reached. See "<a href="s_98.html#s03_02_02_03_03">The #read Directive</a>" for
details.
</p>
<p>
<a name="s03_02_01_03_04_i15"><a name="degrees"></a> <code>degrees(A)</code> Convert radians to degrees. Returns
the angle measured in degrees whose value in radians is <code>A</code>. Formula is <em> degrees=A/pi*180.0</em>.
</p>
<p>
<a name="s03_02_01_03_04_i16"><a name="dimensions"></a> <code> dimensions(</code> <em>ARRAY_IDENTIFIER</em> <code>)</code>
Returns the number of dimensions of a previously declared array identifier. For example if you do <code>#declare
MyArray=array[6][10]</code> then <code> dimensions(MyArray)</code> returns the value <code>2</code>.
</p>
<p>
<a name="s03_02_01_03_04_i17"><a name="dimension_size"></a> <code> dimension_size(</code> <em> ARRAY_IDENTIFIER,
FLOAT</em> <code> )</code> Returns the size of a given dimension of a previously declared array identifier. Dimensions
are numbered left-to-right starting with 1. For example if you do <code> #declare MyArray=array[6][10]</code> then <code>
dimension_size(MyArray,2)</code> returns the value <code>10</code>.
</p>
<p>
<a name="s03_02_01_03_04_i18"><a name="div"></a> <code> div(A,B)</code> Integer division. The integer part of <code>
(A/B)</code>.
</p>
<p>
<a name="s03_02_01_03_04_i19"><a name="exp"></a> <code>exp(A)</code> Exponential of <code>A</code>. Returns the
value of <em> e</em> raised to the power <code> A</code> where <em>e</em> is the base of the natural logarithm, i.e.
the non-repeating value approximately equal to 2.71828182846.
</p>
<p>
<a name="s03_02_01_03_04_i20"><a name="file_exists"></a> <code>file_exists(S)</code> Attempts to open the file
specified by the string <code>S</code>. The current directory and all library directories specified by the <code>Library_Path</code>
or <code> +L</code> options are also searched. See "<a href="s_95.html#s03_01_02_05_04">Library Paths</a>"
for details. Returns <code> 1</code> if successful and <code>0</code> if unsuccessful.
</p>
<p>
<a name="s03_02_01_03_04_i21"><a name="floor"></a> <code> floor(A)</code> Floor of <code>A</code>. Returns the
largest integer less than <code>A</code>. Rounds down to the next lower integer.
</p>
<p>
<a name="s03_02_01_03_04_i22"><a name="inside"></a> <code>inside(O,V)</code> It returns either 0.0, when the vector <code>V</code>
is outside the object, specified by the object-identifier <code>O</code>, or 1.0 if it is inside.
</p>
<p class="Note">
<strong>Note:</strong> <code>inside</code> does not accept object-identifiers to non-solid objects.
</p>
<p>
<a name="s03_02_01_03_04_i23"><a name="int"></a> <code> int(A)</code> Integer part of <code>A</code>. Returns the
truncated integer part of <code>A</code>. Rounds towards zero.
</p>
<p>
<a name="s03_02_01_03_04_i24"><a name="log"></a> <code> log(A)</code> Logarithm of <code>A</code>. Returns the
logarithm base <em>10</em> of the value <code>A</code>.
</p>
<p>
<a name="s03_02_01_03_04_i25"><a name="ln"></a> <code> ln(A)</code> Natural logarithm of <code>A</code>. Returns
the natural logarithm base <em>e</em> of the value <code>A</code>.
</p>
<p>
<a name="s03_02_01_03_04_i26"><a name="max"></a> <code> max(A,B,...)</code> Maximum of two or more float values.
Returns <code>A</code> if <code>A</code> larger than <code>B</code>. Otherwise returns <code>B</code>.
</p>
<p>
<a name="s03_02_01_03_04_i27"><a name="min"></a> <code>min(A,B,...)</code> Minimum of two or more float values.
Returns <code>A</code> if <code>A</code> smaller than <code> B</code>. Otherwise returns <code>B</code>.
</p>
<p>
<a name="s03_02_01_03_04_i28"><a name="mod"></a> <code>mod(A,B)</code> Value of <code>A</code> modulo <code> B</code>.
Returns the remainder after the integer division of <code> A</code>/<code>B</code>. Formula is <em>
mod=((A/B)-int(A/B))*B</em>.
</p>
<p>
<a name="s03_02_01_03_04_i29"><a name="pow"></a> <code> pow(A,B)</code> Exponentiation. Returns the value of <code>A</code>
raised to the power <code>B</code>.
</p>
<p class="Warning">
<strong>Note:</strong>For a negative A and a non-integer B the function has no defined return
value. The result then may depend on the platform POV-Ray is compiled on.
</p>
<p>
<a name="s03_02_01_03_04_i30"><a name="radians"></a> <code> radians(A)</code> Convert degrees to radians. Returns
the angle measured in radians whose value in degrees is <code>A</code>. Formula is <em> radians=A*pi/180.0</em>.
</p>
<p>
<a name="s03_02_01_03_04_i31"><a name="rand"></a> <code>rand(I)</code> Returns the next pseudo-random number from
the stream specified by the positive integer <code>I</code>. You must call <code> seed()</code> to initialize a random
stream before calling <code> rand()</code>. The numbers are uniformly distributed, and have values between <code>0.0</code>
and <code>1.0</code>, inclusively. The numbers generated by separate streams are independent random variables.
</p>
<p>
<a name="s03_02_01_03_04_i32"><a name="seed"></a> <code> seed(I)</code> Initializes a new pseudo-random stream with
the initial seed value <code>A</code>. The number corresponding to this random stream is returned. Any number of
pseudo-random streams may be used as shown in the example below:
</p>
<pre>
#declare R1 = seed(0);
#declare R2 = seed(12345);
sphere { <rand(R1), rand(R1), rand(R1)>, rand(R2) }
</pre>
<p>
Multiple random generators are very useful in situations where you use <code>rand()</code> to place a group of
objects, and then decide to use <code>rand()</code> in another location earlier in the file to set some colors or
place another group of objects. Without separate <code> rand()</code> streams, all of your objects would move when you
added more calls to <code>rand()</code>. This is very annoying.
</p>
<p>
<a name="s03_02_01_03_04_i33"><a name="select"></a> <code>select(A, B, C [,D])</code>. It can be used with three or
four parameters. <code>Select</code> compares the first argument with zero, depending on the outcome it will return <code>B</code>,
<code>C</code> or <code>D</code>. <code>A,B,C,D</code> can be floats or funtions.<br> When used with three parameters,
if <code>A < 0</code> it will return <code>B</code>, else <code>C</code> (<code>A >= 0</code>).<br> When used
with four parameters, if <code>A < 0</code> it will return B. If <code>A = 0</code> it will return <code>C</code>.
Else it will return <code>D</code> (<code>A > 0</code>).
</p>
<p>
Example:<br> If <code>A</code> has the consecutive values -2, -1, 0, 1, and 2 :
</p>
<pre>
// A = -2 -1 0 1 2
select (A, -1, 0, 1) //returns -1 -1 0 1 1
select (A, -1, 1) //returns -1 -1 1 1 1
</pre>
<p>
<a name="s03_02_01_03_04_i34"><a name="sin"></a> <code>sin(A)</code> Sine of <code>A</code>. Returns the sine of
the angle <code>A</code>, where <code> A</code> is measured in radians.
</p>
<p>
<a name="s03_02_01_03_04_i35"><a name="sinh"></a> <code>sinh(A)</code> The hyperbolic sine of <code>A</code>.
</p>
<p>
<a name="s03_02_01_03_04_i36"><a name="strcmp"></a> <code>strcmp(S1,S2)</code> Compare string <code>S1</code> to <code>
S2</code>. Returns a float value zero if the strings are equal, a positive number if <code>S1</code> comes after <code>S2</code>
in the ASCII collating sequence, else a negative number.
</p>
<p>
<a name="s03_02_01_03_04_i37"><a name="strlen"></a> <code> strlen(S)</code> Length of <code>S</code>. Returns an
integer value that is the number of characters in the string <code>S</code>.
</p>
<p>
<a name="s03_02_01_03_04_i38"><a name="sqrt"></a> <code> sqrt(A)</code> Square root of <code>A</code>. Returns the
value whose square is <code> A</code>.
</p>
<p>
<a name="s03_02_01_03_04_i39"><a name="tan"></a> <code>tan(A)</code> Tangent of <code>A</code>. Returns the tangent
of the angle <code>A</code>, where <code>A</code> is measured in radians.
</p>
<p>
<a name="s03_02_01_03_04_i40"><a name="tanh"></a> <code>tanh(A)</code> The hyperbolic tangent of <code>A</code>.
</p>
<p>
<a name="s03_02_01_03_04_i41"><a name="val"></a> <code>val(S)</code> Convert string <code>S</code> to float.
Returns a float value that is represented by the text in string <code>S</code>. For example <code>val("123.45")</code>
is 123.45 as a float.
</p>
<p>
<a name="s03_02_01_03_04_i42"><a name="vdot"></a> <code>vdot(V1,V2)</code> Dot product of <code>V1</code> and <code>V2</code>.
Returns a float value that is the dot product (sometimes called scalar product) of <code>V1</code> with <code>V2</code>.
It is directly proportional to the length of the two vectors and the cosine of the angle between them. Formula is <em>vdot=V1.x*V2.x
+ V1.y*V2.y + V1.z*V2.z.</em> See the animated demo scene <code>VECT2.POV</code> for an illustration.
</p>
<p>
<a name="s03_02_01_03_04_i43"><a name="vlength"></a> <code>vlength(V)</code> Length of <code>V</code>. Returns a
float value that is the length of vector <code> V</code>. Formula is <em> vlength=sqrt(vdot(A,A))</em>. Can be used to
compute the distance between two points. <code> Dist=vlength(V2-V1)</code>.
</p>
<p>
See section "<a href="s_97.html#s03_02_01_04_05">Vector Functions</a>" and section "<a href="s_97.html#s03_02_01_07_03">String
Functions</a>" for other functions which are somewhat float-related but which return vectors and strings. In
addition to the above built-in functions, you may also define your own functions using the <code>#macro</code>
directive. See the section "<a href="s_98.html#s03_02_02_08">User Defined Macros</a>" for more details.
</p>
<h5><a name="s03_02_01_03_05">3.2.1.3.5 </a>Built-in Constants</h5>
<a name="s03_02_01_03_05_i1"><a name="s03_02_01_03_05_i2"><a name="s03_02_01_03_05_i3"><a name="Float, built-in constants"></a>
<p>
Constants are:
</p>
<pre>
FLOAT_BUILT-IN_IDENT:
false | no | off | on | pi | true | yes
</pre>
<p>
The built-in constants never change value. They are defined as though the following lines were at the start of
every scene.
</p>
<pre>
#declare pi = 3.1415926535897932384626;
#declare true = 1;
#declare yes = 1;
#declare on = 1;
#declare false = 0;
#declare no = 0;
#declare off = 0;
</pre>
<a name="s03_02_01_03_05_i4"><a name="true"></a><a name="s03_02_01_03_05_i5"><a name="false"></a><a name="s03_02_01_03_05_i6"><a name="yes"></a><a name="s03_02_01_03_05_i7"><a name="no"></a><a name="s03_02_01_03_05_i8"><a name="on"></a><a name="s03_02_01_03_05_i9"><a name="off"></a><a name="s03_02_01_03_05_i10"><a name="pi"></a>
<p>
The built-in float identifier <code>pi</code> is obviously useful in math expressions involving circles. The
built-in float identifiers <code> on</code>, <code>off</code>, <code>yes</code>, <code>no</code>, <code> true</code>,
and <code>false</code> are designed for use as boolean constants.
</p>
<p>
The built-in float constats <code>on</code>, <code>off</code>, <code> yes</code>, <code>no</code>, <code>true</code>,
and <code>false</code> are most often used as boolean values with object modifiers or parameters such as <code><a href="s_113.html#s03_04_09_09">sturm</a></code>,
<code><a href="s_113.html#s03_04_09_05">hollow</a></code>, <code><a href="s_105.html#s03_04_01_01">hierarchy</a></code>,
<code><a href="s_105.html#s03_04_01_05">smooth</a></code>, <code><a href="s_111.html#s03_04_07_11">media_attenuation</a></code>,
and <code><a href="s_111.html#s03_04_07_10">media_interaction</a></code>. Whenever you see syntax of the form <code>keyword</code>
<em><code>[Bool]</code></em>, if you simply specify the keyword without the optional boolean then it assumes <code>keyword
on</code>. You need not use the boolean but for readability it is a good idea. You must use one of the false booleans
or an expression which evaluates to zero to turn it off.
</p>
<p class="Note">
<strong>Note:</strong> some of these keywords are <code>on</code> by default, if no keyword is
specified.
</p>
<p>
For example:
</p>
<pre>
object { MyBlob } // sturm defaults off, but
// hierarchy defaults on
object { MyBlob sturm } // turn sturm on
object { MyBlob sturm on } // turn sturm on
object { MyBlob sturm off } // turn sturm off
object { MyBlob hierarchy } // does nothing, hierarchy was
// already on
object { MyBlob hierarchy off } // turn hierarchy off
</pre>
<h5><a name="s03_02_01_03_06">3.2.1.3.6 </a>Built-in Variables</h5>
<a name="s03_02_01_03_06_i1"><a name="Float, built-in variables"></a>
<p>
There are several built-in float variables. You can use them to specify values or to create expressions but you
cannot re-declare them to change their values.
</p>
<p>
Clock-related are:
</p>
<pre>
FLOAT_BUILT-IN_IDENT:
clock | clock_delta | clock_on | final_clock | final_frame
frame_number | initial_clock | initial_frame
</pre>
<p>
These keywords allow to use the values of the clock which have been set in the command line switch options (or
INI-file). They represent float or integer values, read from the animation options. You cannot re-declare these
identifiers.<a name="s03_02_01_03_06_i2"><a name="clock"></a>
</p>
<p>
<code><strong>clock</strong></code> <br>The built-in float identifier <code>clock</code> is used to control
animations in POV-Ray. Unlike some animation packages, the action in POV-Ray animated scenes does not depend upon the
integer frame numbers. Rather you should design your scenes based upon the float identifier <code> clock</code>. For
non-animated scenes its default value is 0 but you can set it to any float value using the INI file option <code>Clock=</code><em>n.n</em>
or the command-line switch <code>+K</code><em>n.n</em> to pass a single float value your scene file.
</p>
<p>
Other INI options and switches may be used to animate scenes by automatically looping through the rendering of
frames using various values for <code> clock</code>. By default, the clock value is 0 for the initial frame and 1 for
the final frame. All other frames are interpolated between these values. <br>For example if your object is supposed to
rotate one full turn over the course of the animation you could specify <code>rotate 360*clock*y</code>. Then as clock
runs from 0 to 1, the object rotates about the y-axis from 0 to 360 degrees.
</p>
<p>
Although the value of <code> clock</code> will change from frame-to-frame, it will never change throughout the
parsing of a scene.<a name="s03_02_01_03_06_i3"><a name="clock_delta"></a>
</p>
<p>
<code><strong>clock_delta</strong></code> <br>The built-in float identifier <code>clock_delta</code> returns the
amount of time between clock values in animations in POV-Ray. While most animations only need the clock value itself,
some animation calculations are easier if you know how long since the last frame. Caution must be used when designing
such scenes. If you render a scene with too few frames, the results may be different than if you render with more
frames in a given time period. On non-animated scenes, <code>clock_delta</code> defaults to 1.0. See section "<a href="s_95.html#s03_01_02_01">Animation
Options</a>" for more details.<a name="s03_02_01_03_06_i4"><a name="clock_on"></a>
</p>
<p>
<code><strong>clock_on</strong></code> <br>With this identifier the status of the clock can be checked: 1 is on, 0
is off.
</p>
<pre>
#if(clock_on=0)
//stuff for still image
#else
//some animation
#end
</pre>
<a name="s03_02_01_03_06_i5"><a name="frame_number"></a>
<p>
<code><strong>frame_number</strong></code> <br>If you rather want to define the action in POV-Ray animated scenes
depending upon the integer frame numbers, this identifier can be used. <br>It reads the number of the frame currently
being rendered.
</p>
<pre>
#if(frame_number=1)
//stuff for first image or frame
#end
#if(frame_number=2)
//stuff for second image or frame
#end
#if(frame_number=n)
//stuff for n th image or frame
#end
</pre>
<a name="s03_02_01_03_06_i6"><a name="initial_clock"></a>
<p>
<code><strong>initial_clock</strong></code> <br>This identifier reads the value set through the INI file option <code>Initial_Clock=</code><em>n.n</em>
or the command-line switch <code>+KI</code><em>n.n</em>.<a name="s03_02_01_03_06_i7"><a name="final_clock"></a>
</p>
<p>
<code><strong>final_clock</strong></code> <br>This identifier reads the value set through the INI file option <code>Final_Clock=</code><em>n.n</em>
or the command-line switch <code>+KF</code><em>n.n</em>.<a name="s03_02_01_03_06_i8"><a name="initial_frame"></a>
</p>
<p>
<code><strong>initial_frame</strong></code> <br>This identifier reads the value set through the INI file option <code>Initial_Frame=</code><em>n</em>
or the command-line switch <code>+KFI</code><em>n</em>.<a name="s03_02_01_03_06_i9"><a name="final_frame"></a>
</p>
<p>
<code><strong>final_frame</strong></code> <br>This identifier reads the value set through the INI file option <code>Final_Frame=</code><em>n</em>
or the command-line switch <code>+KFF</code><em>n</em>.
</p>
<p class="Note">
<strong>Note:</strong> that these values are the ones actually used. When the option 'cyclic
animation' is set, they could be different from the ones originally set in the options.
</p>
<p>
Image-size are:
</p>
<pre>
FLOAT_BUILT-IN_IDENT:
image_width | image_height
</pre>
<a name="s03_02_01_03_06_i10"><a name="image_width"></a>
<p>
<code><strong>image_width</strong></code> <br>This identifier reads the value set through the INI file option <code>Width=</code><em>n</em>
or the command-line switch <code>+W</code><em>n</em>.<a name="s03_02_01_03_06_i11"><a name="image_height"></a>
</p>
<p>
<code><strong>image_height</strong></code> <br>This identifier reads the value set through the INI file option <code>Height=</code><em>n</em>
or the command-line switch <code>+H</code><em>n</em>.
</p>
<p>
You could use these keywords to set the camera ratio (up and right vectors) correctly. The viewing angle of the
camera covers the full width of the rendered image. The camera ratio will always follow the ratio of the image width
to height, regardless of the set image size. Use it like this:
</p>
<pre>
up y*image_height
right x*image_width
</pre>
<p>
You could also make some items of the scene dependent on the image size:
</p>
<pre>
#if (image_width < 300) crand 0.1 #else crand 0.5 #end
or:
image_map {
pattern image_width, image_width { //make pattern resolution
gradient x //dependent of render width
color_map { [ 0.0 ... ] [ 1.0 ... ] }
}
}
</pre>
<p>
Version is:
</p>
<pre>
FLOAT_BUILT-IN_IDENT:
version
</pre>
<p>
The built-in float variable <code> version</code> contains the current setting of the version compatibility option.
Although this value defaults to the current POV-Ray version number, the initial value of <code> version</code> may be
set by the INI file option <code> Version=</code><em>n.n</em> or by the <code> +MV</code><em>n.n</em> command-line
switch. This tells POV-Ray to parse the scene file using syntax from an earlier version of POV-Ray.
</p>
<p>
The INI option or switch only affects the initial setting. Unlike other built-in identifiers, you may change the
value of <code>version</code> throughout a scene file. You do not use <code>#declare</code> to change it though. The <code>
#version</code> language directive is used to change modes. Such changes may occur several times within scene files.
</p>
<p>
Together with the built-in <code> version</code> identifier the <code> #version</code> directive allows you to save
and restore the previous values of this compatibility setting. The new <code>#local</code> identifier option is
especially useful here. For example suppose <code>mystuff.inc</code> is in version 1 format. At the top of the file
you could put:
</p>
<pre>
#local Temp_Vers = version; // Save previous value
#version 1.0; // Change to 1.0 mode
... // Version 1.0 stuff goes here...
#version Temp_Vers; // Restore previous version
</pre>
<p class="Note">
<strong>Note:</strong> there should be a semi-colon after the float expression in a <code>#version</code>
directive. If omitted, it generates a warning and some macros may not work properly.
</p>
<h4><a name="s03_02_01_04">3.2.1.4 </a>Vector Expressions</h4>
<a name="s03_02_01_04_i1"><a name="s03_02_01_04_i2"><a name="s03_02_01_04_i3"><a name="Vector"></a>
<p>
POV-Ray often requires you to specify a <em>vector</em>. A vector is a set of related float values. Vectors may be
specified using literals, identifiers or functions which return vector values. You may also create very complex vector
expressions from combinations of any of these using various familiar operators.
</p>
<p>
POV-Ray vectors may have from two to five components but the vast majority of vectors have three components. Unless
specified otherwise, you should assume that the word "vector" means a three component vector. POV-Ray
operates in a 3D x, y, z coordinate system and you will use three component vectors to specify x, y and z values. In
some places POV-Ray needs only two coordinates. These are often specified by a 2D vector called an <em> UV vector</em>.
Fractal objects use 4D vectors. Color expressions use 5D vectors but allow you to specify 3, 4 or 5 components and use
default values for the unspecified components. Unless otherwise noted, all 2, 4 or 5 component vectors work just like
3D vectors but they have a different number of components.
</p>
<p>
The syntax for combining vector literals into vector expressions is almost identical to the rules for float
expressions. In the syntax for vector expressions below, some of the syntax items are defined in the section for float
expressions. See "<a href="s_97.html#s03_02_01_03">Float Expressions</a>" for those definitions. Detailed
explanations of vector-specific issues are given in the following sub-sections.
</p>
<pre>
VECTOR:
NUMERIC_TERM [SIGN NUMERIC_TERM]
NUMERIC_TERM:
NUMERIC_FACTOR [MULT NUMERIC_FACTOR]
NUMERIC_FACTOR:
VECTOR_LITERAL |
VECTOR_IDENTIFIER |
SIGN NUMERIC_FACTOR |
VECTOR_FUNCTION |
VECTOR_BUILT-IN_IDENT |
( FULL_EXPRESSION ) |
! NUMERIC_FACTOR |
FLOAT
VECTOR_LITERAL:
< FLOAT , FLOAT , FLOAT >
VECTOR_FUNCTION:
min_extent ( OBJECT_IDENTIFIER ) |
max_extent ( OBJECT_IDENTIFIER ) |
trace(OBJECT_IDENTIFIER, VECTOR, VECTOR, [VECTOR_IDENTIFIER] )|
vaxis_rotate( VECTOR , VECTOR , FLOAT ) |
vcross( VECTOR , VECTOR ) |
vrotate( VECTOR , VECTOR ) |
vnormalize( VECTOR ) |
vturbulence(FLOAT, FLOAT, FLOAT, VECTOR)
VECTOR_BUILT-IN_IDENT:
x | y | z | t | u | v
</pre>
<p class="Note">
Note: <em>VECTOR_IDENTIFIERS</em> are identifiers previously declared to have vector values.
</p>
<h5><a name="s03_02_01_04_01">3.2.1.4.1 </a>Literals</h5>
<a name="s03_02_01_04_01_i1"><a name="s03_02_01_04_01_i2">
<p>
Vector literals consist of two to five float expressions that are bracketed by angle brackets <code><</code> and <code>></code>.
The terms are separated by commas. For example here is a typical three component vector:
</p>
<pre>
< 1.0, 3.2, -5.4578 >
</pre>
<p>
The commas between components are necessary to keep the program from thinking that the 2nd term is the single float
expression <code> 3.2-5.4578</code> and that there is no 3rd term. If you see an error message such as "Float
expected but '>' found instead" then you probably have missed a comma.
</p>
<p>
Sometimes POV-Ray requires you to specify floats and vectors side-by-side. The rules for vector expressions allow
for mixing of vectors with vectors or vectors with floats so commas are required separators whenever an ambiguity
might arise. For example <code> <1,2,3>-4</code> evaluates as a mixed float and vector expression where 4 is
subtracted from each component resulting in <code> <-3,-2,-1></code>. However the comma in <code>
<1,2,3>,-4</code> means this is a vector followed by a float.
</p>
<p>
Each component may be a full float expression. For example
</p>
<pre>
<This+3,That/3,5*Other_Thing>
</pre>
<p>
is a valid vector.
</p>
<h5><a name="s03_02_01_04_02">3.2.1.4.2 </a>Identifiers</h5>
<a name="s03_02_01_04_02_i1"><a name="s03_02_01_04_02_i2">
<p>
Vector identifiers may be declared to make scene files more readable and to parameterize scenes so that changing a
single declaration changes many values. An identifier is declared as follows.
</p>
<pre>
VECTOR_DECLARATION:
#declare IDENTIFIER = EXPRESSION; |
#local IDENTIFIER = EXPRESSION;
</pre>
<p>
Where <em>IDENTIFIER</em> is the name of the identifier up to 40 characters long and <em>EXPRESSION</em> is any
valid expression which evaluates to a vector value.
</p>
<p class="Note">
<strong>Note:</strong> there should be a semi-colon after the expression in a vector declaration. If
omitted, it generates a warning and some macros may not work properly. See " <a href="s_98.html#s03_02_02_02_02">#declare
vs. #local</a>" for information on identifier scope.
</p>
<p>
Here are some examples....
</p>
<pre>
#declare Here = <1,2,3>;
#declare There = <3,4,5>;
#declare Jump = <Foo*2,Bar-1,Bob/3>;
#declare Route = There-Here;
#declare Jump = Jump+<1,2,3>;
</pre>
<p class="Note">
<strong>Note:</strong> you invoke a vector identifier by using its name without any angle brackets. As
the last example shows, you can re-declare a vector identifier and may use previously declared values in that
re-declaration. There are several built-in identifiers which POV-Ray declares for you. See section "<a href="s_97.html#s03_02_01_04_06">Built-in
Vector Identifiers</a>" for details.
</p>
<h5><a name="s03_02_01_04_03">3.2.1.4.3 </a>Operators</h5>
<a name="s03_02_01_04_03_i1"><a name="Vector, operators"></a><a name="s03_02_01_04_03_i2"><a name="Operators, vector"></a>
<p>
Vector literals, identifiers and functions may also be combined in expressions the same as float values. Operations
are performed on a component-by-component basis. For example <code><1,2,3> + <4,5,6></code> evaluates the
same as <code><1+4,2+5,3+6></code> or <code><5,7,9></code>. Other operations are done on a similar
component-by-component basis. For example <code>(<1,2,3> = <3,2,1>)</code> evaluates to <code><0,1,0></code>
because the middle components are equal but the others are not. Admittedly this is not very useful but it is
consistent with other vector operations.
</p>
<p>
Conditional expressions such as <code>(C ? A : B)</code> require that <code> C</code> is a float expression but <code>A</code>
and <code>B</code> may be vector expressions. The result is that the entire conditional evaluates as a valid vector.
For example if <code>Foo</code> and <code> Bar</code> are floats then <code>(Foo < Bar ? <1,2,3> :
<5,6,7>)</code> evaluates as the vector <code><1,2,3></code> if <code>Foo</code> is less than <code> Bar</code>
and evaluates as <code> <5,6,7></code> otherwise.
</p>
<p>
<a name="s03_02_01_04_03_i3"><a name="t"></a><a name="s03_02_01_04_03_i4"><a name="u"></a><a name="s03_02_01_04_03_i5"><a name="v"></a><a name="s03_02_01_04_03_i6"><a name="x"></a><a name="s03_02_01_04_03_i7"><a name="y"></a><a name="s03_02_01_04_03_i8"><a name="z"></a>
You may use the dot operator to extract a single float component from a vector. Suppose the identifier <code> Spot</code>
was previously defined as a vector. Then <code>Spot.x</code> is a float value that is the first component of this x,
y, z vector. Similarly <code>Spot.y</code> and <code>Spot.z</code> reference the 2nd and 3rd components. If <code>Spot</code>
was a two component UV vector you could use <code>Spot.u</code> and <code>Spot.v</code> to extract the first and
second component. For a 4D vector use <code> .x</code>, <code> .y</code>, <code>.z</code>, and <code>.t</code> to
extract each float component. The dot operator is also used in color expressions which are covered later.
</p>
<h5><a name="s03_02_01_04_04">3.2.1.4.4 </a>Operator Promotion</h5>
<a name="s03_02_01_04_04_i1">
<p>
You may use a lone float expression to define a vector whose components are all the same. POV-Ray knows when it
needs a vector of a particular type and will promote a float into a vector if need be. For example the POV-Ray <code>scale</code>
statement requires a three component vector. If you specify <code>scale 5</code> then POV-Ray interprets this as <code>scale
<5,5,5></code> which means you want to scale by 5 in every direction.
</p>
<p>
Versions of POV-Ray prior to 3.0 only allowed such use of a float as a vector in various limited places such as <code>scale</code>
and <code> turbulence</code>. However you may now use this trick anywhere. For example...
</p>
<pre>
box{0,1} // Same as box{<0,0,0>,<1,1,1>}
sphere{0,1} // Same as sphere{<0,0,0>,1}
</pre>
<p>
When promoting a float into a vector of 2, 3, 4 or 5 components, all components are set to the float value, however
when promoting a vector of a lower number of components into a higher order vector, all remaining components are set
to zero. For example if POV-Ray expects a 4D vector and you specify <code>9</code> the result is <code><9,9,9,9></code>
but if you specify <code><7,6></code> the result is <code> <7,6,0,0></code>.
</p>
<h5><a name="s03_02_01_04_05">3.2.1.4.5 </a>Functions</h5>
<a name="s03_02_01_04_05_i1"><a name="Vector, functions"></a><a name="s03_02_01_04_05_i2"><a name="Functions, vector"></a>
<p>
POV-Ray defines a variety of built-in functions for manipulating floats, vectors and strings. Function calls
consist of a keyword which specifies the name of the function followed by a parameter list enclosed in parentheses.
Parameters are separated by commas. For example:
</p>
<pre>
keyword(param1,param2)
</pre>
<p>
The following are the functions which return vector values. They take one or more float, integer, vector, or string
parameters. Assume that <code> A</code> and <code>B</code> are any valid expression that evaluates to a vector; and <code>F</code>
is any float expression.<a name="s03_02_01_04_05_i3"><a name="min_extent"></a><a name="s03_02_01_04_05_i4"><a name="max_extent"></a>
</p>
<p>
<code>min_extent(OBJECT_IDENTIFIER), max_extent(OBJECT_IDENTIFIER)</code>. The <code>min_extent</code> and <code>max_extent</code>
return the minimum and maximum coordinates of a #declared object's bounding box (Corner1 and Corner2), in effect
allowing you to find the dimensions and location of the object.
</p>
<p class="Note">
<strong>Note:</strong> this is not perfect, in some cases (such as CSG intersections and differences
or isosurfaces) the bounding box does not represent the actual dimensions of the object.
</p>
<p>
Example:
</p>
<pre>
#declare Sphere =
sphere {
<0,0,0>, 1
pigment { rgb <1,0,0> }
}
#declare Min = min_extent ( Sphere );
#declare Max = max_extent ( Sphere );
object { Sphere }
box {
Min, Max
pigment { rgbf <1,1,1,0.5> }
}
</pre>
<a name="s03_02_01_04_05_i5"><a name="trace"></a>
<p>
<code>trace(OBJECT_IDENTIFIER, A, B, [VECTOR_IDENTIFIER])</code>. <code>trace</code> helps you finding the exact
location of a ray intersecting with an object's surface. It traces a ray beginning at the point <code>A</code> in the
direction specified by the vector <code>B</code>. If the ray hits the specified object, this function returns the
coordinate where the ray intersected the object. If not, it returns <code><0,0,0></code>. If a fourth parameter
in the form of a vector identifier is provided, the normal of the object at the intersection point (not including any
normal perturbations due to textures) is stored into that vector. If no intersection was found, the normal vector is
reset to <code><0,0,0></code>.
</p>
<p class="Note">
<strong>Note:</strong> Checking the normal vector for <code><0,0,0></code> is the only reliable
way to determine whether an intersection has actually occurred, intersections can and do occur anywhere, including at <code><0,0,0></code>.
</p>
<p>
Example:
</p>
<pre>
#declare MySphere = sphere { <0, 0, 0>, 1 }
#declare Norm = <0, 0, 0>;
#declare Start = <1, 1, 1>;
#declare Inter=
trace ( MySphere, Start, <0, 0, 0>-Start, Norm );
object {
MySphere
texture {
pigment { rgb 1}
}
}
#if (vlength(Norm)!=0)
cylinder {
Inter, Inter+Norm, .1
texture {
pigment {color red 1}
}
}
#end
</pre>
<a name="s03_02_01_04_05_i6"><a name="vaxis_rotate"></a>
<p>
<code>vaxis_rotate(A,B,F)</code> Rotate <code>A</code> about <code> B</code> by <code>F</code>. Given the x,y,z
coordinates of a point in space designated by the vector <code>A</code>, rotate that point about an arbitrary axis
defined by the vector <code>B</code>. Rotate it through an angle specified in degrees by the float value <code>F</code>.
The result is a vector containing the new x,y,z coordinates of the point.<a name="s03_02_01_04_05_i7"><a name="vcross"></a>
</p>
<p>
<code>vcross(A,B)</code> Cross product of <code>A</code> and <code>B</code>. Returns a vector that is the vector
cross product of the two vectors. The resulting vector is perpendicular to the two original vectors and its length is
equal to the area of the parallelogram defined by them. Or to put in an other way, the cross product can also be
formulated as:<em><code> AxB = |A| * |B| * sin(angle(A,B)) * perpendicular_unit_vector(A,B) </code></em> So the length
of the resulting vector is proportional to the sine of the angle between <code>A</code> and <code>B</code>. See the
animated demo scene <code>VECT2.POV</code> for an illustration.<a name="s03_02_01_04_05_i8"><a name="vnormalize"></a>
</p>
<p>
<code>vnormalize(A)</code> Normalize vector <code> A</code>. Returns a unit length vector that is the same
direction as <code> A</code>. Formula is <em> vnormalize(A)=A/vlength(A)</em>.
</p>
<p class="Warning">
<strong>Note:</strong><code>vnormalize(<0,0,0>)</code> will result in an error.<a name="s03_02_01_04_05_i9"><a name="vrotate"></a>
</p>
<p>
<code>vrotate(A,B)</code> Rotate <code> A</code> about origin by <code> B</code>. Given the x,y,z coordinates of a
point in space designated by the vector <code>A</code>, rotate that point about the origin by an amount specified by
the vector <code>B</code>. Rotate it about the x-axis by an angle specified in degrees by the float value <code> B.x</code>.
Similarly <code> B.y</code> and <code>B.z</code> specify the amount to rotate in degrees about the y-axis and z-axis.
The result is a vector containing the new x,y,z coordinates of the point.<a name="s03_02_01_04_05_i10"><a name="vturbulence"></a>
</p>
<p>
<code>vturbulence(Lambda, Omega, Octaves, A)</code> Turbulence vector at A. Given the x,y,z coordinates of a point
in space designated by the vector A, return the turbulence vector for that point based on the numbers given for
Lambda, Omega and Octaves. For the meaning of the parameters, check out the Lambda, Omega and Octaves sections.<br>
The amount of turbulence can be controlled by multiplying the turbulence vector by a multiple. The frequency at which
the turbulence vector changes can be controlled by multiplying A with a multiple. The turbulence vector returned by
the function can be added to the original point A to obtain a turbulated version of the point A. Example :<br> <code>#declare
MyVector = MyVector + Amount * vturbulence(2, 0.5, 6, MyVector * Frequency);</code>
</p>
<p>
See section "<a href="s_97.html#s03_02_01_03_04">Float Functions</a>" for other functions which are
somewhat vector-related but which return floats. In addition to the above built-in functions, you may also define your
own functions using the <code>#macro</code> directive. See the section "<a href="s_98.html#s03_02_02_08">User
Defined Macros</a>" for more details.
</p>
<h5><a name="s03_02_01_04_06">3.2.1.4.6 </a>Built-in Constants</h5>
<a name="s03_02_01_04_06_i1"><a name="Vector, built-in identifiers"></a>
<p>
There are several built-in vector identifiers. You can use them to specify values or to create expressions but you
cannot re-declare them to change their values. They are:
</p>
<pre>
VECTOR_BUILT-IN_IDENT:
x | y | z | t | u | v
</pre>
<p>
All built-in vector identifiers never change value. They are defined as though the following lines were at the
start of every scene.
</p>
<pre>
#declare x = <1, 0, 0>;
#declare y = <0, 1, 0>;
#declare z = <0, 0, 1>;
#declare t = <0, 0, 0, 1>;
#declare u = <1, 0>;
#declare v = <0, 1>;
</pre>
<p>
The built-in vector identifiers <code>x</code>, <code>y</code>, and <code> z</code> provide much greater
readability for your scene files when used in vector expressions. For example....
</p>
<pre>
plane { y, 1} // The normal vector is obviously "y".
plane { <0,1,0>, 1} // This is harder to read.
translate 5*x // Move 5 units in the "x" direction.
translate <5,0,0> // This is less obvious.
</pre>
<p>
An expression like <code>5*x</code> evaluates to <code> 5*<1,0,0></code> or <code><5,0,0></code>.
</p>
<p>
Similarly <code> u</code> and <code>v</code> may be used in 2D vectors. When using 4D vectors you should use <code>x</code>,
<code>y</code>, <code> z</code>, and <code> t</code> and POV-Ray will promote <code>x</code>, <code> y</code>, and <code>
z</code> to 4D when used where 4D is required.
</p>
<h4><a name="s03_02_01_05">3.2.1.5 </a>Specifying Colors</h4>
<a name="s03_02_01_05_i1">
<pre>
COLOR:
COLOR_BODY |
color COLOR_BODY | (this means the keyword color or
colour COLOR_BODY colour may optionally precede
any color specification)
COLOR_BODY:
COLOR_VECTOR |
COLOR_KEYWORD_GROUP |
COLOR_IDENTIFIER
COLOR_VECTOR:
rgb <3_Term_Vector> |
rgbf <4_Term_Vector> |
rgbt <4_Term_Vector> |
[ rgbft ] <5_Term_Vector>
COLOR_KEYWORD_GROUP:
[ COLOR_KEYWORD_ITEM ]...
COLOR_KEYWORD_ITEM:
COLOR_IDENTIFIER |
red Red_Amount |
blue Blue_Amount |
green Green_Amount |
filter Filter_Amount |
transmit Transmit_Amount
</pre>
<p class="Note">
<strong>Note:</strong> <em>COLOR_IDENTIFIERS</em> are identifiers previously declared to have color
values. The 3, 4, and 5 term vectors are usually vector literals but may be vector expressions or floats promoted to
vectors. See "Operator Promotion" and the sections below.<a name="s03_02_01_05_i2"><a name="color"></a><a name="s03_02_01_05_i3"><a name="colour"></a><a name="s03_02_01_05_i4"><a name="filter"></a><a name="s03_02_01_05_i5"><a name="transmit"></a>
</p>
<p>
POV-Ray often requires you to specify a color. Colors consist of five values or color components. The first three
are called <code>red</code>, <code>green</code>, and <code>blue</code>. They specify the intensity of the primary
colors red, green and blue using an additive color system like the one used by the red, green and blue color phosphors
on a color monitor.
</p>
<p>
The 4th component, called <code>filter</code>, specifies the amount of filtered transparency of a substance. Some
real-world examples of filtered transparency are stained glass windows or tinted cellophane. The light passing through
such objects is tinted by the appropriate color as the material selectively absorbs some frequencies of light while
allowing others to pass through. The color of the object is subtracted from the light passing through so this is
called subtractive transparency.
</p>
<p>
The 5th component, called <code>transmit</code>, specifies the amount of non-filtered light that is transmitted
through a surface. Some real-world examples of non-filtered transparency are thin see-through cloth, fine mesh netting
and dust on a surface. In these examples, all frequencies of light are allowed to pass through tiny holes in the
surface. Although the amount of light passing through is diminished, the color of the light passing through is
unchanged.
</p>
<p>
The color of the object and the color transmitted through the object together contribute 100% of the final color.
So if <code>transmit</code> is set to 0.9, the transmitted color contributes 90% and the color of the object
contributes only 10%. This is also true outside of the 0-1 range, so for example if <code>transmit</code> is set to
1.7, the transmitted color contributes with 170% and the color of the object contributes with minus 70%. Using <code>transmit</code>
values outside of the 0-1 range can be used to create interesting special effects, but does not correspond to any
phenomena seen in the real world. An example:
</p>
<pre>
#version 3.5;
global_settings {assumed_gamma 1.0}
camera {location -2.5*z look_at 0 orthographic}
box {
0,1
texture {
pigment {
gradient y
colour_map {
[0, red 1]
[1, blue 1]
}
}
finish{ambient 1}
}
texture {
pigment {
gradient x
colour_map {
[0, rgb 0.5 transmit -3]
[1, rgb 0.5 transmit 3]
}
}
finish{ambient 1}
}
translate <-0.5,-0.5,0>
scale <3,2,1>
}
</pre>
<p>
When using the <code>transmit</code> value for special effects, you can visualize it this way: The <code>transmit</code>
value means "contrast". 1.0 is no change in contrast, 0.5 is half contrast, 2.0 is double contrast and so
on. You could say that <code>transmit</code> "scales" the colors. The color of the object is the
"center value". All colors will get closer to the "center value" if <code>transmit</code> is
between 0 and 1, and all colors will spread away from the "center value" if <code>transmit</code> is greater
than 1. If <code>transmit</code> is negative the colors will be inverted around the "center value". Rgb 0.5
is common to use as "center value", but other values can be used for other effects. The "center
value" really is a color, and non-gray colors can be used for interesting effects. The red, green and blue
components are handled separately.
</p>
<p class="Note">
<strong>Note:</strong> early versions of POV-Ray used the keyword <code>alpha</code> to specify
filtered transparency. However that word is often used to describe non-filtered transparency. For this reason <code>alpha</code>
is no longer used.
</p>
<p>
Each of the five components of a color are float values which are normally in the range between 0.0 and 1.0.
However any values, even negatives may be used.
</p>
<p>
Under most circumstances the keyword <code>color</code> is optional and may be omitted. We also support the British
or Canadian spelling <code> colour</code>. Colors may be specified using vectors, keywords with floats or identifiers.
You may also create very complex color expressions from combinations of any of these using various familiar operators.
The syntax for specifying a color has evolved since POV-Ray was first released. We have maintained the original
keyword-based syntax and added a short-cut vector notation. Either the old or new syntax is acceptable however the
vector syntax is easier to use when creating color expressions.
</p>
<p>
The syntax for combining color literals into color expressions is almost identical to the rules for vector and
float expressions. In the syntax for vector expressions, some of the syntax items are defined in the section for float
expressions. See "<a href="s_97.html#s03_02_01_03">Float Expressions</a>" for those definitions. Detailed
explanations of color-specific issues are given in the following sub-sections.
</p>
<h5><a name="s03_02_01_05_01">3.2.1.5.1 </a>Color Vectors</h5>
<a name="s03_02_01_05_01_i1"><a name="s03_02_01_05_01_i2"><a name="s03_02_01_05_01_i3"><a name="rgb"></a>
<p>
The syntax for a color vector is...
</p>
<pre>
COLOR_VECTOR:
rgb <3_Term_Vector> |
rgbf <4_Term_Vector> |
rgbt <4_Term_Vector> |
[ rgbft ] <5_Term_Vector>
</pre>
<p>
...where the vectors are any valid vector expressions of 3, 4 or 5 components. For example
</p>
<pre>
color rgb <1.0, 0.5, 0.2>
</pre>
<p>
This specifies a color whose red component is 1.0 or 100% of full intensity. The green component is 0.5 or 50% of
full intensity and the blue component is 0.2 or 20% of full intensity. Although the filter and transmit components are
not explicitly specified, they exist and are set to their default values of 0 or no transparency.
</p>
<p>
<a name="s03_02_01_05_01_i4"><a name="rgbf"></a><a name="s03_02_01_05_01_i5"><a name="rgbt"></a><a name="s03_02_01_05_01_i6"><a name="rgbft"></a>
The <code>rgbf</code> keyword requires a four component vector. The 4th component is the filter component and the
transmit component defaults to zero. Similarly the <code> rgbt</code> keyword requires four components where the 4th
value is moved to the 5th component which is transmit and then the filter component is set to zero.
</p>
<p>
The <code>rgbft</code> keyword allows you to specify all five components. Internally in expressions all five are
always used.
</p>
<p>
Under some circumstances, if the vector expression is a 5 component expression or there is a color identifier in
the expression then the <code> rgbtf</code> keyword is optional.
</p>
<h5><a name="s03_02_01_05_02">3.2.1.5.2 </a>Color Keywords</h5>
<a name="s03_02_01_05_02_i1"><a name="s03_02_01_05_02_i2"><a name="s03_02_01_05_02_i3"><a name="red"></a><a name="s03_02_01_05_02_i4"><a name="green"></a><a name="s03_02_01_05_02_i5"><a name="blue"></a>
<p>
The older keyword method of specifying a color is still useful and many users prefer it.
</p>
<pre>
COLOR_KEYWORD_GROUP:
[ COLOR_KEYWORD_ITEM ]...
COLOR_KEYWORD_ITEM:
COLOR_IDENTIFIER |
red Red_Amount | blue Blue_Amount | green Green_Amount |
filter Filter_Amount | transmit Transmit_Amount
</pre>
<p>
Although the <code>color</code> keyword at the beginning is optional, it is more common to see it in this usage.
This is followed by any of five additional keywords <code>red</code>, <code>green</code>, <code> blue</code>, <code>filter</code>,
or <code>transmit</code>. Each of these component keywords is followed by a float expression. For example
</p>
<pre>
color red 1.0 green 0.5
</pre>
<p>
This specifies a color whose red component is 1.0 or 100% of full intensity and the green component is 0.5 or 50%
of full intensity. Although the blue, filter and transmit components are not explicitly specified, they exist and are
set to their default values of 0. The component keywords may be given in any order and if any component is unspecified
its value defaults to zero. A <em>COLOR_IDENTIFIER</em> can also be specified but it should always be first in the
group. See "<a href="s_97.html#s03_02_01_05_05">Common Color Pitfalls</a>" for details.
</p>
<h5><a name="s03_02_01_05_03">3.2.1.5.3 </a>Color Identifiers</h5>
<a name="s03_02_01_05_03_i1"><a name="s03_02_01_05_03_i2">
<p>
Color identifiers may be declared to make scene files more readable and to parameterize scenes so that changing a
single declaration changes many values. An identifier is declared as follows.
</p>
<pre>
COLOR_DECLARATION:
#declare IDENTIFIER = COLOR; |
#local IDENTIFIER = COLOR;
</pre>
<p>
Where <em>IDENTIFIER</em> is the name of the identifier up to 40 characters long and <em>COLOR</em> is any valid
specification.
</p>
<p class="Note">
<strong>Note:</strong> there should be a semi-colon at the end of the declaration. If omitted, it
generates a warning and some macros may not work properly. See " <a href="s_98.html#s03_02_02_02_02">#declare vs.
#local</a>" for information on identifier scope.
</p>
<p>
Here are some examples....
</p>
<pre>
#declare White = rgb <1,1,1>;
#declare Cyan = color blue 1.0 green 1.0;
#declare Weird = rgb <Foo*2,Bar-1,Bob/3>;
#declare LightGray = White*0.8;
#declare LightCyan = Cyan red 0.6;
</pre>
<p>
As the <code>LightGray</code> example shows you do not need any color keywords when creating color expressions
based on previously declared colors. The last example shows you may use a color identifier with the keyword style
syntax. Make sure that the identifier comes first before any other component keywords.
</p>
<p>
Like floats and vectors, you may re-define colors throughout a scene but the need to do so is rare.
</p>
<h5><a name="s03_02_01_05_04">3.2.1.5.4 </a>Color Operators</h5>
<a name="s03_02_01_05_04_i1"><a name="s03_02_01_05_04_i2"><a name="s03_02_01_05_04_i3"><a name="gray"></a>
<p>
Color vectors may be combined in expressions the same as float or vector values. Operations are performed on a
component by component basis. For example <code>rgb <1.0,0.5,0.2>*0.9</code> evaluates the same as <code>
rgb<1.0,0.5,0.2>*<0.9,0.9,0.9></code> or <code> rgb<0.9,0.45,0.18></code>. Other operations are done
on a similar component by component basis.
</p>
<p>
You may use the dot operator to extract a single component from a color. Suppose the identifier <code>Shade</code>
was previously defined as a color. Then <code>Shade.red</code> is the float value of the red component of <code> Shade</code>.
Similarly <code> Shade.green</code>, <code>Shade.blue</code>, <code>Shade.filter</code> and <code>Shade.transmit</code>
extract the float value of the other color components. <code>shade.gray</code> returns the gray value of the color
vector.
</p>
<h5><a name="s03_02_01_05_05">3.2.1.5.5 </a>Common Color Pitfalls</h5>
<a name="s03_02_01_05_05_i1"><a name="s03_02_01_05_05_i2">
<p>
The variety and complexity of color specification methods can lead to some common mistakes. Here are some things to
consider when specifying a color.
</p>
<p>
When using filter transparency, the colors which come through are multiplied by the primary color components. For
example if gray light such as <code> rgb<0.9,0.9,0.9></code> passes through a filter such as <code>
rgbf<1.0,0.5,0.0,1.0></code> the result is <code> rgb<0.9,0.45,0.0></code> with the red let through 100%,
the green cut in half from 0.9 to 0.45 and the blue totally blocked. Often users mistakenly specify a clear object by
</p>
<pre>
color filter 1.0
</pre>
<p>
but this has implied red, green and blue values of zero. You have just specified a totally black filter so no light
passes through. The correct way is either
</p>
<pre>
color red 1.0 green 1.0 blue 1.0 filter 1.0
</pre>
<p>
or
</p>
<pre>
color transmit 1.0
</pre>
<p>
In the 2nd example it does not matter what the rgb values are. All of the light passes through untouched. Another
pitfall is the use of color identifiers and expressions with color keywords. For example...
</p>
<pre>
color My_Color red 0.5
</pre>
<p>
this substitutes whatever was the red component of <code>My_Color</code> with a red component of 0.5 however...
</p>
<pre>
color My_Color + red 0.5
</pre>
<p>
adds 0.5 to the red component of <code>My_Color</code> and even less obvious...
</p>
<pre>
color My_Color * red 0.5
</pre>
<p>
that cuts the red component in half as you would expect but it also multiplies the green, blue, filter and transmit
components by zero! The part of the expression after the multiply operator evaluates to <code> rgbft<0.5,0,0,0,0></code>
as a full 5 component color.
</p>
<p>
The following example results in no change to <code>My_Color</code>.
</p>
<pre>
color red 0.5 My_Color
</pre>
<p>
This is because the identifier fully overwrites the previous value. When using identifiers with color keywords, the
identifier should be first. Another issue to consider: some POV-Ray syntax allows full color specifications but only
uses the rgb part. In these cases it is legal to use a float where a color is needed. For example:
</p>
<pre>
finish { ambient 1 }
</pre>
<p>
The <a href="#l60">ambient</a> keyword expects a color so the value <code>1</code> is promoted to <code><1,1,1,1,1></code>
which is no problem. However
</p>
<pre>
pigment { color 0.4 }
</pre>
<p>
is legal but it may or may not be what you intended. The <code> 0.4</code> is promoted to <code><0.4,0.4,0.4,0.4,0.4></code>
with the filter and transmit set to 0.4 as well. It is more likely you wanted...
</p>
<pre>
pigment { color rgb 0.4 }
</pre>
<p>
in which case a 3 component vector is expected. Therefore the <code> 0.4</code> is promoted to <code><0.4,0.4,0.4,0.0,0.0></code>
with default zero for filter and transmit. Finally there is another problem which arises when using color dot
operators in <code>#declare</code> or <code> #local</code> directives. Consider the directive:
</p>
<pre>
#declare MyColor = rgb <0.75, 0.5, 0.75>;
#declare RedAmt = MyColor.red;
</pre>
<p>
Now <code>RedAmt</code> should be a float but unfortunately it is a color. POV-Ray looks at the first keyword after
the equals to try to guess what type of identifier you want. It sees the color identifier <code> MyColor</code> and
assumes you want to declare a color. It then computes the float value as 0.75 then promotes that into <code>
rgbft<0.75,0.75,0.75,0.75,0.75></code>. It would take a major rewrite to fix this problem so we are just warning
you about it. Any of the following work-arounds will work properly.
</p>
<pre>
#declare RedAmt = 0.0+MyColor.red;
#declare RedAmt = 1.0*MyColor.red;
#declare RedAmt = (MyColor.red);
</pre>
<h4><a name="s03_02_01_06">3.2.1.6 </a>User-Defined Functions</h4>
<a name="s03_02_01_06_i1"><a name="Functions, user-defined"></a><a name="s03_02_01_06_i2"><a name="Functions"></a><a name="s03_02_01_06_i3"><a name="function"></a>
<p>
Some objects allow you to specify functions that will be evaluated while rendering to determine the surface of
these objects. In this respect functions are quite different to <a href="#l118">macros</a>, which are evaluated at
parse time but do not otherwise affect rendering. Additionally you may call these functions anywhere a Float Function
is allowed, even during parsing. The syntax is identical to Float Expressions, however, only float functions that
apply to float values may be used. Excluded are for example <code><a href="s_97.html#s03_02_01_03_04">strlen</a></code>
or <code><a href="s_97.html#s03_02_01_03_04">vlength</a></code>. You find a full list of supported float functions in
the syntax definition below.
</p>
<pre>
FLOAT:
LOGIC_AND [OR LOGIC_AND]
OR:
|
LOGIC_AND:
REL_TERM [AND REL_TERM]
AND:
&
REL_TERM:
TERM [REL_OPERATOR TERM]
REL_OPERATOR:
< | <= | >= | > | = | !=
TERM:
FACTOR [SIGN FACTOR]
SIGN:
+ | -
FACTOR:
MOD_EXPRESSION [MULT MOD_EXPRESSION]
MULT:
* | /
EXPRESSION:
FLOAT_LITERAL |
FLOAT_IDENTIFIER |
FLOAT_FUNCTION |
FLOAT_BUILT-IN_IDENT |
FUNCTION_IDENTIFIER |
( FLOAT ) |
IDENTIFIER |
SIGN EXPRESSION
FLOAT_FUNCTION:
abs( FLOAT ) | acos( FLOAT ) | acosh( FLOAT ) | asin( FLOAT ) |
asinh( FLOAT ) | atan( FLOAT) | atanh( FLOAT) |
atan2( FLOAT , FLOAT ) | ceil( FLOAT ) | cos( FLOAT ) |
cosh( FLOAT ) | degrees( FLOAT ) | exp( FLOAT ) |
floor( FLOAT ) | int( FLOAT ) | ln (Float) | log( FLOAT ) |
max( FLOAT , FLOAT, ... ) | min( FLOAT , FLOAT, ... ) |
mod( FLOAT , FLOAT ) | pow( FLOAT , FLOAT ) |
radians( FLOAT ) | sin( FLOAT ) | sinh( FLOAT ) |
sqrt( FLOAT ) | tan( FLOAT ) | tanh( FLOAT ) |
select( FLOAT , FLOAT , FLOAT [, FLOAT] )
FUNCTION_IDENTIFIER:
#local FUNCTION_IDENTIFIER = function { FLOAT } |
#declare FUNCTION_IDENTIFIER = function { FLOAT } |
#local FUNCTION_IDENTIFIER = function(IDENT_LIST) { FLOAT } |
#declare FUNCTION_IDENTIFIER = function(IDENT_LIST) { FLOAT } |
#local FUNCTION_IDENTIFIER = function{SPECIAL_FLOAT_FUNCTION} |
#local VECTOR_IDENTIFIER = function{SPECIAL_VECTOR_FUNCTION} |
#local COLOR_IDENTIFIER = function { SPECIAL_COLOR_FUNCTION } |
IDENT_LIST:
IDENT_ITEM [, IDENT_LIST]
IDENT_ITEM:
x | y | z | u | v | IDENTIFIER
(Note: x = u and y = v)
SPECIAL_FLOAT_FUNCTION:
pattern { PATTERN_BLOCK }
SPECIAL_VECTOR_FUNCTION:
TRANSFORMATION_BLOCK | SPLINE
SPECIAL_COLOR_FUNCTION:
PIGMENT
PATTERN_BLOCK:
PATTERN
</pre>
<p class="Note">
<strong>Note:</strong> Only the above mentioned items can be used in user-defined functions. For
example the rand() function is not available.
</p>
<p>
All of the above mentioned float functions are described in the section <a href="s_97.html#s03_02_01_03_04">Float
Functions</a>.
</p>
<h5><a name="s03_02_01_06_01">3.2.1.6.1 </a>Sum and Product functions</h5>
<a name="s03_02_01_06_01_i1"><a name="prod"></a>
<p>
<code>prod(i, b, n, a)</code> The product function.
</p>
<p>
<br><center><img alt="product function" src="images/reference/prod.png"></center><a name="s03_02_01_06_01_i2"><a name="sum"></a>
</p>
<p>
<code>sum(i, b, n, a)</code> The sum function.
</p>
<p>
<br><center><img alt="sum function" src="images/reference/sum.png"></center>
</p>
<p>
For both <code>prod</code> and <code>sum</code>: <code>i</code> is any variable name and <code>a</code> is any
expression, usually depending on <code>i</code>. <code>b</code> and <code>n</code> are also any expression. <br>Example:
</p>
<pre>
#declare factorial = function(C) { prod(i, 1, C, i) }
#declare A = factorial(5);
</pre>
<p>
The first parameter is the name of the iteration variable. The second is the initial value expression and the third
is the final value expression. Those may not depend on the iteration variable but the iteration variable may still be
used inside those two expressions (because it happens to already have been defined) but its value is undefined. The
last expression is the actual expression which will be iterated through. It may use any variable in scope.
</p>
<p>
The scope of an iteration variable is the sequence operation function. That is, a iteration variable is only
defined when used inside the <code>sum/prod</code> function. Of course <code>sum/prod</code> functions may be nested.
However, there is one limit of a maximum of 56 local variable defined simultaneously, which essentially means that in
any combination <code>sum/prod</code> functions cannot be nested deeper than 56 levels.
</p>
<p>
The iteration variable is incremented by one for each step, but its initial and final value may be any value. The
iteration will be continued as long as the iteration value is less or equal to the final value.
</p>
<p class="Note">
<strong>Note:</strong> because the iteration value is a floating-point variable, adding one will add a
certain bias in a long iterations and thus the floating-point precision will be an issue in such a case and needs to
be considered by allowing a reasonable error for the final value!
</p>
<p>
If the expression to be added has a negative sign it will of course in effect be substracted. Thus changing the
sign will allow to generate negative values in the sum function. Equally multiplying by <code>1/expression</code>
effectively creates a division when used in the prod function.
</p>
<p>
Obviously to work in the first place the initial value of the result is the neutral element of the operation. That
is, a sum calculation starts with <code>0</code> and a product calculation starts with <code>1</code> just like it is
assumed in the sum and product functions in 'regular' math.
</p>
<p>
It should be noted that mathematically either sum or product are redundant because:
</p>
<pre>
log10(prod(i, b, n, a)) = sum(i, b, n, log10(a))
</pre>
<p>
which implies a sum can be represented as a product and vice versa, observing the usual mathematical constraints of
logarithms, of course. However, as logarithms and their inverse (powers) are slow to compute both are provided...
</p>
<h5><a name="s03_02_01_06_02">3.2.1.6.2 </a>Functions and Macros</h5>
<a name="s03_02_01_06_02_i1"><a name="Functions, vs. macros"></a><a name="s03_02_01_06_02_i2"><a name="Macros, vs. functions"></a>
<p>
You can use macros in functions, but the macros will be called only once when the function is defined, not every
time the function is called. You cannot pass function variables to the macros.
</p>
<p>
You can pass functions to macros, how to do this is best explained by an example:
</p>
<pre>
#macro Foo( Bar, X )
#declare Y = Bar(X);
#declare Z = Bar(Y);
#end
#declare FUNC=function(n){n+2}
Foo(FUNC, 1)
#debug str(Y,5,5)
#debug "n"
#debug str(Z,5,5)
#debug "n"
</pre>
<h5><a name="s03_02_01_06_03">3.2.1.6.3 </a>Declaring User-Defined Float Functions</h5>
<a name="s03_02_01_06_03_i1"><a name="s03_02_01_06_03_i2">
<p>
You declare a user defined function using the <code>#declare</code> or <code>#local</code> directives. By default a
function takes three parameters and you do not have to explicitly specify the parameter names. The default three
parameters are <code>x</code>, <code>y</code> and <code>z</code>. For example:
</p>
<pre>
#declare foo = function { x + y * z }
</pre>
<p>
If you need fewer or more parameters you have to explicitly specify the parameter list.
</p>
<p class="Note">
<strong>Note:</strong> <code>x</code> and <code>u</code> as well as <code>y</code> and <code>v</code>
are equivalent so you may not specify both parameter names. You may not specify two or more parameters with the same
name either. Doing so may result in a parse error or undefined function results.
</p>
<p>
The following are valid functions with parameters:
</p>
<pre>
#declare foo2 = function(x, y, z) { x + y * z }
#declare foo3 = function(k1, k2, z, y) { x + y * z + k1 * y + k2 }
#declare foo4 = function(h) { h * h + h }
#declare foo4 = function(u, v) { x + y * v } //=u + v*v
#declare foo4 = function(x, v, z) { u + y * v + z } //=x + v*v + z
</pre>
<p>
<strong>Limits:</strong>
</p>
<ul>
<li>
The minimum number of parameters per function is 1.
</li>
<li>
The maximum number of allowed parameters per function is 56.
</li>
<li>
The maximum number of <code>function</code> blocks per scene is 1048575.
</li>
<li>
The maximum number of operators per function is about 200000. Individual limits will be different depending on
the types of operators used in the function.
</li>
<li>
The maximum depth for nesting functions is 1024.
</li>
<li>
The maximum number of constants in all functions 1048575.
</li>
</ul>
<p class="Note">
<strong>Note:</strong> Redeclaring functions, directly, is not allowed. The way to do this is to <code>undef</code>
it first.<a name="s03_02_01_06_03_i3"><a name="pattern"></a>
</p>
<p>
There is one special float function type. You may declare a <code>pattern</code> function.
</p>
<p class="Note">
<strong>Note:</strong> the syntax is identical to that of patterns, however, you may not specify
colors. Its result is always a float and not a color vector, as returned by a function containing a pigment.
</p>
<pre>
#declare foo = function {
pattern {
checker
}
}
</pre>
<p class="Note">
<strong>Note:</strong> the number of parameters of special function types is determined automatically,
so you do not need to specify parameter names.
</p>
<h5><a name="s03_02_01_06_04">3.2.1.6.4 </a>Declaring User-Defined Vector Functions</h5>
<a name="s03_02_01_06_04_i1"><a name="s03_02_01_06_04_i2">
<p>
Right now you may only declare vector functions using one of the special function types. Supported types are <code>transform</code>
and <code>spline</code> functions. For example:
</p>
<pre>
#declare foo = function {
transform {
rotate <90, 0, 0>
scale 4
}
}
#declare myvector = foo(4, 3, 7);
#declare foo2 = function {
spline {
linear_spline
0.0, <0,0,0>
0.5, <1,0,0>
1.0, <0,0,0>
}
}
#declare myvector2 = foo2(0.7);
</pre>
<p>
Function splines take the vector size into account. That is, a function containing a spline with five components
will also return a five component vector (aka a color), a function containing a spline with two components will only
return a two component vector and so on.
</p>
<p class="Note">
<strong>Note:</strong> the number of parameters of special function types is determined automatically,
so you do not need to specify parameter names.
</p>
<h5><a name="s03_02_01_06_05">3.2.1.6.5 </a>Declaring User-Defined Color Functions</h5>
<a name="s03_02_01_06_05_i1"><a name="s03_02_01_06_05_i2">
<p>
Right now you may only declare color functions using one of the special function types. The only supported type is
the <code>pigment</code> function. You may use every valid <code>pigment</code>. This is a very simple example:
</p>
<pre>
#declare foo = function {
pigment {
color red 1
}
}
#declare Vec = foo(1,2,3)
</pre>
<p>
An example using a pattern:
</p>
<pre>
#declare foo = function {
pigment {
crackle
color_map {
[0.3, color Red]
[1.0, color Blue]
}
}
}
#declare Val = foo(2,3,4).gray
</pre>
<p class="Note">
<strong>Note:</strong> the number of parameters of special function types is determined automatically,
so you do not need to specify parameter names.
</p>
<h5><a name="s03_02_01_06_06">3.2.1.6.6 </a>Internal Pre-Defined Functions</h5>
<a name="s03_02_01_06_06_i1"><a name="s03_02_01_06_06_i2"><a name="internal"></a>
<p>
Several functions are pre-defined. These internal functions can be accessed through the <a href="s_138.html#s03_07_07">"functions.inc"</a>,
so it should be included in your scene. <br>The number of required parameters and what they control are also given in
the include file, but the <a href="s_138.html#s03_07_07">"functions.inc"</a> chapter in the "Standard
Include File" section gives more information.
</p>
<h4><a name="s03_02_01_07">3.2.1.7 </a>Strings</h4>
<a name="s03_02_01_07_i1"><a name="Strings"></a>
<p>
The POV-Ray language requires you to specify a string of characters to be used as a file name, text for messages or
text for a text object. Strings may be specified using literals, identifiers or functions which return string values.
See "<a href="s_97.html#s03_02_01_07_03">String Functions</a>" for details on string functions. Although you
cannot build string expressions from symbolic operators such as are used with floats, vectors or colors, you may
perform various string operations using string functions. Some applications of strings in POV-Ray allow for
non-printing formatting characters such as newline or form-feed.
</p>
<pre>
STRING:
STRING_FUNCTION |
STRING_IDENTIFIER |
STRING_LITERAL STRING_LITERAL:
"up to 256 ASCII characters"
STRING_FUNCTION:
str( FLOAT , INT , INT ) |
concat( STRING , STRING , [STRING ,...]) | chr( INT ) |
substr( STRING , INT , INT ) | strupr( STRING ) |
strlwr( STRING ) | vstr( INT, VECTOR, STRING, INT, INT )
</pre>
<h5><a name="s03_02_01_07_01">3.2.1.7.1 </a>String Literals</h5>
<a name="s03_02_01_07_01_i1"><a name="s03_02_01_07_01_i2"><a name="s03_02_01_07_01_i3">
<p>
String literals begin with a double quote mark '"' which is followed by up to 256 characters and are
terminated by another double quote mark. You can change the character set of strings using the <code><a href="#l75">global_settings</a></code>
<code><a href="s_102.html#s03_03_03_06">charset</a></code> option. The following are all valid string literals:
</p>
<p>
"Here" "There" "myfile.gif" "textures.inc"
</p>
<p class="Note">
<strong>Note:</strong> if you need to specify a quote mark in a string literal you must precede it
with a backslash.
</p>
<p>
Example
</p>
<pre> "Joe said \"Hello\" as he walked in."</pre>
<p>
is converted to
</p>
<pre> Joe said "Hello" as he walked in.</pre>
<p>
If you need to specify a backslash, you will have to specify two. For example:
</p>
<pre> "This is a backslash \\ and this is two \\\\"</pre>
<p>
Is converted to:
</p>
<pre>This is a backslash \ and this is two \\</pre>
<p>
Windows users need to be especially wary about this as the backslash is also the windows path separator. For
example, the following code does not produce the intended result:
</p>
<pre>
#declare DisplayFont = "c:\windows\fonts\lucon.ttf"
text { ttf DisplayFont "Hello", 2,0 translate y*1.50 }
</pre>
<p>
New users might expect this to create a text object using the font "c:\windows\fonts\lucon.ttf". Instead,
it will give an error message saying that it cannot find the font file "c:windowsontslucon.ttf".
</p>
<p>
The correct form of the above code is as follows:
</p>
<pre>
#declare DisplayFont = "c:\\windows\\fonts\\lucon.ttf"
text { ttf DisplayFont "Hello", 2,0 translate y*1.50 }
</pre>
<p>
The escaping of backslashes occurs in all POV-Ray string literals. There are also other formatting codes such as <code>\n</code>
for new line. See "<a href="s_98.html#s03_02_02_07_02">Text Formatting</a>" for details.
</p>
<h5><a name="s03_02_01_07_02">3.2.1.7.2 </a>String Identifiers</h5>
<a name="s03_02_01_07_02_i1"><a name="s03_02_01_07_02_i2">
<p>
String identifiers may be declared to make scene files more readable and to parameterize scenes so that changing a
single declaration changes many values. An identifier is declared as follows.
</p>
<pre>
STRING_DECLARATION:
#declare IDENTIFIER = STRING |
#local IDENTIFIER = STRING
</pre>
<p>
Where <em>IDENTIFIER</em> is the name of the identifier up to 40 characters long and <em>STRING</em> is any valid
string specification.
</p>
<p class="Note">
<strong>Note:</strong> unlike floats, vectors, or colors, there need not be a semi-colon at the end of
the declaration. See "<a href="s_98.html#s03_02_02_02_02">#declare vs. #local</a>" for information on
identifier scope.
</p>
<p>
Here are some examples...
</p>
<pre>
#declare Font_Name = "ariel.ttf"
#declare Inc_File = "myfile.inc"
#declare Name = "John"
#declare Name = concat(Name," Doe")
</pre>
<p>
As the last example shows, you can re-declare a string identifier and may use previously declared values in that
re-declaration.
</p>
<h5><a name="s03_02_01_07_03">3.2.1.7.3 </a>String Functions</h5>
<a name="s03_02_01_07_03_i1"><a name="s03_02_01_07_03_i2">
<p>
POV-Ray defines a variety of built-in functions for manipulating floats, vectors and strings. Function calls
consist of a keyword which specifies the name of the function followed by a parameter list enclosed in parentheses.
Parameters are separated by commas. For example:
</p>
<pre>
keyword(param1,param2)
</pre>
<p>
The following are the functions which return string values. They take one or more float, integer, vector, or string
parameters. Assume that <code> A</code> is any valid expression that evaluates to a float; <code> B</code>, <code>L</code>,
and <code>P</code> are floats which are truncated to integers internally, <code>S</code>, <code>S1</code>, <code>S2</code>
etc are strings.<a name="s03_02_01_07_03_i3"><a name="chr"></a>
</p>
<p>
<code>chr(B)</code> Character whose character value is <code>B</code>. Returns a single character string. The
character value of the character is specified by an integer <code>B</code> which must be in the range 0 to 65535 if
you specified <code>charset utf8</code> in the <code>global_settings</code> and 0 to 127 if you specified <code>charset
ascii</code>. Refer to your platform specific documentation if you specified <code>charset sys</code>. For example <code>chr(70)</code>
is the string "F". When rendering text objects you should be aware that the characters rendered are
dependent on the (TTF) font being used.
</p>
<p>
<a name="s03_02_01_07_03_i4"><a name="concat"></a> <code> concat(S1,S2,...)</code> Concatenate strings <code>S1</code>
and <code> S2</code>. Returns a string that is the concatenation of all parameter strings. Must have at least 2
parameters but may have more. For example:
</p>
<pre>
concat("Value is ", str(A,3,1), " inches")
</pre>
<p>
If the float value <code>A</code> was <code>12.34321</code> the result is <code>"Value is 12.3 inches"</code>
which is a string.<a name="s03_02_01_07_03_i5"><a name="str"></a>
</p>
<p>
<code> str(A,L,P):</code> Convert float A to a formatted string. Returns a formatted string representation of float
value <code>A</code>. The integer parameter <code>L</code> specifies the minimum length of the string and the type of
left padding used if the string's representation is shorter than the minimum. If <code>L</code> is positive then the
padding is with blanks. If <code>L</code> is negative then the padding is with zeros. The overall minimum length of
the formatted string is <em>abs(L)</em>. If the string needs to be longer, it will be made as long as necessary to
represent the value.
</p>
<p>
The integer parameter <code>P</code> specifies the number of digits after the decimal point. If <code>P</code> is
negative then a compiler-specific default precision is use. Here are some examples:
</p>
<pre>
str(123.456, 0, 3) "123.456"
str(123.456, 4, 3) "123.456"
str(123.456, 9, 3) " 123.456"
str(123.456,-9, 3) "00123.456"
str(123.456, 0, 2) "123.46"
str(123.456, 0, 0) "123"
str(123.456, 5, 0) " 123"
str(123.000, 7, 2) " 123.00"
str(123.456, 0,-1) "123.456000" (platform specific)
</pre>
<a name="s03_02_01_07_03_i6"><a name="strlwr"></a>
<p>
<code>strlwr(S)</code> Lower case of <code>S</code>. Returns a new string in which all upper case letters in the
string S1 are converted to lower case. The original string is not affected. For example <code> strlwr("Hello
There!")</code> results in "hello there!".
</p>
<p>
<a name="s03_02_01_07_03_i7"><a name="substr"></a> <code> substr(S,P,L)</code> Sub-string from <code>S</code>.
Returns a string that is a subset of the characters in parameter <code> S</code> starting at the position specified by
the integer value <code> P</code> for a length specified by the integer value <code>L</code>. For example <code>
substr("ABCDEFGHI",4,2)</code> evaluates to the string "DE". If <em>P+L-1>strlen(S)</em> an
error occurs.
</p>
<p>
<a name="s03_02_01_07_03_i8"><a name="strupr"></a> <code> strupr(S)</code> Upper case of <code>S</code>. Returns a
new string in which all lower case letters in the string <code>S</code> are converted to upper case. The original
string is not affected. For example <code> strupr("Hello There!")</code> results in "HELLO THERE!".<a name="s03_02_01_07_03_i9"><a name="vstr"></a>
</p>
<p>
<code>vstr(N,A,S,L,P)</code> Convert vector A to a formatted string. Returns a formatted string representation of
vector <code>A</code> where the elements of the vector are separated by the string parameter <code>S</code>. The
integer parameter <code>N</code> specifies the amount of dimensions in vector <code>A</code>. <code>N</code> is
autoclipped to the range of 2 to 5, without warning. Specifying a vector <code>A</code> with more dimensions than
given by <code>N</code> will result in an error.<br> The integer parameter <code>L</code> specifies the minimum length
of the string and the type of left padding used if the string's representation is shorter than the minimum. The
integer parameter <code>P</code> specifies the number of digits after the decimal point. If <code>P</code> is negative
then a compiler-specific default precision is use. The function of <code>L</code> and <code>P</code> is the same as in <code>str</code>.
Here are some examples:
</p>
<pre>
vstr(2, <1,2>, ", ", 0,1) "1.0, 2.0"
vstr(5, <1,2,3,4,5>, ", ", 0,1) "1.0, 2.0, 3.0, 4.0, 5.0"
vstr(1, 1, ", ", 0,1) "1.0, 1.0"
vstr(2, 1, ", ", 0,1) "1.0, 1.0"
vstr(5, 1, ", ", 0,1) "1.0, 1.0, 1.0, 1.0, 1.0"
vstr(7, 1, ", ", 0,1) "1.0, 1.0, 1.0, 1.0, 1.0"
vstr(3, <1,2>, ", ", 0,1) "1.0, 2.0, 0.0"
vstr(5, <1,2,3>, ", ", 0,1) "1.0, 2.0, 3.0, 0.0, 0.0"
vstr(3, <1,2,3,4>, ", ", 0,1) error
</pre>
<p>
See section "<a href="s_97.html#s03_02_01_03_04">Float Functions</a>" for other functions which are
somewhat string-related but which return floats. In addition to the above built-in functions, you may also define your
own functions using the <code><a href="#l119">#macro</a></code> directive. See the section "<a href="s_98.html#s03_02_02_08">User
Defined Macros</a>" for more details.
</p>
<h4><a name="s03_02_01_08">3.2.1.8 </a>Array Identifiers</h4>
<a name="s03_02_01_08_i1"><a name="s03_02_01_08_i2"><a name="s03_02_01_08_i3"><a name="array"></a>
<p>
You may declare arrays of identifiers of up to five dimensions. Any item that can be declared as an identifier can
be declared in an array.
</p>
<h5><a name="s03_02_01_08_01">3.2.1.8.1 </a>Declaring Arrays</h5>
<a name="s03_02_01_08_01_i1"><a name="s03_02_01_08_01_i2">
<p>
The syntax for declaring an array is as follows:
</p>
<pre>
ARRAY_DECLARATION:
#declare IDENTIFIER = array[ INT ][[ INT ]]..[ARRAY_INITIALIZER] |
#local IDENTIFIER = array[ INT ][[ INT ]]..[ARRAY_INITIALIZER]
ARRAY_INITIALIZER:
{ARRAY_ITEM, [ARRAY_ITEM, ]... }
ARRAY_ITEM:
RVALUE | ARRAY_INITIALIZER
</pre>
<p>
Where IDENTIFIER is the name of the identifier up to 40 characters long and INT is a valid float expression which
is internally truncated to an integer which specifies the size of the array. The optional <em> ARRAY_INITIALIZER</em>
is discussed in the next section "<a href="s_97.html#s03_02_01_08_02">Array Initializers</a>". Here is an
example of a one-dimensional, uninitialized array.
</p>
<pre>
#declare MyArray = array[10]
</pre>
<p>
This declares an uninitialized array of ten elements. The elements are referenced as <code>MyArray[0]</code>
through <code>MyArray[9]</code>. As yet, the type of the elements are undetermined. Once you have initialized any
element of the array, all other elements can only be defined as that type. An attempt to reference an uninitialized
element results in an error. For example:
</p>
<pre>
#declare MyArray = array[10]
#declare MyArray[5] = pigment{White} //all other elements must
//be pigments too.
#declare MyArray[2] = normal{bumps 0.2} //generates an error
#declare Thing = MyArray[4] //error: uninitialized array element
</pre>
<p>
Multi-dimensional arrays up to five dimensions may be declared. For example:
</p>
<pre>
#declare MyGrid = array[4][5]
</pre>
<p>
declares a 20 element array of 4 rows and 5 columns. Elements are referenced from <code>MyGrid[0][0]</code> to <code>MyGrid[3][4]</code>.
Although it is permissible to reference an entire array as a whole, you may not reference just one dimension of a
multi-dimensional array. For example:
</p>
<pre>
#declare MyArray = array[10]
#declare MyGrid = array[4][5]
#declare YourArray = MyArray //this is ok
#declare YourGrid = MyGrid //so is this
#declare OneRow = MyGrid[2] //this is illegal
</pre>
<p>
The <code><a href="s_98.html#s03_02_02_06_02">#ifdef</a></code> and <code><a href="s_98.html#s03_02_02_06_02">#ifndef</a></code>
directives can be used to check whether a specific element of an array has been declared. For methods to determine the
size of an array look in the float section for <code><a href="s_97.html#s03_02_01_03_04">dimensions</a></code> and <code><a href="s_97.html#s03_02_01_03_04">dimension_size</a></code>
</p>
<p>
Large uninitialized arrays do not take much memory. Internally they are arrays of pointers so they probably use
just 4 bytes per element. Once initialized with values, they consume memory depending on what you put in them.
</p>
<p>
The rules for local vs. global arrays are the same as any other identifier.
</p>
<p class="Note">
<strong>Note:</strong> this applies to the entire array. You cannot mix local and global elements in
the same array. See "<a href="s_98.html#s03_02_02_02_02">#declare vs. #local</a>" for information on
identifier scope.
</p>
<h5><a name="s03_02_01_08_02">3.2.1.8.2 </a>Array Initializers</h5>
<a name="s03_02_01_08_02_i1"><a name="s03_02_01_08_02_i2">
<p>
Because it is cumbersome to individually initialize the elements of an array, you may initialize it as it is
created using array initializer syntax. For example:
</p>
<pre>
#include "colors.inc"
#declare FlagColors = array[3] {Red,White,Blue}
</pre>
<p>
Multi-dimensional arrays may also be initialized this way. For example:
</p>
<pre>
#declare Digits =
array[4][10]
{
{7,6,7,0,2,1,6,5,5,0},
{1,2,3,4,5,6,7,8,9,0},
{0,9,8,7,6,5,4,3,2,1},
{1,1,2,2,3,3,4,4,5,5}
}
</pre>
<p>
The commas are required between elements and between dimensions as shown in the example.
</p>
<h4><a name="s03_02_01_09">3.2.1.9 </a>Spline Identifiers</h4>
<a name="s03_02_01_09_i1"><a name="spline"></a>
<p>
Splines give you a way to define 'pathways' through your scenes. You specify a series of points, and POV-Ray
interpolates to make a curve connecting them. Every point along the spline has a numerical value. A good example of a
spline is the path of a moving object: the spline itself would be the path traced out by the object and the
'parameter' would be time; as time changes the object's position moves along the spline. <br>Therefore, given a time
reference you could use this spline to find the position of the object. In fact, splines are very well suited to
animation.
</p>
<p>
The syntax is:
</p>
<pre>
SPLINE_DECLARATION:
#declare IDENTIFIER =
spline {
[SPLINE_IDENTIFIER] |
[SPLINE_TYPE] |
[Val_1, <Point_1>[,]
Val_2, <Point_2>[,]
...
Val_n, <Point_n>]
}
SPLINE_TYPE:
linear_spline | quadratic_spline | cubic_spline | natural_spline
SPLINE_USAGE:
MySpline(Val) | MySpline(Val, SPLINE_TYPE)
</pre>
<p>
The first item gives the type of interpolation. <br>In a <code>linear_spline</code>, straight lines connect each
point. <br>In a <code>quadratic_spline</code>, a smooth curve defined by a second-order polynomial connects each
point. <a name="s03_02_01_09_i2"><a name="natural_spline"></a> <br>In <code>cubic_spline</code> and <code>natural_spline</code>,
a smooth curve defined by a third-order polynomial connects each point. <br>The default is <code>linear_spline</code>.
</p>
<p>
Following this are a number of float values each followed by a position vector, all separated by commas. <code>Val_1</code>,
<code>Val_2</code>, etc, are the value of the spline parameter at each specific point. The points need not be in order
of their parameter values. If two points have the same parameter value, the second point will replace the first.
Beyond the range of the lowest and highest parameter values, the spline position is fixed at the endpoints.
</p>
<p class="Note">
<strong>Note:</strong> Because of the way cubic_splines are defined: the first and last points are
tangents rather than points on the spline, cubic_spline interpolation is only valid between the second and
next-to-last points. For all other spline types, interpolation is valid from the first point to the last point. For
t-values outside the valid range, POV-Ray returns the value of the nearest valid point.
</p>
<p>
To use a spline, you place the spline identifier followed by the parameter (in parentheses) wherever you would
normally put a vector, similar to a macro. Splines behave mostly like three-dimensional vectors. <br>Here is an
example:
</p>
<pre>
camera { location <0,2,-2> look_at 0 }
light_source { <-5,30,-10> 1 }
#declare MySpline =
spline {
cubic_spline
-.25, <0,0,-1>
0.00, <1,0,0>
0.25, <0,0,1>
0.50, <-1,0,0>
0.75, <0,0,-1>
1.00, <1,0,0>
1.25, <0,0,1>
}
#declare ctr = 0;
#while (ctr < 1)
sphere {
MySpline(ctr),.25
pigment { rgb <1-ctr,ctr,0> }
}
#declare ctr = ctr + 0.01;
#end
</pre>
<p>
You can also have POV-Ray evaluate a spline as if it were a different type of spline by specifying the type of
spline after the value to interpolate at, for example:<br>
</p>
<pre>
sphere{ <2,0,2>, .25 pigment{rgb MySpline(clock, linear_spline)}}
</pre>
<p>
Splines are 'intelligent' when it comes to returning vectors. The vector with the most components in the spline
determines the size of the returned vector. This allows vectors from two to five components to be returned by splines.
</p>
<p>
Also, function splines take the vector size into account. That is, a function containing a spline with five
components will also return a five component vector (aka a color), a function containing a spline with two components
will only return a two component vector and so on.
</p>
<h5><a name="s03_02_01_09_01">3.2.1.9.1 </a>Splines and Macros</h5>
<a name="s03_02_01_09_01_i1"><a name="Splines, vs. macros"></a><a name="s03_02_01_09_01_i2"><a name="Macros, vs. splines"></a>
<p>
You can pass functions to macros, how to do this is best explained by an example
</p>
<pre>
#macro Foo( Bar, Val )
#declare Y = Bar(Val).y;
#end
#declare myspline = spline {
1, <4,5>
3, <5,5>
5, <6,5>
}
Foo(myspline, 2)
#debug str(Y,5,5)
#debug "\n"
</pre>
<p>
<a name="l58">
<small><strong>More about "absorption"</strong></small>
</a>
<ul>
<li><small>
<a href="s_129.html#s03_06_02_01_01">3.6.2.1.1 Absorption</a> in 3.6.2.1 Media Types
</small>
<li><small>
<a href="s_129.html#s03_06_02_01_03">3.6.2.1.3 Scattering</a> in 3.6.2.1 Media Types
</small>
</ul>
</p>
<p>
<a name="l59">
<small><strong>More about "acos"</strong></small>
</a>
<ul>
<li><small>
<a href="s_140.html#s03_07_09_01">3.7.9.1 Float functions and macros</a> in 3.7.9 math.inc
</small>
<li><small>
<a href="s_97.html#s03_02_01_03_04">3.2.1.3.4 Functions</a> in 3.2.1.3 Float Expressions
</small>
</ul>
</p>
<p>
<a name="l60">
<small><strong>More about "ambient"</strong></small>
</a>
<ul>
<li><small>
<a href="s_117.html#s03_05_03">3.5.3 Finish</a> in 3.5 Textures
</small>
<li><small>
<a href="s_117.html#s03_05_03_01">3.5.3.1 Ambient</a> in 3.5.3 Finish
</small>
</ul>
</p>
<p>
<a name="l61">
<small><strong>More about "angle"</strong></small>
</a>
<ul>
<li><small>
<a href="s_100.html#s03_03_01_01_03">3.3.1.1.3 Angles</a> in 3.3.1.1 Placing the Camera
</small>
<li><small>
<a href="s_140.html#s03_07_09_02">3.7.9.2 Vector functions and macros</a> in 3.7.9 math.inc
</small>
</ul>
</p>
<p>
<a name="l62">
<small><strong>More about "array"</strong></small>
</a>
<ul>
<li><small>
<a href="s_155.html#s03_08_03_06">3.8.3.6 Arrays</a> in 3.8.3 Language Basics
</small>
<li><small>
<a href="s_97.html#s03_02_01_08">3.2.1.8 Array Identifiers</a> in 3.2.1 Language Basics
</small>
</ul>
</p>
<p>
<a name="l63">
<small><strong>More about "asin"</strong></small>
</a>
<ul>
<li><small>
<a href="s_140.html#s03_07_09_01">3.7.9.1 Float functions and macros</a> in 3.7.9 math.inc
</small>
<li><small>
<a href="s_97.html#s03_02_01_03_04">3.2.1.3.4 Functions</a> in 3.2.1.3 Float Expressions
</small>
</ul>
</p>
<p>
<a name="l64">
<small><strong>More about "atan"</strong></small>
</a>
<ul>
<li><small>
<a href="s_105.html#s03_04_01_06">3.4.1.6 Julia Fractal</a> in 3.4.1 Finite Solid Primitives
</small>
<li><small>
<a href="s_97.html#s03_02_01_03_04">3.2.1.3.4 Functions</a> in 3.2.1.3 Float Expressions
</small>
</ul>
</p>
<p>
<a name="l65">
<small><strong>More about "atan2"</strong></small>
</a>
<ul>
<li><small>
<a href="s_140.html#s03_07_09_01">3.7.9.1 Float functions and macros</a> in 3.7.9 math.inc
</small>
<li><small>
<a href="s_97.html#s03_02_01_03_04">3.2.1.3.4 Functions</a> in 3.2.1.3 Float Expressions
</small>
</ul>
</p>
<p>
<a name="l66">
<small><strong>More about "autostop"</strong></small>
</a>
<ul>
<li><small>
<a href="s_130.html#s03_06_03_02_01">3.6.3.2.1 Photon Global Settings</a> in 3.6.3.2 Using Photon Mapping
in Your Scene
</small>
<li><small>
<a href="s_130.html#s03_06_03_05_01">3.6.3.5.1 Autostop</a> in 3.6.3.5 Advanced Techniques
</small>
</ul>
</p>
<p>
<a name="l67">
<small><strong>More about "background"</strong></small>
</a>
<ul>
<li><small>
<a href="s_101.html#s03_03_02_02">3.3.2.2 Background</a> in 3.3.2 Atmospheric Effects
</small>
<li><small>
<a href="s_164.html#s03_08_12_01">3.8.12.1 Background</a> in 3.8.12 Atmospheric Effects
</small>
</ul>
</p>
<p>
<a name="l68">
<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="l69">
<small><strong>More about "color"</strong></small>
</a>
<ul>
<li><small>
<a href="s_155.html#s03_08_03_03">3.8.3.3 Colors</a> in 3.8.3 Language Basics
</small>
<li><small>
<a href="s_97.html#s03_02_01_05">3.2.1.5 Specifying Colors</a> in 3.2.1 Language Basics
</small>
</ul>
</p>
<p>
<a name="l70">
<small><strong>More about "cos"</strong></small>
</a>
<ul>
<li><small>
<a href="s_140.html#s03_07_09_01">3.7.9.1 Float functions and macros</a> in 3.7.9 math.inc
</small>
<li><small>
<a href="s_97.html#s03_02_01_03_04">3.2.1.3.4 Functions</a> in 3.2.1.3 Float Expressions
</small>
</ul>
</p>
<p>
<a name="l71">
<small><strong>More about "error_bound"</strong></small>
</a>
<ul>
<li><small>
<a href="s_103.html#s03_03_04_02_05">3.3.4.2.5 error_bound</a> in 3.3.4.2 Adjusting Radiosity
</small>
<li><small>
<a href="s_103.html#s03_03_04_02_11">3.3.4.2.11 nearest_count</a> in 3.3.4.2 Adjusting Radiosity
</small>
</ul>
</p>
<p>
<a name="l72">
<small><strong>More about "finish"</strong></small>
</a>
<ul>
<li><small>
<a href="s_117.html#s03_05_03">3.5.3 Finish</a> in 3.5 Textures
</small>
<li><small>
<a href="s_162.html#s03_08_10_06">3.8.10.6 Finish</a> in 3.8.10 Texture
</small>
</ul>
</p>
<p>
<a name="l73">
<small><strong>More about "fog"</strong></small>
</a>
<ul>
<li><small>
<a href="s_101.html#s03_03_02_03">3.3.2.3 Fog</a> in 3.3.2 Atmospheric Effects
</small>
<li><small>
<a href="s_164.html#s03_08_12_02">3.8.12.2 Fog</a> in 3.8.12 Atmospheric Effects
</small>
</ul>
</p>
<p>
<a name="l74">
<small><strong>More about "function"</strong></small>
</a>
<ul>
<li><small>
<a href="s_97.html#s03_02_01_03_04">3.2.1.3.4 Functions</a> in 3.2.1.3 Float Expressions
</small>
<li><small>
<a href="s_97.html#s03_02_01_04_05">3.2.1.4.5 Functions</a> in 3.2.1.4 Vector Expressions
</small>
<li><small>
<a href="s_97.html#s03_02_01_06">3.2.1.6 User-Defined Functions</a> in 3.2.1 Language Basics
</small>
</ul>
</p>
<p>
<a name="l75">
<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>
<p>
<a name="l76">
<small><strong>More about "gradient"</strong></small>
</a>
<ul>
<li><small>
<a href="s_125.html#s03_05_11_17">3.5.11.17 Gradient</a> in 3.5.11 Patterns
</small>
<li><small>
<a href="s_140.html#s03_07_09_03">3.7.9.3 Vector Analysis</a> in 3.7.9 math.inc
</small>
</ul>
</p>
<p>
<a name="l77">
<small><strong>More about "interior"</strong></small>
</a>
<ul>
<li><small>
<a href="s_128.html#s03_06_01">3.6.1 Interior</a> in 3.6 Interior & Media & Photons
</small>
<li><small>
<a href="s_161.html#s03_08_09_03">3.8.9.3 Interior</a> in 3.8.9 Object Modifiers
</small>
</ul>
</p>
<p>
<a name="l78">
<small><strong>More about "interior_texture"</strong></small>
</a>
<ul>
<li><small>
<a href="s_123.html#s03_05_09">3.5.9 Interior Texture</a> in 3.5 Textures
</small>
<li><small>
<a href="s_161.html#s03_08_09_04">3.8.9.4 Interior Texture</a> in 3.8.9 Object Modifiers
</small>
</ul>
</p>
<p>
<a name="l79">
<small><strong>More about "ior"</strong></small>
</a>
<ul>
<li><small>
<a href="s_128.html#s03_06_01_04">3.6.1.4 Refraction</a> in 3.6.1 Interior
</small>
<li><small>
<a href="s_135.html#s03_07_04_06">3.7.4.6 IORs</a> in 3.7.4 consts.inc
</small>
</ul>
</p>
<p>
<a name="l80">
<small><strong>More about "isosurface"</strong></small>
</a>
<ul>
<li><small>
<a href="s_108.html#s03_04_04">3.4.4 Isosurface Object</a> in 3.4 Objects
</small>
<li><small>
<a href="s_160.html#s03_08_08_04">3.8.8.4 Isosurface</a> in 3.8.8 Objects
</small>
</ul>
</p>
<p>
<a name="l81">
<small><strong>More about "macro"</strong></small>
</a>
<ul>
<li><small>
<a href="s_156.html#s03_08_04_08">3.8.4.8 Macro</a> in 3.8.4 Language Directives
</small>
<li><small>
<a href="s_98.html#s03_02_02_08">3.2.2.8 User Defined Macros</a> in 3.2.2 Language Directives
</small>
</ul>
</p>
<p>
<a name="l82">
<small><strong>More about "material"</strong></small>
</a>
<ul>
<li><small>
<a href="s_113.html#s03_04_09_03">3.4.9.3 Material</a> in 3.4.9 Object Modifiers
</small>
<li><small>
<a href="s_161.html#s03_08_09_02">3.8.9.2 Material</a> in 3.8.9 Object Modifiers
</small>
</ul>
</p>
<p>
<a name="l83">
<small><strong>More about "matrix"</strong></small>
</a>
<ul>
<li><small>
<a href="s_157.html#s03_08_05">3.8.5 Transformations</a> in 3.8 Quick Reference
</small>
<li><small>
<a href="s_63.html#s02_02_07_01_04">2.2.7.1.4 Matrix</a> in 2.2.7.1 Transformations
</small>
</ul>
</p>
<p>
<a name="l84">
<small><strong>More about "max"</strong></small>
</a>
<ul>
<li><small>
<a href="s_140.html#s03_07_09_01">3.7.9.1 Float functions and macros</a> in 3.7.9 math.inc
</small>
<li><small>
<a href="s_97.html#s03_02_01_03_04">3.2.1.3.4 Functions</a> in 3.2.1.3 Float Expressions
</small>
</ul>
</p>
<p>
<a name="l85">
<small><strong>More about "media"</strong></small>
</a>
<ul>
<li><small>
<a href="s_129.html#s03_06_02">3.6.2 Media</a> in 3.6 Interior & Media & Photons
</small>
<li><small>
<a href="s_163.html#s03_08_11">3.8.11 Media</a> in 3.8 Quick Reference
</small>
</ul>
</p>
<p>
<a name="l86">
<small><strong>More about "mesh"</strong></small>
</a>
<ul>
<li><small>
<a href="s_106.html#s03_04_02_03">3.4.2.3 Mesh</a> in 3.4.2 Finite Patch Primitives
</small>
<li><small>
<a href="s_106.html#s03_04_02_04">3.4.2.4 Mesh2</a> in 3.4.2 Finite Patch Primitives
</small>
</ul>
</p>
<p>
<a name="l87">
<small><strong>More about "min"</strong></small>
</a>
<ul>
<li><small>
<a href="s_140.html#s03_07_09_01">3.7.9.1 Float functions and macros</a> in 3.7.9 math.inc
</small>
<li><small>
<a href="s_140.html#s03_07_09_02">3.7.9.2 Vector functions and macros</a> in 3.7.9 math.inc
</small>
<li><small>
<a href="s_97.html#s03_02_01_03_04">3.2.1.3.4 Functions</a> in 3.2.1.3 Float Expressions
</small>
</ul>
</p>
<p>
<a name="l88">
<small><strong>More about "noise_generator"</strong></small>
</a>
<ul>
<li><small>
<a href="s_102.html#s03_03_03_10">3.3.3.10 Noise_generator</a> in 3.3.3 Global Settings
</small>
<li><small>
<a href="s_126.html#s03_05_12">3.5.12 Pattern Modifiers</a> in 3.5 Textures
</small>
<li><small>
<a href="s_126.html#s03_05_12_04">3.5.12.4 Noise Generators</a> in 3.5.12 Pattern Modifiers
</small>
</ul>
</p>
<p>
<a name="l89">
<small><strong>More about "normal"</strong></small>
</a>
<ul>
<li><small>
<a href="s_116.html#s03_05_02">3.5.2 Normal</a> in 3.5 Textures
</small>
<li><small>
<a href="s_162.html#s03_08_10_05">3.8.10.5 Normal</a> in 3.8.10 Texture
</small>
<li><small>
<a href="s_69.html#s02_03_04_02">2.3.4.2 Normals</a> in 2.3.4 Advanced Texture Options
</small>
</ul>
</p>
<p>
<a name="l90">
<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="l91">
<small><strong>More about "open"</strong></small>
</a>
<ul>
<li><small>
<a href="s_128.html#s03_06_01">3.6.1 Interior</a> in 3.6 Interior & Media & Photons
</small>
<li><small>
<a href="s_98.html#s03_02_02_03_01">3.2.2.3.1 The #fopen Directive</a> in 3.2.2.3 File I/O Directives
</small>
</ul>
</p>
<p>
<a name="l92">
<small><strong>More about "parametric"</strong></small>
</a>
<ul>
<li><small>
<a href="s_109.html#s03_04_05">3.4.5 Parametric Object</a> in 3.4 Objects
</small>
<li><small>
<a href="s_160.html#s03_08_08_05">3.8.8.5 Parametric</a> in 3.8.8 Objects
</small>
</ul>
</p>
<p>
<a name="l93">
<small><strong>More about "pattern"</strong></small>
</a>
<ul>
<li><small>
<a href="s_125.html#s03_05_11">3.5.11 Patterns</a> in 3.5 Textures
</small>
<li><small>
<a href="s_162.html#s03_08_10_07">3.8.10.7 Pattern</a> in 3.8.10 Texture
</small>
<li><small>
<a href="s_97.html#s03_02_01_06_03">3.2.1.6.3 Declaring User-Defined Float Functions</a> in 3.2.1.6
User-Defined Functions
</small>
</ul>
</p>
<p>
<a name="l94">
<small><strong>More about "photons"</strong></small>
</a>
<ul>
<li><small>
<a href="s_130.html#s03_06_03">3.6.3 Photons</a> in 3.6 Interior & Media & Photons
</small>
<li><small>
<a href="s_130.html#s03_06_03_02_01">3.6.3.2.1 Photon Global Settings</a> in 3.6.3.2 Using Photon Mapping
in Your Scene
</small>
<li><small>
<a href="s_165.html#s03_08_13_02">3.8.13.2 Photons</a> in 3.8.13 Global Settings
</small>
</ul>
</p>
<p>
<a name="l95">
<small><strong>More about "pigment"</strong></small>
</a>
<ul>
<li><small>
<a href="s_115.html#s03_05_01">3.5.1 Pigment</a> in 3.5 Textures
</small>
<li><small>
<a href="s_162.html#s03_08_10_04">3.8.10.4 Pigment</a> in 3.8.10 Texture
</small>
<li><small>
<a href="s_69.html#s02_03_04_01">2.3.4.1 Pigments</a> in 2.3.4 Advanced Texture Options
</small>
</ul>
</p>
<p>
<a name="l96">
<small><strong>More about "pow"</strong></small>
</a>
<ul>
<li><small>
<a href="s_140.html#s03_07_09_02">3.7.9.2 Vector functions and macros</a> in 3.7.9 math.inc
</small>
<li><small>
<a href="s_97.html#s03_02_01_03_04">3.2.1.3.4 Functions</a> in 3.2.1.3 Float Expressions
</small>
</ul>
</p>
<p>
<a name="l97">
<small><strong>More about "radiosity"</strong></small>
</a>
<ul>
<li><small>
<a href="s_103.html#s03_03_04">3.3.4 Radiosity</a> in 3.3 Scene Settings
</small>
<li><small>
<a href="s_165.html#s03_08_13_01">3.8.13.1 Radiosity</a> in 3.8.13 Global Settings
</small>
<li><small>
<a href="s_72.html#s02_03_07">2.3.7 Radiosity</a> in 2.3 Advanced Features
</small>
</ul>
</p>
<p>
<a name="l98">
<small><strong>More about "rainbow"</strong></small>
</a>
<ul>
<li><small>
<a href="s_101.html#s03_03_02_05">3.3.2.5 Rainbow</a> in 3.3.2 Atmospheric Effects
</small>
<li><small>
<a href="s_164.html#s03_08_12_04">3.8.12.4 Rainbow</a> in 3.8.12 Atmospheric Effects
</small>
</ul>
</p>
<p>
<a name="l99">
<small><strong>More about "rand"</strong></small>
</a>
<ul>
<li><small>
<a href="s_117.html#s03_05_03_02_03">3.5.3.2.3 Crand Graininess</a> in 3.5.3.2 Diffuse Reflection Items
</small>
<li><small>
<a href="s_142.html#s03_07_11_01">3.7.11.1 Flat Distributions</a> in 3.7.11 rand.inc
</small>
<li><small>
<a href="s_97.html#s03_02_01_03_04">3.2.1.3.4 Functions</a> in 3.2.1.3 Float Expressions
</small>
</ul>
</p>
<p>
<a name="l100">
<small><strong>More about "refraction"</strong></small>
</a>
<ul>
<li><small>
<a href="s_128.html#s03_06_01_04">3.6.1.4 Refraction</a> in 3.6.1 Interior
</small>
<li><small>
<a href="s_130.html#s03_06_03_02_01">3.6.3.2.1 Photon Global Settings</a> in 3.6.3.2 Using Photon Mapping
in Your Scene
</small>
</ul>
</p>
<p>
<a name="l101">
<small><strong>More about "rotate"</strong></small>
</a>
<ul>
<li><small>
<a href="s_157.html#s03_08_05">3.8.5 Transformations</a> in 3.8 Quick Reference
</small>
<li><small>
<a href="s_63.html#s02_02_07_01_03">2.2.7.1.3 Rotate</a> in 2.2.7.1 Transformations
</small>
<li><small>
<a href="s_97.html#s03_02_01_04_05">3.2.1.4.5 Functions</a> in 3.2.1.4 Vector Expressions
</small>
</ul>
</p>
<p>
<a name="l102">
<small><strong>More about "scale"</strong></small>
</a>
<ul>
<li><small>
<a href="s_157.html#s03_08_05">3.8.5 Transformations</a> in 3.8 Quick Reference
</small>
<li><small>
<a href="s_63.html#s02_02_07_01_02">2.2.7.1.2 Scale</a> in 2.2.7.1 Transformations
</small>
</ul>
</p>
<p>
<a name="l103">
<small><strong>More about "sin"</strong></small>
</a>
<ul>
<li><small>
<a href="s_140.html#s03_07_09_01">3.7.9.1 Float functions and macros</a> in 3.7.9 math.inc
</small>
<li><small>
<a href="s_97.html#s03_02_01_03_04">3.2.1.3.4 Functions</a> in 3.2.1.3 Float Expressions
</small>
</ul>
</p>
<p>
<a name="l104">
<small><strong>More about "sky_sphere"</strong></small>
</a>
<ul>
<li><small>
<a href="s_101.html#s03_03_02_04">3.3.2.4 Sky Sphere</a> in 3.3.2 Atmospheric Effects
</small>
<li><small>
<a href="s_164.html#s03_08_12_03">3.8.12.3 Sky Sphere</a> in 3.8.12 Atmospheric Effects
</small>
</ul>
</p>
<p>
<a name="l105">
<small><strong>More about "spline"</strong></small>
</a>
<ul>
<li><small>
<a href="s_155.html#s03_08_03_07">3.8.3.7 Splines</a> in 3.8.3 Language Basics
</small>
<li><small>
<a href="s_97.html#s03_02_01_09">3.2.1.9 Spline Identifiers</a> in 3.2.1 Language Basics
</small>
</ul>
</p>
<p>
<a name="l106">
<small><strong>More about "sqr"</strong></small>
</a>
<ul>
<li><small>
<a href="s_105.html#s03_04_01_06">3.4.1.6 Julia Fractal</a> in 3.4.1 Finite Solid Primitives
</small>
<li><small>
<a href="s_140.html#s03_07_09_02">3.7.9.2 Vector functions and macros</a> in 3.7.9 math.inc
</small>
<li><small>
<a href="s_97.html#s03_02_01_03_04">3.2.1.3.4 Functions</a> in 3.2.1.3 Float Expressions
</small>
</ul>
</p>
<p>
<a name="l107">
<small><strong>More about "tan"</strong></small>
</a>
<ul>
<li><small>
<a href="s_105.html#s03_04_01_06">3.4.1.6 Julia Fractal</a> in 3.4.1 Finite Solid Primitives
</small>
<li><small>
<a href="s_140.html#s03_07_09_01">3.7.9.1 Float functions and macros</a> in 3.7.9 math.inc
</small>
<li><small>
<a href="s_97.html#s03_02_01_03_04">3.2.1.3.4 Functions</a> in 3.2.1.3 Float Expressions
</small>
</ul>
</p>
<p>
<a name="l108">
<small><strong>More about "texture"</strong></small>
</a>
<ul>
<li><small>
<a href="s_114.html#s03_05">3.5 Textures</a> in 3 POV-Ray Reference
</small>
<li><small>
<a href="s_162.html#s03_08_10">3.8.10 Texture</a> in 3.8 Quick Reference
</small>
</ul>
</p>
<p>
<a name="l109">
<small><strong>More about "texture_list"</strong></small>
</a>
<ul>
<li><small>
<a href="s_106.html#s03_04_02_04">3.4.2.4 Mesh2</a> in 3.4.2 Finite Patch Primitives
</small>
<li><small>
<a href="s_122.html#s03_05_08">3.5.8 Triangle Texture Interpolation</a> in 3.5 Textures
</small>
</ul>
</p>
<p>
<a name="l110">
<small><strong>More about "transform"</strong></small>
</a>
<ul>
<li><small>
<a href="s_149.html#s03_07_18">3.7.18 transforms.inc</a> in 3.7 Include Files
</small>
<li><small>
<a href="s_157.html#s03_08_05">3.8.5 Transformations</a> in 3.8 Quick Reference
</small>
</ul>
</p>
<p>
<a name="l111">
<small><strong>More about "translate"</strong></small>
</a>
<ul>
<li><small>
<a href="s_157.html#s03_08_05">3.8.5 Transformations</a> in 3.8 Quick Reference
</small>
<li><small>
<a href="s_63.html#s02_02_07_01_01">2.2.7.1.1 Translate</a> in 2.2.7.1 Transformations
</small>
</ul>
</p>
<p>
<a name="l112">
<small><strong>More about "turbulence"</strong></small>
</a>
<ul>
<li><small>
<a href="s_126.html#s03_05_12">3.5.12 Pattern Modifiers</a> in 3.5 Textures
</small>
<li><small>
<a href="s_126.html#s03_05_12_05">3.5.12.5 Turbulence</a> in 3.5.12 Pattern Modifiers
</small>
<li><small>
<a href="s_97.html#s03_02_01_04_05">3.2.1.4.5 Functions</a> in 3.2.1.4 Vector Expressions
</small>
</ul>
</p>
<p>
<a name="l113">
<small><strong>More about "uv_mapping"</strong></small>
</a>
<ul>
<li><small>
<a href="s_121.html#s03_05_07">3.5.7 UV Mapping</a> in 3.5 Textures
</small>
<li><small>
<a href="s_161.html#s03_08_09_01">3.8.9.1 UV Mapping</a> in 3.8.9 Object Modifiers
</small>
</ul>
</p>
<p>
<a name="l114">
<small><strong>More about "uv_vectors"</strong></small>
</a>
<ul>
<li><small>
<a href="s_106.html#s03_04_02_04">3.4.2.4 Mesh2</a> in 3.4.2 Finite Patch Primitives
</small>
<li><small>
<a href="s_121.html#s03_05_07_02">3.5.7.2 UV Vectors</a> in 3.5.7 UV Mapping
</small>
</ul>
</p>
<p>
<a name="l115">
<small><strong>More about "warp"</strong></small>
</a>
<ul>
<li><small>
<a href="s_126.html#s03_05_12">3.5.12 Pattern Modifiers</a> in 3.5 Textures
</small>
<li><small>
<a href="s_126.html#s03_05_12_06">3.5.12.6 Warps</a> in 3.5.12 Pattern Modifiers
</small>
</ul>
</p>
<p>
<a name="l116">
<small><strong>More about "wood"</strong></small>
</a>
<ul>
<li><small>
<a href="s_125.html#s03_05_11_36">3.5.11.36 Wood</a> in 3.5.11 Patterns
</small>
<li><small>
<a href="s_148.html#s03_07_17_03">3.7.17.3 Woods</a> in 3.7.17 textures.inc
</small>
</ul>
</p>
<p>
<a name="l117">
<small><strong>More about "Strings"</strong></small>
</a>
<ul>
<li><small>
<a href="s_155.html#s03_08_03_05">3.8.3.5 Strings</a> in 3.8.3 Language Basics
</small>
<li><small>
<a href="s_97.html#s03_02_01_07">3.2.1.7 Strings</a> in 3.2.1 Language Basics
</small>
</ul>
</p>
<p>
<a name="l118">
<small><strong>More about "macros"</strong></small>
</a>
<ul>
<li><small>
<a href="s_156.html#s03_08_04_08">3.8.4.8 Macro</a> in 3.8.4 Language Directives
</small>
<li><small>
<a href="s_98.html#s03_02_02_08">3.2.2.8 User Defined Macros</a> in 3.2.2 Language Directives
</small>
</ul>
</p>
<p>
<a name="l119">
<small><strong>More about "#macro"</strong></small>
</a>
<ul>
<li><small>
<a href="s_156.html#s03_08_04_08">3.8.4.8 Macro</a> in 3.8.4 Language Directives
</small>
<li><small>
<a href="s_98.html#s03_02_02_08">3.2.2.8 User Defined Macros</a> in 3.2.2 Language Directives
</small>
</ul>
</p>
<br>
<table class="NavBar" width="100%">
<tr>
<td align="left" nowrap="" valign="middle" width="32">
<a href="s_96.html"><img alt="previous" border="0" src="prev.png"></a>
</td>
<td align="left" valign="middle" width="30%">
<a href="s_96.html">3.2 Scene Description Language</a>
</td>
<td align="center" valign="middle">
<strong>3.2.1 Language Basics</strong>
</td>
<td align="right" valign="middle" width="30%">
<a href="s_98.html">3.2.2 Language Directives</a>
</td>
<td align="right" nowrap="" valign="middle" width="32">
<a href="s_98.html"><img alt="next" border="0" src="next.png"></a>
</td>
</tr>
</table>
</body> </html>
|