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
|
<!-- 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.7.7 functions.inc</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_137.html"><img alt="previous" border="0" src="prev.png"></a>
</td>
<td align="left" valign="middle" width="30%">
<a href="s_137.html">3.7.6 finish.inc</a>
</td>
<td align="center" valign="middle">
<strong class="NavBar">POV-Ray 3.6 for UNIX documentation</strong><br> <strong>3.7.7
functions.inc</strong>
</td>
<td align="right" valign="middle" width="30%">
<a href="s_139.html">3.7.8 glass.inc, glass_old.inc</a>
</td>
<td align="right" nowrap="" valign="middle" width="32">
<a href="s_139.html"><img alt="next" border="0" src="next.png"></a>
</td>
</tr>
</table>
<h3><a name="s03_07_07">3.7.7 </a>functions.inc</h3>
<a name="s03_07_07_i1">
<p>
This include file contains interfaces to internal functions as well as several predefined functions. The ID's used
to access the internal functions through calls to "internal(XX)", are not guaranteed to stay the same
between POV-Ray versions, so users are encouraged to use the functions declared here.
</p>
<p>
The number of required parameters and what they control are also given in the include file, this chapter gives more
information. <br>For starter values of the parameters, check the "i_internal.pov" demo file.
</p>
<p>
Syntax to be used:
</p>
<pre> #include "functions.inc"
isosurface {
function { f_torus_gumdrop(x,y,z, P0) }
...
}
pigment {
function { f_cross_ellipsoids(x,y,z, P0, P1, P2, P3) }
COLOR_MAP ...
)
</pre>
<p>
Some special parameters are found in several of these functions. These are described in the next section and later
referred to as "Cross section type", "Field Strength", "Field Limit", "SOR"
parameters.
</p>
<h4><a name="s03_07_07_01">3.7.7.1 </a>Common Parameters</h4>
<p>
<strong>Cross Section Type:</strong><a name="s03_07_07_01_i1"><a name="Cross Section Type"></a> <br>In the helixes
and spiral functions, the 9th parameter is the cross section type. <br>Some shapes are:
</p>
<dl>
<dt>
<code>0</code> :
<dd>
square
<dt>
<code>0.0 to 1.0</code> :
<dd>
rounded squares
<dt>
<code>1</code> :
<dd>
circle
<dt>
<code>1.0 to 2.0</code> :
<dd>
rounded diamonds
<dt>
<code>2</code> :
<dd>
diamond
<dt>
<code>2.0 to 3.0</code> :
<dd>
partially concave diamonds
<dt>
<code>3</code> :
<dd>
concave diamond
</dl>
<h5><a name="s03_07_07_01_01">3.7.7.1.1 </a>Field Strength</h5>
<p>
The numerical value at a point in space generated by the function is multiplied by the Field Strength. The set of
points where the function evaluates to zero are unaffected by any positive value of this parameter, so if you are just
using the function on its own with threshold = 0, the generated surface is still the same. <br>In some cases, the
field strength has a considerable effect on the speed and accuracy of rendering the surface. In general, increasing
the field strength speeds up the rendering, but if you set the value too high the surface starts to break up and may
disappear completely. <br>Setting the field strength to a negative value produces the inverse of the surface, like
making the function negative.
</p>
<h5><a name="s03_07_07_01_02">3.7.7.1.2 </a>Field Limit</h5>
<p>
This will not make any difference to the generated surface if you are using threshold that is within the field
limit (and will kill the surface completely if the threshold is greater than the field limit). However, it may make a
huge difference to the rendering times. <br>If you use the function to generate a pigment, then all points that are a
long way from the surface will have the same color, the color that corresponds to the numerical value of the field
limit.
</p>
<h5><a name="s03_07_07_01_03">3.7.7.1.3 </a>SOR Switch</h5>
<p>
If greater than zero, the curve is swept out as a surface of revolution (SOR). <br>If the value is zero or
negative, the curve is extruded linearly in the Z direction.<br>
</p>
<h5><a name="s03_07_07_01_04">3.7.7.1.4 </a>SOR Offset</h5>
<p>
If the SOR switch is on, then the curve is shifted this distance in the X direction before being swept out.
</p>
<h5><a name="s03_07_07_01_05">3.7.7.1.5 </a>SOR Angle</h5>
<p>
If the SOR switch is on, then the curve is rotated this number of degrees about the Z axis before being swept out.
</p>
<h5><a name="s03_07_07_01_06">3.7.7.1.6 </a>Invert Isosurface</h5>
<p>
Sometimes, when you render a surface, you may find that you get only the shape of the container. This could be
caused by the fact that some of the build in functions are defined inside out. <br>We can invert the isosurface by
negating the whole function: <br><code> -(function) - threshold</code>
</p>
<h4><a name="s03_07_07_02">3.7.7.2 </a>Internal Functions</h4>
<p>
Here is a list of the internal functions in the order they appear in the "functions.inc" include file<a name="s03_07_07_02_i1"><a name="f_algbr_cyl1"></a>
</p>
<p>
<code>f_algbr_cyl1(x,y,z, P0, P1, P2, P3, P4)</code>. An algebraic cylinder is what you get if you take any 2d
curve and plot it in 3d. The 2d curve is simply extruded along the third axis, in this case the z axis. <br>With the
SOR Switch switched on, the figure-of-eight curve will be rotated around the Y axis instead of being extruded along
the Z axis.
</p>
<ul>
<li>
<code>P0</code> : <a href="s_138.html#s03_07_07_01_01">Field Strength</a>
</li>
<li>
<code>P1</code> : <a href="s_138.html#s03_07_07_01_02">Field Limit</a>
</li>
<li>
<code>P2</code> : <a href="s_138.html#s03_07_07_01_03">SOR Switch</a>
</li>
<li>
<code>P3</code> : <a href="s_138.html#s03_07_07_01_04">SOR Offset</a>
</li>
<li>
<code>P4</code> : <a href="s_138.html#s03_07_07_01_05">SOR Angle</a>
</li>
</ul>
<a name="s03_07_07_02_i2"><a name="f_algbr_cyl2"></a>
<p>
<code>f_algbr_cyl2(x,y,z, P0, P1, P2, P3, P4)</code>. An algebraic cylinder is what you get if you take any 2d
curve and plot it in 3d. The 2d curve is simply extruded along the third axis, in this case the z axis. <br>With the
SOR Switch switched on, the cross section curve will be rotated around the Y axis instead of being extruded along the
Z axis.
</p>
<ul>
<li>
<code>P0</code> : <a href="s_138.html#s03_07_07_01_01">Field Strength</a> (Needs a negative field strength or a
negated function)
</li>
<li>
<code>P1</code> : <a href="s_138.html#s03_07_07_01_02">Field Limit</a>
</li>
<li>
<code>P2</code> : <a href="s_138.html#s03_07_07_01_03">SOR Switch</a>
</li>
<li>
<code>P3</code> : <a href="s_138.html#s03_07_07_01_04">SOR Offset</a>
</li>
<li>
<code>P4</code> : <a href="s_138.html#s03_07_07_01_05">SOR Angle</a>
</li>
</ul>
<a name="s03_07_07_02_i3"><a name="f_algbr_cyl3"></a>
<p>
<code>f_algbr_cyl3(x,y,z, P0, P1, P2, P3, P4)</code>. An algebraic cylinder is what you get if you take any 2d
curve and plot it in 3d. The 2d curve is simply extruded along the third axis, in this case the Z axis. <br>With the
SOR Switch switched on, the cross section curve will be rotated around the Y axis instead of being extruded along the
Z axis.
</p>
<ul>
<li>
<code>P0</code> : <a href="s_138.html#s03_07_07_01_01">Field Strength</a> (Needs a negative field strength or a
negated function)
</li>
<li>
<code>P1</code> : <a href="s_138.html#s03_07_07_01_02">Field Limit</a>
</li>
<li>
<code>P2</code> : <a href="s_138.html#s03_07_07_01_03">SOR Switch</a>
</li>
<li>
<code>P3</code> : <a href="s_138.html#s03_07_07_01_04">SOR Offset</a>
</li>
<li>
<code>P4</code> : <a href="s_138.html#s03_07_07_01_05">SOR Angle</a>
</li>
</ul>
<a name="s03_07_07_02_i4"><a name="f_algbr_cyl4"></a>
<p>
<code>f_algbr_cyl4(x,y,z, P0, P1, P2, P3, P4)</code>. An algebraic cylinder is what you get if you take any 2d
curve and plot it in 3d. The 2d curve is simply extruded along the third axis, in this case the z axis. <br>With the
SOR Switch switched on, the cross section curve will be rotated around the Y axis instead of being extruded along the
Z axis.
</p>
<ul>
<li>
<code>P0</code> : <a href="s_138.html#s03_07_07_01_01">Field Strength</a> (Needs a negative field strength or a
negated function)
</li>
<li>
<code>P1</code> : <a href="s_138.html#s03_07_07_01_02">Field Limit</a>
</li>
<li>
<code>P2</code> : <a href="s_138.html#s03_07_07_01_03">SOR Switch</a>
</li>
<li>
<code>P3</code> : <a href="s_138.html#s03_07_07_01_04">SOR Offset</a>
</li>
<li>
<code>P4</code> : <a href="s_138.html#s03_07_07_01_05">SOR Angle</a>
</li>
</ul>
<a name="s03_07_07_02_i5"><a name="f_bicorn"></a>
<p>
<code>f_bicorn(x,y,z, P0, P1)</code>. The surface is a surface of revolution.
</p>
<ul>
<li>
<code>P0</code> : <a href="s_138.html#s03_07_07_01_01">Field Strength</a> (Needs a negative field strength or a
negated function)
</li>
<li>
<code>P1</code> : Scale. The mathematics of this surface suggest that the shape should be different for different
values of this parameter. In practice the difference in shape is hard to spot. Setting the scale to 3 gives a surface
with a radius of about 1 unit
</li>
</ul>
<a name="s03_07_07_02_i6"><a name="f_bifolia"></a>
<p>
<code>f_bifolia(x,y,z, P0, P1)</code>. The bifolia surface looks something like the top part of a a paraboloid
bounded below by another paraboloid.
</p>
<ul>
<li>
<code>P0</code> : <a href="s_138.html#s03_07_07_01_01">Field Strength</a> (Needs a negative field strength or a
negated function)
</li>
<li>
<code>P1</code> : Scale. The surface is always the same shape. Changing this parameter has the same effect as
adding a scale modifier. Setting the scale to 1 gives a surface with a radius of about 1 unit
</li>
</ul>
<a name="s03_07_07_02_i7"><a name="f_blob"></a>
<p>
<code>f_blob(x,y,z, P0, P1, P2, P3, P4)</code>. This function generates blobs that are similar to a CSG blob with
two spherical components. This function only seems to work with negative threshold settings.
</p>
<ul>
<li>
<code>P0</code> : X distance between the two components
</li>
<li>
<code>P1</code> : Blob strength of component 1
</li>
<li>
<code>P2</code> : Inverse blob radius of component 1
</li>
<li>
<code>P3</code> : Blob strength of component 2
</li>
<li>
<code>P4</code> : Inverse blob radius of component 2
</li>
</ul>
<a name="s03_07_07_02_i8"><a name="f_blob2"></a>
<p>
<code>f_blob2(x,y,z, P0, P1, P2, P3)</code>. The surface is similar to a CSG blob with two spherical components.
</p>
<ul>
<li>
<code>P0</code> : Separation. One blob component is at the origin, and the other is this distance away on the X
axis
</li>
<li>
<code>P1</code> : Inverse size. Increase this to decrease the size of the surface
</li>
<li>
<code>P2</code> : Blob strength
</li>
<li>
<code>P3</code> : Threshold. Setting this parameter to 1 and the threshold to zero has exactly the same effect as
setting this parameter to zero and the threshold to -1
</li>
</ul>
<a name="s03_07_07_02_i9"><a name="f_boy_surface"></a>
<p>
<code>f_boy_surface(x,y,z, P0, P1)</code>. For this surface, it helps if the field strength is set low, otherwise
the surface has a tendency to break up or disappear entirely. This has the side effect of making the rendering times
extremely long.
</p>
<ul>
<li>
<code>P0</code> : <a href="s_138.html#s03_07_07_01_01">Field Strength</a> (Needs a negative field strength or a
negated function)
</li>
<li>
<code>P1</code> : Scale. The surface is always the same shape. Changing this parameter has the same effect as
adding a scale modifier
</li>
</ul>
<a name="s03_07_07_02_i10"><a name="f_comma"></a>
<p>
<code>f_comma(x,y,z, P0)</code>. The 'comma' surface is very much like a comma-shape.
</p>
<ul>
<li>
<code>P0</code> : Scale
</li>
</ul>
<a name="s03_07_07_02_i11"><a name="f_cross_ellipsoids"></a>
<p>
<code>f_cross_ellipsoids(x,y,z, P0, P1, P2, P3)</code>. The 'cross ellipsoids' surface is like the union of three
crossed ellipsoids, one oriented along each axis.
</p>
<ul>
<li>
<code>P0</code> : Eccentricity. When less than 1, the ellipsoids are oblate, when greater than 1 the ellipsoids
are prolate, when zero the ellipsoids are spherical (and hence the whole surface is a sphere)
</li>
<li>
<code>P1</code> : Inverse size. Increase this to decrease the size of the surface
</li>
<li>
<code>P2</code> : Diameter. Increase this to increase the size of the ellipsoids
</li>
<li>
<code>P3</code> : Threshold. Setting this parameter to 1 and the threshold to zero has exactly the same effect as
setting this parameter to zero and the threshold to -1
</li>
</ul>
<a name="s03_07_07_02_i12"><a name="f_crossed_trough"></a>
<p>
<code>f_crossed_trough(x,y,z, P0)</code>
</p>
<ul>
<li>
<code>P0</code> : <a href="s_138.html#s03_07_07_01_01">Field Strength</a> (Needs a negative field strength or a
negated function)
</li>
</ul>
<a name="s03_07_07_02_i13"><a name="f_cubic_saddle"></a>
<p>
<code>f_cubic_saddle(x,y,z, P0)</code>. For this surface, it helps if the field strength is set quite low,
otherwise the surface has a tendency to break up or disappear entirely.
</p>
<ul>
<li>
<code>P0</code> : <a href="s_138.html#s03_07_07_01_01">Field Strength</a> (Needs a negative field strength or a
negated function)
</li>
</ul>
<a name="s03_07_07_02_i14"><a name="f_cushion"></a>
<p>
<code>f_cushion(x,y,z, P0)</code>
</p>
<ul>
<li>
<code>P0</code> : <a href="s_138.html#s03_07_07_01_01">Field Strength</a> (Needs a negative field strength or a
negated function)
</li>
</ul>
<a name="s03_07_07_02_i15"><a name="f_devils_curve"></a>
<p>
<code>f_devils_curve(x,y,z, P0)</code>
</p>
<ul>
<li>
<code>P0</code> : Field Strength (Needs a negative field strength or a negated function)
</li>
</ul>
<a name="s03_07_07_02_i16"><a name="f_devils_curve_2d"></a>
<p>
<code>f_devils_curve_2d(x,y,z, P0, P1, P2, P3, P4, P5)</code>. The <code>f_devils_curve_2d</code> curve can be
extruded along the z axis, or using the SOR parameters it can be made into a surface of revolution. The X and Y
factors control the size of the central feature.
</p>
<ul>
<li>
<code>P0</code> : <a href="s_138.html#s03_07_07_01_01">Field Strength</a> (Needs a negative field strength or a
negated function)
</li>
<li>
<code>P1</code> : X factor
</li>
<li>
<code>P2</code> : Y factor
</li>
<li>
<code>P3</code> : <a href="s_138.html#s03_07_07_01_03">SOR Switch</a>
</li>
<li>
<code>P4</code> : <a href="s_138.html#s03_07_07_01_04">SOR Offset</a>
</li>
<li>
<code>P5</code> : <a href="s_138.html#s03_07_07_01_05">SOR Angle</a>
</li>
</ul>
<a name="s03_07_07_02_i17"><a name="f_dupin_cyclid"></a>
<p>
<code>f_dupin_cyclid(x,y,z, P0, P1, P2, P3, P4, P5)</code>
</p>
<ul>
<li>
<code>P0</code> : <a href="s_138.html#s03_07_07_01_01">Field Strength</a> (Needs a negative field strength or a
negated function)
</li>
<li>
<code>P1</code> : Major radius of torus
</li>
<li>
<code>P2</code> : Minor radius of torus
</li>
<li>
<code>P3</code> : X displacement of torus
</li>
<li>
<code>P4</code> : Y displacement of torus
</li>
<li>
<code>P5</code> : Radius of inversion
</li>
</ul>
<a name="s03_07_07_02_i18"><a name="f_ellipsoid"></a>
<p>
<code>f_ellipsoid(x,y,z, P0, P1, P2)</code>. <code>f_ellipsoid</code> generates spheres and ellipsoids. Needs
"threshold 1".<br>Setting these scaling parameters to 1/n gives exactly the same effect as performing a
scale operation to increase the scaling by n in the corresponding direction.
</p>
<ul>
<li>
<code>P0</code> : X scale (inverse)
</li>
<li>
<code>P1</code> : Y scale (inverse)
</li>
<li>
<code>P2</code> : Z scale (inverse)
</li>
</ul>
<a name="s03_07_07_02_i19"><a name="f_enneper"></a>
<p>
<code>f_enneper(x,y,z, P0)</code>
</p>
<ul>
<li>
<code>P0</code> : <a href="s_138.html#s03_07_07_01_01">Field Strength</a> (Needs a negative field strength or a
negated function)
</li>
</ul>
<a name="s03_07_07_02_i20"><a name="f_flange_cover"></a>
<p>
<code>f_flange_cover(x,y,z, P0, P1, P2, P3)</code>
</p>
<ul>
<li>
<code>P0</code> : Spikiness. Set this to very low values to increase the spikes. Set it to 1 and you get a sphere
</li>
<li>
<code>P1</code> : Inverse size. Increase this to decrease the size of the surface. (The other parameters also
drastically affect the size, but this parameter has no other effects)
</li>
<li>
<code>P2</code> : Flange. Increase this to increase the flanges that appear between the spikes. Set it to 1 for
no flanges
</li>
<li>
<code>P3</code> : Threshold. Setting this parameter to 1 and the threshold to zero has exactly the same effect as
setting this parameter to zero and the threshold to -1
</li>
</ul>
<a name="s03_07_07_02_i21"><a name="f_folium_surface"></a>
<p>
<code>f_folium_surface(x,y,z, P0, P1, P2)</code>. A 'folium surface' looks something like a paraboloid glued to a
plane.
</p>
<ul>
<li>
<code>P0</code> : <a href="s_138.html#s03_07_07_01_01">Field Strength</a> (Needs a negative field strength or a
negated function)
</li>
<li>
<code>P1</code> : Neck width factor - the larger you set this, the narrower the neck where the paraboloid meets
the plane
</li>
<li>
<code>P2</code> : Divergence - the higher you set this value, the wider the paraboloid gets
</li>
</ul>
<a name="s03_07_07_02_i22"><a name="f_folium_surface_2d"></a>
<p>
<code>f_folium_surface_2d(x,y,z, P0, P1, P2, P3, P4, P5)</code>. The <code>f_folium_surface_2d</code> curve can be
rotated around the X axis to generate the same 3d surface as the <code>f_folium_surface</code>, or it can be extruded
in the Z direction (by switching the SOR switch off)
</p>
<ul>
<li>
<code>P0</code> : <a href="s_138.html#s03_07_07_01_01">Field Strength</a> (Needs a negative field strength or a
negated function)
</li>
<li>
<code>P1</code> : Neck width factor - same as the 3d surface if you are revolving it around the Y axis
</li>
<li>
<code>P2</code> : Divergence - same as the 3d surface if you are revolving it around the Y axis
</li>
<li>
<code>P3</code> : <a href="s_138.html#s03_07_07_01_03">SOR Switch</a>
</li>
<li>
<code>P4</code> : <a href="s_138.html#s03_07_07_01_04">SOR Offset</a>
</li>
<li>
<code>P5</code> : <a href="s_138.html#s03_07_07_01_05">SOR Angle</a>
</li>
</ul>
<a name="s03_07_07_02_i23"><a name="f_glob"></a>
<p>
<code>f_glob(x,y,z, P0)</code>. One part of this surface would actually go off to infinity if it were not
restricted by the contained_by shape.
</p>
<ul>
<li>
<code>P0</code> : <a href="s_138.html#s03_07_07_01_01">Field Strength</a> (Needs a negative field strength or a
negated function)
</li>
</ul>
<a name="s03_07_07_02_i24"><a name="f_heart"></a>
<p>
<code>f_heart(x,y,z, P0)</code>
</p>
<ul>
<li>
<code>P0</code> : <a href="s_138.html#s03_07_07_01_01">Field Strength</a> (Needs a negative field strength or a
negated function)
</li>
</ul>
<a name="s03_07_07_02_i25"><a name="f_helical_torus"></a>
<p>
<code>f_helical_torus(x,y,z, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9)</code>. With some sets of parameters, it looks
like a torus with a helical winding around it. The winding optionally has grooves around the outside.
</p>
<ul>
<li>
<code>P0</code> : Major radius
</li>
<li>
<code>P1</code> : Number of winding loops
</li>
<li>
<code>P2</code> : Twistiness of winding. When zero, each winding loop is separate. When set to one, each loop
twists into the next one. When set to two, each loop twists into the one after next
</li>
<li>
<code>P3</code> : Fatness of winding?
</li>
<li>
<code>P4</code> : Threshold. Setting this parameter to 1 and the threshold to zero has s similar effect as
setting this parameter to zero and the threshold to 1
</li>
<li>
<code>P5</code> : Negative minor radius? Reducing this parameter increases the minor radius of the central torus.
Increasing it can make the torus disappear and be replaced by a vertical column. The value at which the surface
switches from one form to the other depends on several other parameters
</li>
<li>
<code>P6</code> : Another fatness of winding control?
</li>
<li>
<code>P7</code> : Groove period. Increase this for more grooves
</li>
<li>
<code>P8</code> : Groove amplitude. Increase this for deeper grooves
</li>
<li>
<code>P9</code> : Groove phase. Set this to zero for symmetrical grooves
</li>
</ul>
<a name="s03_07_07_02_i26"><a name="f_helix1"></a>
<p>
<code>f_helix1(x,y,z, P0, P1, P2, P3, P4, P5, P6)</code>
</p>
<ul>
<li>
<code>P0</code> : Number of helixes - e.g. 2 for a double helix
</li>
<li>
<code>P1</code> : Period - is related to the number of turns per unit length
</li>
<li>
<code>P2</code> : Minor radius (major radius > minor radius)
</li>
<li>
<code>P3</code> : Major radius
</li>
<li>
<code>P4</code> : Shape parameter. If this is greater than 1 then the tube becomes fatter in the y direction
</li>
<li>
<code>P5</code> : <a href="s_138.html#s03_07_07_01">Cross section type</a>
</li>
<li>
<code>P6</code> : Cross section rotation angle (degrees)
</li>
</ul>
<a name="s03_07_07_02_i27"><a name="f_helix2"></a>
<p>
<code>f_helix2(x,y,z, P0, P1, P2, P3, P4, P5, P6)</code>. Needs a negated function
</p>
<ul>
<li>
<code>P0</code> : Not used
</li>
<li>
<code>P1</code> : Period - is related to the number of turns per unit length
</li>
<li>
<code>P2</code> : Minor radius (minor radius > major radius)
</li>
<li>
<code>P3</code> : Major radius
</li>
<li>
<code>P4</code> : Not used
</li>
<li>
<code>P5</code> : <a href="s_138.html#s03_07_07_01">Cross section type</a>
</li>
<li>
<code>P6</code> : Cross section rotation angle (degrees)
</li>
</ul>
<a name="s03_07_07_02_i28"><a name="f_hex_x"></a>
<p>
<code>f_hex_x(x,y,z, P0)</code>. This creates a grid of hexagonal cylinders stretching along the z-axis. The
fatness is controlled by the threshold value. When this value equals 0.8660254 or cos(30) the sides will touch,
because this is the distance between centers. Negating the function will inverse the surface and create a honey-comb
structure. This function is also useful as pigment function.
</p>
<ul>
<li>
<code>P0</code> : No effect (but the syntax requires at least one parameter)
</li>
</ul>
<a name="s03_07_07_02_i29"><a name="f_hex_y"></a>
<p>
<code>f_hex_y(x,y,z, P0)</code>. This is function forms a lattice of infinite boxes stretching along the z-axis.
The fatness is controlled by the threshold value. These boxes are rotated 60 degrees around centers, which are
0.8660254 or cos(30) away from each other. This function is also useful as pigment function.
</p>
<ul>
<li>
<code>P0</code> : No effect (but the syntax requires at least one parameter)
</li>
</ul>
<a name="s03_07_07_02_i30"><a name="f_hetero_mf"></a>
<p>
<code>f_hetero_mf(x,y,z, P0, P1, P2, P3, P4, P5)</code>. <code>f_hetero_mf (x,0,z)</code> makes multifractal height
fields and patterns of '1/f' noise <br>'Multifractal' refers to their characteristic of having a fractal dimension
which varies with altitude. Built from summing noise of a number of frequencies, the hetero_mf parameters determine
how many, and which frequencies are to be summed. <br>An advantage to using these instead of a height_field {} from an
image (a number of height field programs output multifractal types of images) is that the hetero_mf function domain
extends arbitrarily far in the x and z directions so huge landscapes can be made without losing resolution or having
to tile a height field. Other functions of interest are <code>f_ridged_mf</code> and <code>f_ridge</code>.
</p>
<ul>
<li>
<code>P0</code> : H is the negative of the exponent of the basis noise frequencies used in building these
functions (each frequency f's amplitude is weighted by the factor f- H ). In landscapes, and many natural forms, the
amplitude of high frequency contributions are usually less than the lower frequencies. <br>When H is 1, the
fractalization is relatively smooth ("1/f noise"). <br>As H nears 0, the high frequencies contribute
equally with low frequencies as in "white noise".
</li>
<li>
<code>P1</code> : Lacunarity' is the multiplier used to get from one 'octave' to the next. This parameter affects
the size of the frequency gaps in the pattern. Make this greater than 1.0
</li>
<li>
<code>P2</code> : Octaves is the number of different frequencies added to the fractal. Each 'Octave' frequency is
the previous one multiplied by 'Lacunarity', so that using a large number of octaves can get into very high
frequencies very quickly.
</li>
<li>
<code>P3</code> : Offset is the 'base altitude' (sea level) used for the heterogeneous scaling
</li>
<li>
<code>P4</code> : T scales the 'heterogeneity' of the fractal. T=0 gives 'straight 1/f' (no heterogeneous
scaling). T=1 suppresses higher frequencies at lower altitudes
</li>
<li>
<code>P5</code> : Generator type used to generate the noise3d. 0, 1, 2 and 3 are legal values.
</li>
</ul>
<a name="s03_07_07_02_i31"><a name="f_hunt_surface"></a>
<p>
<code>f_hunt_surface(x,y,z, P0)</code>
</p>
<ul>
<li>
<code>P0</code> : <a href="s_138.html#s03_07_07_01_01">Field Strength</a> (Needs a negative field strength or a
negated function)
</li>
</ul>
<a name="s03_07_07_02_i32"><a name="f_hyperbolic_torus"></a>
<p>
<code>f_hyperbolic_torus(x,y,z, P0, P1, P2)</code>
</p>
<ul>
<li>
<code>P0</code> : <a href="s_138.html#s03_07_07_01_01">Field Strength</a> (Needs a negative field strength or a
negated function)
</li>
<li>
<code>P1</code> : Major radius: separation between the centers of the tubes at the closest point
</li>
<li>
<code>P2</code> : Minor radius: thickness of the tubes at the closest point
</li>
</ul>
<a name="s03_07_07_02_i33"><a name="f_isect_ellipsoids"></a>
<p>
<code>f_isect_ellipsoids(x,y,z, P0, P1, P2, P3)</code>. The 'isect ellipsoids' surface is like the intersection of
three crossed ellipsoids, one oriented along each axis.
</p>
<ul>
<li>
<code>P0</code> : Eccentricity. When less than 1, the ellipsoids are oblate, when greater than 1 the ellipsoids
are prolate, when zero the ellipsoids are spherical (and hence the whole surface is a sphere)
</li>
<li>
<code>P1</code> : Inverse size. Increase this to decrease the size of the surface
</li>
<li>
<code>P2</code> : Diameter. Increase this to increase the size of the ellipsoids
</li>
<li>
<code>P3</code> : Threshold. Setting this parameter to 1 and the threshold to zero has exactly the same effect as
setting this parameter to zero and the threshold to -1
</li>
</ul>
<a name="s03_07_07_02_i34"><a name="f_kampyle_of_eudoxus"></a>
<p>
<code>f_kampyle_of_eudoxus(x,y,z, P0, P1, P2)</code>. The 'kampyle of eudoxus' is like two infinite planes with a
dimple at the center.
</p>
<ul>
<li>
<code>P0</code> : <a href="s_138.html#s03_07_07_01_01">Field Strength</a> (Needs a negative field strength or a
negated function)
</li>
<li>
<code>P1</code> : Dimple: When zero, the two dimples punch right through and meet at the center. Non-zero values
give less dimpling
</li>
<li>
<code>P2</code> : Closeness: Higher values make the two planes become closer
</li>
</ul>
<a name="s03_07_07_02_i35"><a name="f_kampyle_of_eudoxus_2d"></a>
<p>
<code>f_kampyle_of_eudoxus_2d(x,y,z, P0, P1, P2, P3, P4, P5)</code>The 2d curve that generates the above surface
can be extruded in the Z direction or rotated about various axes by using the SOR parameters.
</p>
<ul>
<li>
<code>P0</code> : <a href="s_138.html#s03_07_07_01_01">Field Strength</a> (Needs a negative field strength or a
negated function)
</li>
<li>
<code>P1</code> : Dimple: When zero, the two dimples punch right through and meet at the center. Non-zero values
give less dimpling
</li>
<li>
<code>P2</code> : Closeness: Higher values make the two planes become closer
</li>
<li>
<code>P3</code> : <a href="s_138.html#s03_07_07_01_03">SOR Switch</a>
</li>
<li>
<code>P4</code> : <a href="s_138.html#s03_07_07_01_04">SOR Offset</a>
</li>
<li>
<code>P5</code> : <a href="s_138.html#s03_07_07_01_05">SOR Angle</a>
</li>
</ul>
<a name="s03_07_07_02_i36"><a name="f_klein_bottle"></a>
<p>
<code>f_klein_bottle(x,y,z, P0)</code>
</p>
<ul>
<li>
<code>P0</code> : <a href="s_138.html#s03_07_07_01_01">Field Strength</a> (Needs a negative field strength or a
negated function)
</li>
</ul>
<a name="s03_07_07_02_i37"><a name="f_kummer_surface_v1"></a>
<p>
<code>f_kummer_surface_v1(x,y,z, P0)</code>. The Kummer surface consists of a collection of radiating rods.
</p>
<ul>
<li>
<code>P0</code> : <a href="s_138.html#s03_07_07_01_01">Field Strength</a> (Needs a negative field strength or a
negated function)
</li>
</ul>
<a name="s03_07_07_02_i38"><a name="f_kummer_surface_v2"></a>
<p>
<code>f_kummer_surface_v2(x,y,z, P0, P1, P2, P3)</code>. Version 2 of the kummer surface only looks like radiating
rods when the parameters are set to particular negative values. For positive values it tends to look rather like a
superellipsoid.
</p>
<ul>
<li>
<code>P0</code> : <a href="s_138.html#s03_07_07_01_01">Field Strength</a> (Needs a negative field strength or a
negated function)
</li>
<li>
<code>P1</code> : Rod width (negative): Setting this parameter to larger negative values increases the diameter
of the rods
</li>
<li>
<code>P2</code> : Divergence (negative): Setting this number to -1 causes the rods to become approximately
cylindrical. Larger negative values cause the rods to become fatter further from the origin. Smaller negative numbers
cause the rods to become narrower away from the origin, and have a finite length
</li>
<li>
<code>P3</code> : Influences the length of half of the rods. Changing the sign affects the other half of the
rods. 0 has no effect
</li>
</ul>
<a name="s03_07_07_02_i39"><a name="f_lemniscate_of_gerono"></a>
<p>
<code>f_lemniscate_of_gerono(x,y,z, P0)</code>. The "Lemniscate of Gerono" surface is an hourglass shape.
Two teardrops with their ends connected.
</p>
<ul>
<li>
<code>P0</code> : <a href="s_138.html#s03_07_07_01_01">Field Strength</a> (Needs a negative field strength or a
negated function)
</li>
</ul>
<a name="s03_07_07_02_i40"><a name="f_lemniscate_of_gerono_2d"></a>
<p>
<code>f_lemniscate_of_gerono_2d(x,y,z, P0, P1, P2, P3, P4, P5)</code>. The 2d version of the Lemniscate can be
extruded in the Z direction, or used as a surface of revolution to generate the equivalent of the 3d version, or
revolved in different ways.
</p>
<ul>
<li>
<code>P0</code> : <a href="s_138.html#s03_07_07_01_01">Field Strength</a> (Needs a negative field strength or a
negated function)
</li>
<li>
<code>P1</code> : Size: increasing this makes the 2d curve larger and less rounded
</li>
<li>
<code>P2</code> : Width: increasing this makes the 2d curve fatter
</li>
<li>
<code>P3</code> : <a href="s_138.html#s03_07_07_01_03">SOR Switch</a>
</li>
<li>
<code>P4</code> : <a href="s_138.html#s03_07_07_01_04">SOR Offset</a>
</li>
<li>
<code>P5</code> : <a href="s_138.html#s03_07_07_01_05">SOR Angle</a>
</li>
</ul>
<a name="s03_07_07_02_i41"><a name="f_mesh1"></a>
<p>
<code>f_mesh1(x,y,z, P0, P1, P2, P3, P4)</code> The overall thickness of the threads is controlled by the
isosurface threshold, not by a parameter. If you render a mesh1 with zero threshold, the threads have zero thickness
and are therefore invisible. Parameters P2 and P4 control the shape of the thread relative to this threshold
parameter.
</p>
<ul>
<li>
<code>P0</code> : Distance between neighboring threads in the x direction
</li>
<li>
<code>P1</code> : Distance between neighboring threads in the z direction
</li>
<li>
<code>P2</code> : Relative thickness in the x and z directions
</li>
<li>
<code>P3</code> : Amplitude of the weaving effect. Set to zero for a flat grid
</li>
<li>
<code>P4</code> : Relative thickness in the y direction
</li>
</ul>
<a name="s03_07_07_02_i42"><a name="f_mitre"></a>
<p>
<code>f_mitre(x,y,z, P0)</code>. The 'Mitre' surface looks a bit like an ellipsoid which has been nipped at each
end with a pair of sharp nosed pliers.
</p>
<ul>
<li>
<code>P0</code> : <a href="s_138.html#s03_07_07_01_01">Field Strength</a> (Needs a negative field strength or a
negated function)
</li>
</ul>
<a name="s03_07_07_02_i43"><a name="f_nodal_cubic"></a>
<p>
<code>f_nodal_cubic(x,y,z, P0)</code>. The 'Nodal Cubic' is something like what you would get if you were to
extrude the Stophid2D curve along the X axis and then lean it over.
</p>
<ul>
<li>
<code>P0</code> : <a href="s_138.html#s03_07_07_01_01">Field Strength</a> (Needs a negative field strength or a
negated function)
</li>
</ul>
<a name="s03_07_07_02_i44"><a name="f_noise3d"></a>
<p>
<code>f_noise3d(x,y,z)</code><a name="s03_07_07_02_i45"><a name="f_noise_generator"></a>
</p>
<p>
<code>f_noise_generator(x,y,z, P0)</code>
</p>
<ul>
<li>
<code>P0</code> : Noise generator number
</li>
</ul>
<a name="s03_07_07_02_i46"><a name="f_odd"></a>
<p>
<code>f_odd(x,y,z, P0)</code>
</p>
<ul>
<li>
<code>P0</code> : <a href="s_138.html#s03_07_07_01_01">Field Strength</a> (Needs a negative field strength or a
negated function)
</li>
</ul>
<a name="s03_07_07_02_i47"><a name="f_ovals_of_cassini"></a>
<p>
<code>f_ovals_of_cassini(x,y,z, P0, P1, P2, P3)</code>. The Ovals of Cassini are a generalization of the torus
shape.
</p>
<ul>
<li>
<code>P0</code> : <a href="s_138.html#s03_07_07_01_01">Field Strength</a> (Needs a negative field strength or a
negated function)
</li>
<li>
<code>P1</code> : Major radius - like the major radius of a torus
</li>
<li>
<code>P2</code> : Filling. Set this to zero, and you get a torus. Set this to a higher value and the hole in the
middle starts to heal up. Set it even higher and you get an ellipsoid with a dimple
</li>
<li>
<code>P3</code> : Thickness. The higher you set this value, the plumper is the result
</li>
</ul>
<a name="s03_07_07_02_i48"><a name="f_paraboloid"></a>
<p>
<code>f_paraboloid(x,y,z, P0)</code>. This paraboloid is the surface of revolution that you get if you rotate a
parabola about the Y axis.
</p>
<ul>
<li>
<code>P0</code> : <a href="s_138.html#s03_07_07_01_01">Field Strength</a> (Needs a negative field strength or a
negated function)
</li>
</ul>
<a name="s03_07_07_02_i49"><a name="f_parabolic_torus"></a>
<p>
<code>f_parabolic_torus(x,y,z, P0, P1, P2)</code>
</p>
<ul>
<li>
<code>P0</code> : <a href="s_138.html#s03_07_07_01_01">Field Strength</a> (Needs a negative field strength or a
negated function)
</li>
<li>
<code>P1</code> : Major radius
</li>
<li>
<code>P2</code> : Minor radius
</li>
</ul>
<a name="s03_07_07_02_i50"><a name="f_ph"></a>
<p>
<code>f_ph(x,y,z)</code> = atan2( sqrt( x*x + z*z ), y ) <br>When used alone, the "PH" function gives a
surface that consists of all points that are at a particular latitude, i.e. a cone. If you use a threshold of zero
(the default) this gives a cone of width zero, which is invisible. Also look at <code>f_th</code> and <code>f_r</code> <a name="s03_07_07_02_i51"><a name="f_pillow"></a>
</p>
<p>
<code>f_pillow(x,y,z, P0)</code>
</p>
<ul>
<li>
<code>P0</code> : <a href="s_138.html#s03_07_07_01_01">Field Strength</a>
</li>
</ul>
<a name="s03_07_07_02_i52"><a name="f_piriform"></a>
<p>
<code>f_piriform(x,y,z, P0)</code>. The piriform surface looks rather like half a lemniscate.
</p>
<ul>
<li>
<code>P0</code> : <a href="s_138.html#s03_07_07_01_01">Field Strength</a>
</li>
</ul>
<a name="s03_07_07_02_i53"><a name="f_piriform_2d"></a>
<p>
<code>f_piriform_2d(x,y,z, P0, P1, P2, P3, P4, P5, P6)</code>. The 2d version of the "Piriform" can be
extruded in the Z direction, or used as a surface of revolution to generate the equivalent of the 3d version.
</p>
<ul>
<li>
<code>P0</code> : <a href="s_138.html#s03_07_07_01_01">Field Strength</a> (Needs a negative field strength or a
negated function)
</li>
<li>
<code>P1</code> : Size factor 1: increasing this makes the curve larger
</li>
<li>
<code>P2</code> : Size factor 2: making this less negative makes the curve larger but also thinner
</li>
<li>
<code>P3</code> : Fatness: increasing this makes the curve fatter
</li>
<li>
<code>P4</code> : <a href="s_138.html#s03_07_07_01_03">SOR Switch</a>
</li>
<li>
<code>P5</code> : <a href="s_138.html#s03_07_07_01_04">SOR Offset</a>
</li>
<li>
<code>P6</code> : <a href="s_138.html#s03_07_07_01_05">SOR Angle</a>
</li>
</ul>
<a name="s03_07_07_02_i54"><a name="f_poly4"></a>
<p>
<code>f_poly4(x,y,z, P0, P1, P2, P3, P4)</code>. This <code>f_poly4</code> can be used to generate the surface of
revolution of any polynomial up to degree 4.<br>To put it another way: If we call the parameters A, B, C, D, E; then
this function generates the surface of revolution formed by revolving "x = A + By + Cy2 + Dy3 + Ey4" around
the Y axis.
</p>
<ul>
<li>
<code>P0</code> : Constant
</li>
<li>
<code>P1</code> : Y coefficient
</li>
<li>
<code>P2</code> : Y2 coefficient
</li>
<li>
<code>P3</code> : Y3 coefficient
</li>
<li>
<code>P4</code> : Y4 coefficient
</li>
</ul>
<a name="s03_07_07_02_i55"><a name="f_polytubes"></a>
<p>
<code>f_polytubes(x,y,z, P0, P1, P2, P3, P4, P5)</code>. The 'Polytubes' surface consists of a number of tubes.
Each tube follows a 2d curve which is specified by a polynomial of degree 4 or less. If we look at the parameters,
then this function generates "P0" tubes which all follow the equation " x = P1 + P2y + P3y2 + P4y3 +
P5y4 " arranged around the Y axis. <br>This function needs a positive threshold (fatness of the tubes).
</p>
<ul>
<li>
<code>P0</code> : Number of tubes
</li>
<li>
<code>P1</code> : Constant
</li>
<li>
<code>P2</code> : Y coefficient
</li>
<li>
<code>P3</code> : Y2 coefficient
</li>
<li>
<code>P4</code> : Y3 coefficient
</li>
<li>
<code>P5</code> : Y4 coefficient
</li>
</ul>
<a name="s03_07_07_02_i56"><a name="f_quantum"></a>
<p>
<code>f_quantum(x,y,z, P0)</code>. It resembles the shape of the electron density cloud for one of the d orbitals.
</p>
<ul>
<li>
<code>P0</code> : Not used, but required
</li>
</ul>
<a name="s03_07_07_02_i57"><a name="f_quartic_paraboloid"></a>
<p>
<code>f_quartic_paraboloid(x,y,z, P0)</code>. The 'Quartic Paraboloid' is similar to a paraboloid, but has a
squarer shape.
</p>
<ul>
<li>
<code>P0</code> : <a href="s_138.html#s03_07_07_01_01">Field Strength</a> (Needs a negative field strength or a
negated function)
</li>
</ul>
<a name="s03_07_07_02_i58"><a name="f_quartic_saddle"></a>
<p>
<code>f_quartic_saddle(x,y,z, P0)</code>. The 'Quartic saddle' is similar to a saddle, but has a squarer shape.
</p>
<ul>
<li>
<code>P0</code> : <a href="s_138.html#s03_07_07_01_01">Field Strength</a>
</li>
</ul>
<a name="s03_07_07_02_i59"><a name="f_quartic_cylinder"></a>
<p>
<code>f_quartic_cylinder(x,y,z, P0, P1, P2)</code>. The 'Quartic cylinder' looks a bit like a cylinder that is
swallowed an egg.
</p>
<ul>
<li>
<code>P0</code> : <a href="s_138.html#s03_07_07_01_01">Field Strength</a> (Needs a negative field strength or a
negated function)
</li>
<li>
<code>P1</code> : Diameter of the "egg"
</li>
<li>
<code>P2</code> : Controls the width of the tube and the vertical scale of the "egg"
</li>
</ul>
<a name="s03_07_07_02_i60"><a name="f_r"></a>
<p>
<code>f_r(x,y,z)</code> = sqrt( x*x + y*y + z*z ) <br>When used alone, the "R" function gives a surface
that consists of all the points that are a specific distance (threshold value) from the origin, i.e. a sphere. Also
look at <code>f_ph</code> and <code>f_th</code> <a name="s03_07_07_02_i61"><a name="f_ridge"></a>
</p>
<p>
<code>f_ridge(x,y,z, P0, P1, P2, P3, P4, P5)</code>. This function is mainly intended for modifying other surfaces
as you might use a height field or to use as pigment function. Other functions of interest are <code>f_hetero_mf</code>
and <code>f_ridged_mf</code>.
</p>
<ul>
<li>
<code>P0</code> : Lambda
</li>
<li>
<code>P1</code> : Octaves
</li>
<li>
<code>P2</code> : Omega
</li>
<li>
<code>P3</code> : Offset
</li>
<li>
<code>P4</code> : Ridge
</li>
<li>
<code>P5</code> : Generator type used to generate the noise3d. 0, 1, 2 and 3 are legal values.
</li>
</ul>
<a name="s03_07_07_02_i62"><a name="f_ridged_mf"></a>
<p>
<code>f_ridged_mf(x,y,z, P0, P1, P2, P3, P4, P5)</code>. The "Ridged Multifractal" surface can be used to
create multifractal height fields and patterns. 'Multifractal' refers to their characteristic of having a fractal
dimension which varies with altitude. They are built from summing noise of a number of frequencies. The f_ridged_mf
parameters determine how many, and which frequencies are to be summed, and how the different frequencies are weighted
in the sum. <br>An advantage to using these instead of a <code>height_field{}</code> from an image is that the
ridged_mf function domain extends arbitrarily far in the x and z directions so huge landscapes can be made without
losing resolution or having to tile a height field. Other functions of interest are <code>f_hetero_mf</code> and <code>f_ridge</code>.
</p>
<ul>
<li>
<code>P0</code> : H is the negative of the exponent of the basis noise frequencies used in building these
functions (each frequency f's amplitude is weighted by the factor fE- H ). When H is 1, the fractalization is
relatively smooth. As H nears 0, the high frequencies contribute equally with low frequencies
</li>
<li>
<code>P1</code> : Lacunarity is the multiplier used to get from one "octave" to the next in the
"fractalization". <br>This parameter affects the size of the frequency gaps in the pattern. (Use values
greater than 1.0)
</li>
<li>
<code>P2</code> : Octaves is the number of different frequencies added to the fractal. Each octave frequency is
the previous one multiplied by "Lacunarity". So, using a large number of octaves can get into very high
frequencies very quickly
</li>
<li>
<code>P3</code> : Offset gives a fractal whose fractal dimension changes from altitude to altitude. The high
frequencies at low altitudes are more damped than at higher altitudes, so that lower altitudes are smoother than
higher areas
</li>
<li>
<code>P4</code> : Gain weights the successive contributions to the accumulated fractal result to make creases
stick up as ridges
</li>
<li>
<code>P5</code> : Generator type used to generate the noise3d. 0, 1, 2 and 3 are legal values.
</li>
</ul>
<a name="s03_07_07_02_i63"><a name="f_rounded_box"></a>
<p>
<code>f_rounded_box(x,y,z, P0, P1, P2, P3)</code>. The Rounded Box is defined in a cube from <-1, -1, -1> to
<1, 1, 1>. By changing the " Scale" parameters, the size can be adjusted, without affecting the Radius
of curvature.
</p>
<ul>
<li>
<code>P0</code> : Radius of curvature. Zero gives square corners, 0.1 gives corners that match "sphere {0,
0.1}"
</li>
<li>
<code>P1</code> : Scale x
</li>
<li>
<code>P2</code> : Scale y
</li>
<li>
<code>P3</code> : Scale z
</li>
</ul>
<a name="s03_07_07_02_i64"><a name="f_sphere"></a>
<p>
<code>f_sphere(x,y,z, P0)</code>
</p>
<ul>
<li>
<code>P0</code>: radius of the sphere
</li>
</ul>
<a name="s03_07_07_02_i65"><a name="f_spikes"></a>
<p>
<code>f_spikes(x,y,z, P0, P1, P2, P3, P4)</code>
</p>
<ul>
<li>
<code>P0</code> : Spikiness. Set this to very low values to increase the spikes. Set it to 1 and you get a sphere
</li>
<li>
<code>P1</code> : Hollowness. Increasing this causes the sides to bend in more
</li>
<li>
<code>P2</code> : Size. Increasing this increases the size of the object
</li>
<li>
<code>P3</code> : Roundness. This parameter has a subtle effect on the roundness of the spikes
</li>
<li>
<code>P4</code> : Fatness. Increasing this makes the spikes fatter
</li>
</ul>
<a name="s03_07_07_02_i66"><a name="f_spikes_2d"></a>
<p>
<code>f_spikes_2d(x,y,z, P0, P1, P2, P3)</code> =2-D function : f = f( x, z ) - y
</p>
<ul>
<li>
<code>P0</code> : Height of central spike
</li>
<li>
<code>P1</code> : Frequency of spikes in the X direction
</li>
<li>
<code>P2</code> : Frequency of spikes in the Z direction
</li>
<li>
<code>P3</code> : Rate at which the spikes reduce as you move away from the center
</li>
</ul>
<a name="s03_07_07_02_i67"><a name="f_spiral"></a>
<p>
<code>f_spiral(x,y,z, P0, P1, P2, P3, P4, P5)</code>
</p>
<ul>
<li>
<code>P0</code> : Distance between windings
</li>
<li>
<code>P1</code> : Thickness
</li>
<li>
<code>P2</code> : Outer diameter of the spiral. The surface behaves as if it is contained_by a sphere of this
diameter
</li>
<li>
<code>P3</code> : Not used
</li>
<li>
<code>P4</code> : Not used
</li>
<li>
<code>P5</code> : <a href="s_138.html#s03_07_07_01">Cross section type</a>
</li>
</ul>
<a name="s03_07_07_02_i68"><a name="f_steiners_roman"></a>
<p>
<code>f_steiners_roman(x,y,z, P0)</code>. The "Steiners Roman" is composed of four identical triangular
pads which together make up a sort of rounded tetrahedron. There are creases along the X, Y and Z axes where the pads
meet.
</p>
<ul>
<li>
<code>P0</code> : <a href="s_138.html#s03_07_07_01_01">Field Strength</a> (Needs a negative field strength or a
negated function)
</li>
</ul>
<a name="s03_07_07_02_i69"><a name="f_strophoid"></a>
<p>
<code>f_strophoid(x,y,z, P0, P1, P2, P3)</code>. The "Strophoid" is like an infinite plane with a bulb
sticking out of it.
</p>
<ul>
<li>
<code>P0</code> : <a href="s_138.html#s03_07_07_01_01">Field Strength</a> (Needs a negative field strength or a
negated function)
</li>
<li>
<code>P1</code> : Size of bulb. Larger values give larger bulbs. Negative values give a bulb on the other side of
the plane
</li>
<li>
<code>P2</code> : Sharpness. When zero, the bulb is like a sphere that just touches the plane. When positive,
there is a crossover point. When negative the bulb simply bulges out of the plane like a pimple
</li>
<li>
<code>P3</code> : Flatness. Higher values make the top end of the bulb fatter
</li>
</ul>
<a name="s03_07_07_02_i70"><a name="f_strophoid_2d"></a>
<p>
<code>f_strophoid_2d(x,y,z, P0, P1, P2, P3, P4, P5, P6)</code>. The 2d strophoid curve can be extruded in the Z
direction or rotated about various axes by using the SOR parameters.
</p>
<ul>
<li>
<code>P0</code> : <a href="s_138.html#s03_07_07_01_01">Field Strength</a>
</li>
<li>
<code>P1</code> : Size of bulb. Larger values give larger bulbs. Negative values give a bulb on the other side of
the plane
</li>
<li>
<code>P2</code> : Sharpness. When zero, the bulb is like a sphere that just touches the plane. When positive,
there is a crossover point. When negative the bulb simply bulges out of the plane like a pimple
</li>
<li>
<code>P3</code> : Fatness. Higher values make the top end of the bulb fatter
</li>
<li>
<code>P4</code> : <a href="s_138.html#s03_07_07_01_03">SOR Switch</a>
</li>
<li>
<code>P5</code> : <a href="s_138.html#s03_07_07_01_04">SOR Offset</a>
</li>
<li>
<code>P6</code> : <a href="s_138.html#s03_07_07_01_05">SOR Angle</a>
</li>
</ul>
<a name="s03_07_07_02_i71"><a name="f_superellipsoid"></a>
<p>
<code>f_superellipsoid(x,y,z, P0, P1)</code>. Needs a negative field strength or a negated function.
</p>
<ul>
<li>
<code>P0</code> : east-west exponentx
</li>
<li>
<code>P1</code> : north-south exponent
</li>
</ul>
<a name="s03_07_07_02_i72"><a name="f_th"></a>
<p>
<code>f_th(x,y,z)</code> = atan2( x, z ) <br><code>f_th()</code> is a function that is only useful when combined
with other surfaces. <br>It produces a value which is equal to the "theta" angle, in radians, at any point.
The theta angle is like the longitude coordinate on the Earth. It stays the same as you move north or south, but
varies from east to west. Also look at <code>f_ph</code> and <code>f_r</code> <a name="s03_07_07_02_i73"><a name="f_torus"></a>
</p>
<p>
<code>f_torus(x,y,z, P0, P1)</code>
</p>
<ul>
<li>
<code>P0</code> : Major radius
</li>
<li>
<code>P1</code> : Minor radius
</li>
</ul>
<a name="s03_07_07_02_i74"><a name="f_torus2"></a>
<p>
<code>f_torus2(x,y,z, P0, P1, P2)</code>. This is different from the f_torus function which just has the major and
minor radii as parameters.
</p>
<ul>
<li>
<code>P0</code> : <a href="s_138.html#s03_07_07_01_01">Field Strength</a> (Needs a negative field strength or a
negated function)
</li>
<li>
<code>P1</code> : Major radius
</li>
<li>
<code>P2</code> : Minor radius
</li>
</ul>
<a name="s03_07_07_02_i75"><a name="f_torus_gumdrop"></a>
<p>
<code>f_torus_gumdrop(x,y,z, P0)</code>. The "Torus Gumdrop" surface is something like a torus with a
couple of gumdrops hanging off the end.
</p>
<ul>
<li>
<code>P0</code> : <a href="s_138.html#s03_07_07_01_01">Field Strength</a> (Needs a negative field strength or a
negated function)
</li>
</ul>
<a name="s03_07_07_02_i76"><a name="f_umbrella"></a>
<p>
<code>f_umbrella(x,y,z, P0)</code>
</p>
<ul>
<li>
<code>P0</code> : <a href="s_138.html#s03_07_07_01_01">Field Strength</a> (Needs a negative field strength or a
negated function)
</li>
</ul>
<a name="s03_07_07_02_i77"><a name="f_witch_of_agnesi"></a>
<p>
<code>f_witch_of_agnesi(x,y,z, P0, P1, P2, P3, P4, P5)</code>. The "Witch of Agnesi" surface looks
something like a witches hat.
</p>
<ul>
<li>
<code>P0</code> : <a href="s_138.html#s03_07_07_01_01">Field Strength</a> (Needs a negative field strength or a
negated function)
</li>
<li>
<code>P1</code> : Controls the width of the spike. The height of the spike is always about 1 unit
</li>
</ul>
<a name="s03_07_07_02_i78"><a name="f_witch_of_agnesi_2d"></a>
<p>
<code>f_witch_of_agnesi_2d(x,y,z, P0, P1, P2, P3, P4, P5)</code>. The 2d version of the "Witch of Agnesi"
curve can be extruded in the Z direction or rotated about various axes by use of the SOR parameters.
</p>
<ul>
<li>
<code>P0</code> : <a href="s_138.html#s03_07_07_01_01">Field Strength</a> (Needs a negative field strength or a
negated function)
</li>
<li>
<code>P1</code> : Controls the size of the spike
</li>
<li>
<code>P2</code> : Controls the height of the spike
</li>
<li>
<code>P3</code> : <a href="s_138.html#s03_07_07_01_03">SOR Switch</a>
</li>
<li>
<code>P4</code> : <a href="s_138.html#s03_07_07_01_04">SOR Offset</a>
</li>
<li>
<code>P5</code> : <a href="s_138.html#s03_07_07_01_05">SOR Angle</a>
</li>
</ul>
<h4><a name="s03_07_07_03">3.7.7.3 </a>Pre defined functions</h4>
<a name="s03_07_07_03_i1"><a name="eval_pigment"></a>
<p>
<code>eval_pigment(Pigm, Vect)</code>, This macro evaluates the color of a pigment at a specific point. Some
pigments require more information than simply a point, slope pattern based pigments for example, and will not work
with this macro. However, most pigments will work fine.<br> Parameters:
</p>
<ul>
<li>
<code>Vect</code> = The point at which to evaluate the pigment.
</li>
<li>
<code>Pigm</code> = The pigment to evaluate.
</li>
</ul>
<a name="s03_07_07_03_i2"><a name="f_snoise3d"></a>
<p>
<code>f_snoise3d(x, y, z)</code>. Just like f_noise3d(), but returns values in the range [-1, 1]. <a name="s03_07_07_03_i3"><a name="f_sine_wave"></a>
</p>
<p>
<code>f_sine_wave(val, amplitude, frequency)</code>. Turns a ramping waveform into a sine waveform. <a name="s03_07_07_03_i4"><a name="f_scallop_wave"></a>
</p>
<p>
<code>f_scallop_wave(val, amplitude, frequency)</code>. Turns a ramping waveform into a "scallop_wave"
waveform.
</p>
<h5><a name="s03_07_07_03_01">3.7.7.3.1 </a>Pattern functions</h5>
<p>
Predefined pattern functions, useful for building custom function patterns or performing "displacement
mapping" on isosurfaces. Many of them are not really useful for these purposes, they are simply included for
completeness.
</p>
<p>
Some are not implemented at all because they require special parameters that must be specified in the definition,
or information that is not available to pattern functions. For this reason, you probably would want to define your own
versions of these functions.
</p>
<p>
All of these functions take three parameters, the XYZ coordinates of the point to evaluate the pattern at.
</p>
<dl>
<dt>
<code>f_agate(x, y, z)</code>
<dt>
<code>f_boxed(x, y, z)</code>
<dt>
<code>f_bozo(x, y, z)</code>
<dt>
<code>f_brick(x, y, z)</code>
<dt>
<code>f_bumps(x, y, z)</code>
<dt>
<code>f_checker(x, y, z)</code>
<dt>
<code>f_crackle(x, y, z)</code>
<dd>
This pattern has many more options, this function uses the defaults.
<dt>
<code>f_cylindrical(x, y, z)</code>
<dt>
<code>f_dents(x, y, z)</code>
<dt>
<code>f_gradientX(x, y, z)</code>
<dt>
<code>f_gradientY(x, y, z)</code>
<dt>
<code>f_gradientZ(x, y, z)</code>
<dt>
<code>f_granite(x, y, z)</code>
<dt>
<code>f_hexagon(x, y, z)</code>
<dt>
<code>f_leopard(x, y, z)</code>
<dt>
<code>f_mandel(x, y, z)</code>
<dd>
Only the basic mandel pattern is implemented, its variants and the other fractal patterns are not implemented.
<dt>
<code>f_marble(x, y, z)</code>
<dt>
<code>f_onion(x, y, z)</code>
<dt>
<code>f_planar(x, y, z)</code>
<dt>
<code>f_radial(x, y, z)</code>
<dt>
<code>f_ripples(x, y, z)</code>
<dt>
<code>f_spherical(x, y, z)</code>
<dt>
<code>f_spiral1(x, y, z)</code>
<dt>
<code>f_spiral2(x, y, z)</code>
<dt>
<code>f_spotted(x, y, z)</code>
<dt>
<code>f_waves(x, y, z)</code>
<dt>
<code>f_wood(x, y, z)</code>
<dt>
<code>f_wrinkles(x, y, z)</code>
</dl>
<br>
<table class="NavBar" width="100%">
<tr>
<td align="left" nowrap="" valign="middle" width="32">
<a href="s_137.html"><img alt="previous" border="0" src="prev.png"></a>
</td>
<td align="left" valign="middle" width="30%">
<a href="s_137.html">3.7.6 finish.inc</a>
</td>
<td align="center" valign="middle">
<strong>3.7.7 functions.inc</strong>
</td>
<td align="right" valign="middle" width="30%">
<a href="s_139.html">3.7.8 glass.inc, glass_old.inc</a>
</td>
<td align="right" nowrap="" valign="middle" width="32">
<a href="s_139.html"><img alt="next" border="0" src="next.png"></a>
</td>
</tr>
</table>
</body> </html>
|