  | 
  | 
 | 
  | 
 | 
  | 
 |   | 
 |   | 
 | 
  | 
 | 
  | 
 |   | 
 |   | 
 | 
  | 
"Kenneth" <kdw### [at] gmail com> wrote:
>
> ...And I was wondering where those moire patterns
> were coming from-- thinking that the planet was just a simple sphere object, not
> an isosurface.)
Just took a look at COMPATT's previous post about this. Duh.
 
 Post a reply to this message 
 | 
  | 
 |   | 
 |   | 
 | 
  | 
From: Thomas de Groot 
Subject: Re: Moire patterns when trying to create isosurface sphere 
Date:  7 Jan 2019 02:40:03 
Message: <5c330253$1@news.povray.org> 
 | 
 
 
 | 
  | 
 |   | 
 |   | 
 | 
  | 
On 6-1-2019 19:43, jr wrote:
> hi,
> 
> "Kenneth" <kdw### [at] gmail com> wrote:
>> "jr" <cre### [at] gmail com> wrote:
>>> with 'polarity on'
>> ??
>> What's that? I must have missed a new feature(?) somehow...
> 
> looks like you did.  :-)  the last paragraph in section "3.5.1.1.6 Isosurface"
> in the 3.8 docs reads:
> 
> By default, the inside of an isosurface is defined as the set of all points
> inside the contained_by shape where the function values are below the threshold.
> New in version 3.8 this can be changed via the polarity keyword. Specifying a
> positive setting or on will instead cause function values above the threshold to
> be considered inside. Specifying a negative setting or off will give the default
> behavior.
> 
Interesting. I missed that too. Going to play right now as I am working 
on an isosurface...
-- 
Thomas
 
 Post a reply to this message 
 | 
  | 
 |   | 
 |   | 
 | 
  | 
From: Thomas de Groot 
Subject: Re: Moire patterns when trying to create isosurface sphere 
Date:  7 Jan 2019 02:50:01 
Message: <5c3304a9$1@news.povray.org> 
 | 
 
 
 | 
  | 
 |   | 
 |   | 
 | 
  | 
On 7-1-2019 8:40, Thomas de Groot wrote:
> 
> Interesting. I missed that too. Going to play right now as I am working 
> on an isosurface...
> 
Hmmm... right. Not what I expected. Polarity may be only relevant if the 
contained_by shape is close to the isosurface one, i.e. spheres, 
cylinders, cubes. Otherwise, I don't understand its usefulness. Polarity 
on just renders the contained_by shape, whatever its (positive) value.
Did I miss something? Probably.
-- 
Thomas
 
 Post a reply to this message 
 | 
  | 
 |   | 
 |   | 
 | 
  | 
From: clipka 
Subject: Re: Moire patterns when trying to create isosurface sphere 
Date:  7 Jan 2019 05:45:39 
Message: <5c332dd3$1@news.povray.org> 
 | 
 
 
 | 
  | 
 |   | 
 |   | 
 | 
  | 
Am 07.01.2019 um 08:49 schrieb Thomas de Groot:
> On 7-1-2019 8:40, Thomas de Groot wrote:
>>
>> Interesting. I missed that too. Going to play right now as I am 
>> working on an isosurface...
>>
> 
> Hmmm... right. Not what I expected. Polarity may be only relevant if the 
> contained_by shape is close to the isosurface one, i.e. spheres, 
> cylinders, cubes. Otherwise, I don't understand its usefulness. Polarity 
> on just renders the contained_by shape, whatever its (positive) value.
> 
> Did I miss something? Probably.
The magnitude of the `polarity` paramezer is irrelevant, only the sign 
matters (or, more precisely, whether the parameter is positive; zero has 
the same effect as a negative value).
`polarity 1` should have the same effect as flipping the signs of both 
the function and the threshold.
If your isosurface is fully inside the `contained_by` shpe, then it is 
perfectly normal that `polarity 1` will cause you to see only the 
`contained_by` shape, because everything outside the `contained_by` 
shape is always considered "outside" (*), while inside that shape the 
"inside" and "outside" are now the other way round.
To just flip "inside" and "outside" (including the space outside the 
`contained_by` shape, you should use the `inverse` keyword instead.
The `polarity` keyword is primarily intended to complement the 
`potential` pattern feature, which would behave inconsistently between 
blobs and isosurfaces unless positive polarity mode is used for the latter.
 
 Post a reply to this message 
 | 
  | 
 |   | 
 |   | 
 | 
  | 
From: Thomas de Groot 
Subject: Re: Moire patterns when trying to create isosurface sphere 
Date:  7 Jan 2019 06:54:11 
Message: <5c333de3$1@news.povray.org> 
 | 
 
 
 | 
  | 
 |   | 
 |   | 
 | 
  | 
On 7-1-2019 11:45, clipka wrote:
> Am 07.01.2019 um 08:49 schrieb Thomas de Groot:
>> On 7-1-2019 8:40, Thomas de Groot wrote:
>>>
>>> Interesting. I missed that too. Going to play right now as I am 
>>> working on an isosurface...
>>>
>>
>> Hmmm... right. Not what I expected. Polarity may be only relevant if 
>> the contained_by shape is close to the isosurface one, i.e. spheres, 
>> cylinders, cubes. Otherwise, I don't understand its usefulness. 
>> Polarity on just renders the contained_by shape, whatever its 
>> (positive) value.
>>
>> Did I miss something? Probably.
> 
> The magnitude of the `polarity` paramezer is irrelevant, only the sign 
> matters (or, more precisely, whether the parameter is positive; zero has 
> the same effect as a negative value).
> 
> `polarity 1` should have the same effect as flipping the signs of both 
> the function and the threshold.
> 
> If your isosurface is fully inside the `contained_by` shpe, then it is 
> perfectly normal that `polarity 1` will cause you to see only the 
> `contained_by` shape, because everything outside the `contained_by` 
> shape is always considered "outside" (*), while inside that shape the 
> "inside" and "outside" are now the other way round.
> 
> To just flip "inside" and "outside" (including the space outside the 
> `contained_by` shape, you should use the `inverse` keyword instead.
> 
> 
> The `polarity` keyword is primarily intended to complement the 
> `potential` pattern feature, which would behave inconsistently between 
> blobs and isosurfaces unless positive polarity mode is used for the latter.
OK, I guess I understand. I then wonder if the polarity use by Jr to 
solve COMPATT's problem is correct. My uneducated guess would be 'no'. ;-)
-- 
Thomas
 
 Post a reply to this message 
 | 
  | 
 |   | 
 |   | 
 | 
  | 
 | 
  | 
 |   | 
 |   | 
 | 
  | 
hi,
clipka <ano### [at] anonymous org> wrote:
> Am 07.01.2019 um 08:49 schrieb Thomas de Groot:
> > On 7-1-2019 8:40, Thomas de Groot wrote:
> > Hmmm... right. Not what I expected. ...
>
> The magnitude of the `polarity` paramezer is irrelevant, only the sign
> matters (or, more precisely, whether the parameter is positive; zero has
> the same effect as a negative value).
so why is the parameter a float, when (just) a boolean would seem to be a better
fit?  future expansion?
regards, jr.
 
 Post a reply to this message 
 | 
  | 
 |   | 
 |   | 
 | 
  | 
 | 
  | 
 |   | 
 |   | 
 | 
  | 
hi,
Thomas de Groot <tho### [at] degroot org> wrote:
> OK, I guess I understand. I then wonder if the polarity use by Jr to
> solve COMPATT's problem is correct. My uneducated guess would be 'no'. ;-)
correct, hence "I'm sure it isn't "the correct way" of doing, but.." result.
btw, is your computer's clock off by (about) 2 minutes?
regards, jr.
 
 Post a reply to this message 
 | 
  | 
 |   | 
 |   | 
 | 
  | 
 | 
  | 
 |   | 
 |   | 
 | 
  | 
hi,
"Kenneth" <kdw### [at] gmail com> wrote:
> "Kenneth" <kdw### [at] gmail com> wrote:
> > ...And I was wondering where those moire patterns
> > were coming from-- thinking that the planet was just a simple sphere object, not
> > an isosurface.)
> Just took a look at COMPATT's previous post about this. Duh.
the clue was in the title!  :-)  (more of a grin ;-))
regards, jr.
 
 Post a reply to this message 
 | 
  | 
 |   | 
 |   | 
 | 
  | 
From: clipka 
Subject: Re: Moire patterns when trying to create isosurface sphere 
Date:  7 Jan 2019 11:22:10 
Message: <5c337cb2$1@news.povray.org> 
 | 
 
 
 | 
  | 
 |   | 
 |   | 
 | 
  | 
Am 07.01.2019 um 12:53 schrieb jr:
>> The magnitude of the `polarity` paramezer is irrelevant, only the sign
>> matters (or, more precisely, whether the parameter is positive; zero has
>> the same effect as a negative value).
> 
> so why is the parameter a float, when (just) a boolean would seem to be a better
> fit?  future expansion?
No; I just think the parameter should be `polarity SIGN` rather than 
`positive_polarity BOOL`; but POV-Ray doesn't have a `SIGN` type, so I 
went for the next best thing, which is the sign of a `FLOAT`. So in a 
sense the "most official" syntax is `polarity +1` or `polarity -1`.
Since this has the side effect that `polarity on` /will/ also inevitably 
work, I opted to make `polarity off` work as well (meaning `polarity 0` 
would have to act like `polarity -1`).
Allowing for arbitrary magnitude was also pretty much a no-brainer, 
because it simplifies the implementation, while having the side effect 
that it is easier to use in cases where the polarity might be derived 
from some computed value.
 
 Post a reply to this message 
 | 
  | 
 |   | 
 |   | 
 | 
  | 
 | 
  | 
 |   | 
 |   | 
 | 
  | 
hi,
clipka <ano### [at] anonymous org> wrote:
> Am 07.01.2019 um 12:53 schrieb jr:
> > so why is the parameter a float, when (just) a boolean would seem to be a better
> > fit?  future expansion?
>
> No; I just think the parameter should be `polarity SIGN` rather than
> `positive_polarity BOOL`; but POV-Ray doesn't have a `SIGN` type, so I
> went for the next best thing, which is the sign of a `FLOAT`. So in a
> sense the "most official" syntax is `polarity +1` or `polarity -1`.
>
> Since this has the side effect that `polarity on` /will/ also inevitably
> work, I opted to make `polarity off` work as well (meaning `polarity 0`
> would have to act like `polarity -1`).
ah, thank you.
> Allowing for arbitrary magnitude was also pretty much a no-brainer,
> because it simplifies the implementation, while having the side effect
> that it is easier to use in cases where the polarity might be derived
> from some computed value.
regards, jr.
 
 Post a reply to this message 
 | 
  | 
 |   | 
 |   | 
 | 
  | 
 | 
  | 
 |   |