POV-Ray : Newsgroups : povray.binaries.images : New Slime-POV feature: function warps : Re: New Slime-POV feature: function warps Server Time
14 Aug 2024 11:17:05 EDT (-0400)
  Re: New Slime-POV feature: function warps  
From: Christoph Hormann
Date: 27 Oct 2002 02:58:30
Message: <3DBB9CA6.EB63EC87@gmx.de>
Christopher James Huff wrote:
> 
> Have you done much with POV functions? They only handle scalars.

That's not a big problem, you can use the average pigment trick with a
pigment function to define a custom vector value function.

> If I understand it correctly, the outputs of the functions are the new
> coordinates of the point. It could very easily do both types of displace
> warps...it makes my displace patch obsolete. This is really what I
> wanted for a displace warp, but I couldn't figure out the old function
> code, pigments were the best I could do...

As i said i think using the function value(s) to define the amount and
direction of displacement seems way more intuitive than thinking in old
coordinates and new coordinates when it comes to random variation of
functions.  If everyone thinks the other functionality is better i can
live with that but i really don't think it would be easier for the
beginner.

With my proposal the type 1 displace warp would look like:

warp {
  function{
    gradient {
      fn_whatever(x, y, z)*multiplier
    }
  }
}

With Slime's current implementation you would have to use:

#declare fn_gradient = 
function {
  gradient {
    fn_whatever(x, y, z)*multiplier
  }
}

warp {
  function{x+fn_gradient(x,y,z).x }
  function{y+fn_gradient(x,y,z).y }
  function{z+fn_gradient(x,y,z).z }
}

And as you said you would need a vector function based version for your
special patch anyway.  

Christoph

-- 
POV-Ray tutorials, IsoWood include,                 
TransSkin and more: http://www.tu-bs.de/~y0013390/  
Last updated 13 Aug. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

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