Difference between revisions of "Reference Talk:Potential Pattern"

From POV-Wiki
Jump to navigation Jump to search
m (completed mark up)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
Copied from a post in povray.binaries.images:
+
<p>{{New}} in version 3.7.1 a <code>potential</code> pattern has been added to define a pattern based on the <em>potential</em> field of a <code>blob</code> or <code>isosurface</code> object.</p>
 +
<p>Using <code>pigment</code> in the following example, the syntax for the new pattern is as follows:</p>
  
-----
+
<pre>
Syntax for the new pattern is as follows (using pigment as an example):
+
pigment {
 +
  potential { BLOB | ISOSURFACE }
 +
  [threshold BOOL]
 +
  [PIGMENT_MODIFIERS...]
 +
  }
 +
</pre>
  
    pigment {
+
<p>With <code>threshold on</code> the pattern will take the <code>blob</code> or <code>isosurface</code> object's <em>potential minus the threshold</em>; otherwise it will take the <em>raw potential</em> which is the default behavior.</p>
      potential { BLOB | ISOSURFACE }
 
      [ threshold BOOL ]
 
      [ PIGMENT_MODIFIERS... ]
 
    }
 
  
With `threshold` set to `on`, the pattern will take the blob or
+
<p>The <em>isosurface's</em> container has no effect on the <code>potential</code> pattern.</p>
isosurface object's potential minus the threshold; otherwise it will
 
take the raw potential (the default).
 
  
The pattern value is _not_ bound to the [0..1] range (unless you
+
<p>The pattern value is <em>not</em> bound to the [0..1] range, unless you explicitly specify a <code>wave_type</code>.</p>
explicitly specify a `wave_type`).
 
  
Applying the "inverse" keyword to the object will cause the pattern to
+
<p>Applying the <code>inverse</code> keyword to the object will cause the pattern to be reversed as well; so, when using <code>threshold on</code> for blobs, positive pattern values always indicate inside, while negative values indicate outside.</p>
be reversed as well; thus, when using `threshold on`, for blobs positive
 
pattern values always indicate inside, while negative values indicate
 
outside.
 
  
 +
<p class="Note"><strong>Note:</strong> By default this is the opposite for isosurfaces, so for easier use, the new pattern is therefore accompanied by an extension to the <code>isosurface</code> syntax as shown below:</p>
  
Note that by default this is just the other way round for isosurfaces
+
<pre>
(which had annoyed me multiple times already); for easier use, the new
+
isosurface {
pattern is therefore accompanied by an extension to the isosurface syntax:
+
  ...
 +
  polarity FLOAT
 +
  ...
 +
  }
 +
</pre>
  
    isosurface {
+
<p>Setting <code>polarity</code> to a positive value causes above-threshold values to be interpreted as inside, and below-threshold values as outside, rather than the other way round</p>
      ...
 
      polarity FLOAT
 
      ...
 
    }
 
  
Setting `polarity` to a positive value causes above-threshold values to
+
<p>See also: [[Reference:Blob|Blob]] and [[Reference:Isosurface|Isosurface]]</p>
be interpreted as inside, and below-threshold values as outside, rather
 
than the other way round.
 
----
 

Latest revision as of 11:20, 20 December 2016

New in version 3.7.1 a potential pattern has been added to define a pattern based on the potential field of a blob or isosurface object.

Using pigment in the following example, the syntax for the new pattern is as follows:

pigment {
  potential { BLOB | ISOSURFACE }
  [threshold BOOL]
  [PIGMENT_MODIFIERS...]
  }

With threshold on the pattern will take the blob or isosurface object's potential minus the threshold; otherwise it will take the raw potential which is the default behavior.

The isosurface's container has no effect on the potential pattern.

The pattern value is not bound to the [0..1] range, unless you explicitly specify a wave_type.

Applying the inverse keyword to the object will cause the pattern to be reversed as well; so, when using threshold on for blobs, positive pattern values always indicate inside, while negative values indicate outside.

Note: By default this is the opposite for isosurfaces, so for easier use, the new pattern is therefore accompanied by an extension to the isosurface syntax as shown below:

isosurface {
  ...
  polarity FLOAT
  ...
  }

Setting polarity to a positive value causes above-threshold values to be interpreted as inside, and below-threshold values as outside, rather than the other way round

See also: Blob and Isosurface