Difference between revisions of "Reference Talk:Potential Pattern"

From POV-Wiki
Jump to navigation Jump to search
(edited the wrong pattern, sorry)
Line 1: Line 1:
 +
Copied from a post in povray.binaries.images:
  
 +
-----
 +
Syntax for the new pattern is as follows (using pigment as an example):
 +
 +
    pigment {
 +
      potential { BLOB | ISOSURFACE }
 +
      [ threshold BOOL ]
 +
      [ PIGMENT_MODIFIERS... ]
 +
    }
 +
 +
With `threshold` set to `on`, the pattern will take the blob or
 +
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
 +
explicitly specify a `wave_type`).
 +
 +
Applying the "inverse" keyword to the object will cause the pattern to
 +
be reversed as well; thus, when using `threshold on`, for blobs positive
 +
pattern values always indicate inside, while negative values indicate
 +
outside.
 +
 +
 +
Note that by default this is just the other way round for isosurfaces
 +
(which had annoyed me multiple times already); for easier use, the new
 +
pattern is therefore accompanied by an extension to the isosurface syntax:
 +
 +
    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.
 +
----

Revision as of 18:13, 19 December 2016

Copied from a post in povray.binaries.images:


Syntax for the new pattern is as follows (using pigment as an example):

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

With `threshold` set to `on`, the pattern will take the blob or 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 explicitly specify a `wave_type`).

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


Note that by default this is just the other way round for isosurfaces (which had annoyed me multiple times already); for easier use, the new pattern is therefore accompanied by an extension to the isosurface syntax:

   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.