POV-Ray : Newsgroups : povray.binaries.images : Displace warp/gradient pattern (27+31k) : Re: Displace warp/gradient pattern (27+31k) Server Time
19 Aug 2024 00:26:59 EDT (-0400)
  Re: Displace warp/gradient pattern (27+31k)  
From: Christoph Hormann
Date: 20 Feb 2001 04:09:33
Message: <3A92344F.46672CDA@gmx.de>
Chris Huff wrote:
> 
> What exactly does this new gradient pattern do? Is it just a pattern
> version of the displace warp?

That's right, i just copied the code.  I also wrote a warp_pattern using a
warp directly, but i did not yet check for any difference in speed.  

> Hmm, "grad" doesn't seem like a good keyword, but as you mentioned,
> "gradient" is already taken...and so is "slope". Maybe
> "amount_of_change_of_pigment_color_intensity". ;-)
> How about "derivative"? Not as intuitive unless you already know what
> "derivative" means...and it would probably be better as a new math
> function.

Since it calculates the length of the gradient vector, i think derivative
would not be very good.  If it would only calculate the change in one
direction (the partial derivative), which could be an interesting
addition, this would probably be a better name.  

I don't think 'grad' is that bad, because in mathematics  

grad( f(x,y,z) )

stands for the gradient vector.  

> 
> I think your third type is what I intended my second type to
> be...unfortunately, I didn't heavily test the effect of the sample
> distance parameter. It shouldn't affect anything except the accuracy and
> detail of the warp.

I already supposed that, although by dividing through Warp->dist the
amount of displacement becomes quite high with a range of 1.  

warp { 
  displace {
    [Pigment] 
    type 1     
  }
}

would be equivalent to:

warp { 
  displace {
    [Pigment] 
    type 2
    range 0.05
  } 
}

so if default for 'range' is 0.05, the type 1 could be replaced without
any effect on existing scenes using displace warps as long as they don't
change the default distance.

> Are you going to release the source code to your patches?
> 

I'm going to, but i'm planning to add some more things:

- the 'project' pattern (i renamed it to 'visibility' according to your
suggestion)

- Maybe a slope pattern that works for any specified object and not only
for the object it is applied to.  

Christoph

-- 
Christoph Hormann <chr### [at] gmxde>
IsoWood include, radiosity tutorial, TransSkin and other 
things on: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

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