Commit | Line | Data |
---|---|---|
7faf1d71 AW |
1 | <?xml version="1.0" encoding="UTF-8"?>\r |
2 | <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN"\r | |
3 | "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">\r | |
4 | <refentry id="noise">\r | |
5 | <refmeta>\r | |
6 | <refmetainfo>\r | |
7 | <copyright>\r | |
8 | <year>2011</year>\r | |
9 | <holder>Khronos Group</holder>\r | |
10 | </copyright>\r | |
11 | </refmetainfo>\r | |
12 | <refentrytitle>noise</refentrytitle>\r | |
13 | <manvolnum>3G</manvolnum>\r | |
14 | </refmeta>\r | |
15 | <refnamediv>\r | |
16 | <refname>noise</refname>\r | |
17 | <refpurpose>generate values with a pseudo-random noise function</refpurpose>\r | |
18 | </refnamediv>\r | |
19 | <refsynopsisdiv><title>Declaration</title>\r | |
20 | <funcsynopsis>\r | |
21 | <funcprototype>\r | |
22 | <funcdef>float <function>noise1</function></funcdef>\r | |
23 | <paramdef>genType <parameter>x</parameter></paramdef>\r | |
24 | </funcprototype>\r | |
25 | <funcprototype>\r | |
26 | <funcdef>vec2 <function>noise2</function></funcdef>\r | |
27 | <paramdef>genType <parameter>x</parameter></paramdef>\r | |
28 | </funcprototype>\r | |
29 | <funcprototype>\r | |
30 | <funcdef>vec3 <function>noise3</function></funcdef>\r | |
31 | <paramdef>genType <parameter>x</parameter></paramdef>\r | |
32 | </funcprototype>\r | |
33 | <funcprototype>\r | |
34 | <funcdef>vec4 <function>noise4</function></funcdef>\r | |
35 | <paramdef>genType <parameter>x</parameter></paramdef>\r | |
36 | </funcprototype>\r | |
37 | </funcsynopsis>\r | |
38 | </refsynopsisdiv>\r | |
39 | <refsect1 id="parameters"><title>Parameters</title>\r | |
40 | <variablelist>\r | |
41 | <varlistentry>\r | |
42 | <term><parameter>x</parameter></term>\r | |
43 | <listitem>\r | |
44 | <para>\r | |
45 | Specifies the value to be used to seed the noise function.\r | |
46 | </para>\r | |
47 | </listitem>\r | |
48 | </varlistentry>\r | |
49 | </variablelist>\r | |
50 | </refsect1>\r | |
51 | <refsect1 id="description"><title>Description</title>\r | |
52 | <para>\r | |
53 | <function>noise1</function>, <function>noise2</function>, <function>noise3</function> and <function>noise4</function> return\r | |
54 | noise values (vector or scalar) based on the input value <parameter>x</parameter>. The noise function is a stochastic function\r | |
55 | that can be used to increase visual complexity. Values returned by the noise functions give the appearance of randomness,\r | |
56 | but are not truly random. They are defined to have the following characteristics:\r | |
57 | </para>\r | |
58 | <para>\r | |
59 | <itemizedlist>\r | |
60 | <listitem>The return value(s) are always in the range [-1.0,1.0], and cover at least the range [-0.6, 0.6], with a Gaussian-like distribution.</listitem>\r | |
61 | <listitem>The return value(s) have an overall average of 0.0.</listitem>\r | |
62 | <listitem>They are repeatable, in that a particular input value will always produce the same return value.</listitem>\r | |
63 | <listitem>They are statistically invariant under rotation (i.e., no matter how the domain is rotated, it has the same statistical character).</listitem>\r | |
64 | <listitem>They have a statistical invariance under translation (i.e., no matter how the domain is translated, it has the same statistical character).</listitem>\r | |
65 | <listitem>They typically give different results under translation.</listitem>\r | |
66 | <listitem>The spatial frequency is narrowly concentrated, centered somewhere between 0.5 to 1.0.</listitem>\r | |
67 | <listitem>They are C1 continuous everywhere (i.e., the first derivative is continuous).</listitem>\r | |
68 | </itemizedlist>\r | |
69 | </para>\r | |
70 | </refsect1>\r | |
71 | <refsect1 id="versions"><title>Version Support</title>\r | |
72 | <informaltable frame="topbot">\r | |
73 | #VARTABLECOLS#\r | |
74 | <thead>\r | |
75 | #FUNCTABLEHEADER#\r | |
76 | <row>\r | |
77 | <entry>noise1</entry>#newin11#\r | |
78 | </row>\r | |
79 | <row>\r | |
80 | <entry>noise2</entry>#newin11#\r | |
81 | </row>\r | |
82 | <row>\r | |
83 | <entry>noise3</entry>#newin11#\r | |
84 | </row>\r | |
85 | <row>\r | |
86 | <entry>noise4</entry>#newin11#\r | |
87 | </row>\r | |
88 | </thead>\r | |
89 | </tgroup>\r | |
90 | </informaltable>\r | |
91 | </refsect1>\r | |
92 | <refsect1 id="Copyright"><title>Copyright</title>\r | |
93 | <para>\r | |
94 | Copyright <trademark class="copyright"></trademark> 2011 Khronos Group. \r | |
95 | This material may be distributed subject to the terms and conditions set forth in \r | |
96 | the Open Publication License, v 1.0, 8 June 1999.\r | |
97 | <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.\r | |
98 | </para>\r | |
99 | </refsect1>\r | |
100 | </refentry>\r |