POV-Ray : Newsgroups : povray.beta-test : Help clarification for pigment functions in isos Server Time
11 Nov 2024 04:41:49 EST (-0500)
  Help clarification for pigment functions in isos (Message 1 to 5 of 5)  
From: Tom Melly
Subject: Help clarification for pigment functions in isos
Date: 13 Sep 2001 10:59:04
Message: <3ba0c9b8@news.povray.org>
6.5.4.2  Functions in Isosurface
#declare FBozo = function { pigment { bozo color_map { [0 rgb 0] [1 rgb 1] }}}
isosurface {
  function  { FBozo(x,y,z).gray }
  ...
}

Although correct, wouldn't this be better as:

#declare FBozo = function { pigment { bozo color_map { [0 rgb 0] [1 rgb 1] }}}
isosurface {
  function  {y - FBozo(x,0,z).gray }
  ...
}

or similiar?


--
#macro G(D,E,F)#local I=array[3]{D,E,F}#local B=0;triangle{#while(
B<3)#while(I[B])A[mod(I[B],10)]+#local I[B]=div(I[B],10);#end<-5,-
2,9>#local B=B+1;#end}#end #local A=array[7]{x,x*2,x*4,y,y*2,y*4,z
}light_source{-x*6-z*9,1}mesh{G(105,10,146)G(105,246,10)G(105,56,
146)G(105,1256,246)G(1256,126,220)G(22156,2216,201)pigment{rgb 1}}//TM


Post a reply to this message

From: ingo
Subject: Re: Help clarification for pigment functions in isos
Date: 13 Sep 2001 11:41:27
Message: <Xns911BB3F65AF37seed7@povray.org>
in news:3ba0c9b8@news.povray.org Tom Melly wrote:

> Although correct, wouldn't this be better as:
> [...]
>   function  {y - FBozo(x,0,z).gray }
> 

Why?

Ingo

-- 
Photography: http://members.home.nl/ingoogni/
Pov-Ray    : http://members.home.nl/seed7/


Post a reply to this message

From: Tom Melly
Subject: Re: Help clarification for pigment functions in isos
Date: 13 Sep 2001 12:14:38
Message: <3ba0db6e$1@news.povray.org>
"ingo" <ing### [at] homenl> wrote in message
news:Xns### [at] povrayorg...
> in news:3ba0c9b8@news.povray.org Tom Melly wrote:
>
> > Although correct, wouldn't this be better as:
> > [...]
> >   function  {y - FBozo(x,0,z).gray }
> >
>
> Why?
>

Because, and I may be doing something stupid, the following does not actually
render anything as far as I can see...

#declare fn_floor= function{pigment{bozo color_map{[0 rgb 0][1 rgb 1]}}}
isosurface {
  function {fn_floor(x,y,z).gray}
  max_gradient 7
  contained_by {box{<-10,-10,-10>,<10,10,10>}}
  accuracy 0.1
  evaluate 1, 1.2, 0.99
  pigment{rgb 1}
  finish{ambient 1}

}


Post a reply to this message

From: Mike Williams
Subject: Re: Help clarification for pigment functions in isos
Date: 13 Sep 2001 13:55:56
Message: <BdvbKGAYMPo7EwkD@econym.demon.co.uk>
Wasn't it Tom Melly who wrote:
>"ingo" <ing### [at] homenl> wrote in message
>news:Xns### [at] povrayorg...
>> in news:3ba0c9b8@news.povray.org Tom Melly wrote:
>>
>> > Although correct, wouldn't this be better as:
>> > [...]
>> >   function  {y - FBozo(x,0,z).gray }
>> >
>>
>> Why?
>>
>
>Because, and I may be doing something stupid, the following does not actually
>render anything as far as I can see...
>
>#declare fn_floor= function{pigment{bozo color_map{[0 rgb 0][1 rgb 1]}}}
>isosurface {
>  function {fn_floor(x,y,z).gray}
>  max_gradient 7
>  contained_by {box{<-10,-10,-10>,<10,10,10>}}
>  accuracy 0.1
>  evaluate 1, 1.2, 0.99
>  pigment{rgb 1}
>  finish{ambient 1}
>
>}


Because, of course, the specified pigment takes values that are greater
than zero everywhere (using the new default noise_generator settings -
bozo using the old noise algorithm had plateaus at zero) and the default
threshold is zero. The surface only exists at points where the function
is equal to the threshold, and that doesn't happen.

An alternative fix would be to specify something like "threshold 0.5",
but that's a bit of a boring surface.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Tom Melly
Subject: Re: Help clarification for pigment functions in isos
Date: 14 Sep 2001 04:21:38
Message: <3ba1be12@news.povray.org>
"Mike Williams" <mik### [at] nospamplease> wrote in message
news:Bdv### [at] econymdemoncouk...

>
> Because, of course, the specified pigment takes values that are greater
> than zero everywhere (using the new default noise_generator settings -
> bozo using the old noise algorithm had plateaus at zero) and the default
> threshold is zero. The surface only exists at points where the function
> is equal to the threshold, and that doesn't happen.
>

Aha/Doh!

> An alternative fix would be to specify something like "threshold 0.5",
> but that's a bit of a boring surface.
>

Boring I can live with, visible would be nice... what about

#declare fn_floor= function{pigment{bozo color_map{[0 rgb 0][1 rgb 1]}}}
isosurface {function {fn_floor(x,y,z).gray - 0.1}

... which would avoid upsetting any threshold purists...


Post a reply to this message

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