POV-Ray : Newsgroups : povray.binaries.images : Blob Potential Pattern : Re: Blob Potential Pattern Server Time
12 Nov 2024 17:19:24 EST (-0500)
  Re: Blob Potential Pattern  
From: clipka
Date: 12 Sep 2016 16:14:28
Message: <57d70ca4$1@news.povray.org>
Am 11.09.2016 um 20:54 schrieb clipka:
> Work in progress.

Source code available now here:

https://github.com/c-lipka/povray/tree/feature/potential_pattern

Integration into POV-Ray proper to follow later.


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.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.