Difference between revisions of "Reference Talk:Potential Pattern"
Line 37: | Line 37: | ||
than the other way round. | than the other way round. | ||
---- | ---- | ||
+ | |||
+ | Another thing that might be worth mentioning is that an isosurface's container has no effect on the potential pattern. |
Revision as of 18:22, 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.
Another thing that might be worth mentioning is that an isosurface's container has no effect on the potential pattern.