POV-Ray : Newsgroups : povray.general : Request: new simple pattern : Re: Request: new simple pattern Server Time
8 Aug 2024 10:26:57 EDT (-0400)
  Re: Request: new simple pattern  
From: Christoph Hormann
Date: 7 Jan 2001 08:02:31
Message: <3A5868E7.11DD2F4F@gmx.de>
Not sure whether it has everything you wanted, but how about:

#macro Gradient2 (Vector)

  #local FX=vnormalize(Vector).x; 
  #local FY=vnormalize(Vector).y; 
  #local FZ=vnormalize(Vector).z; 
  #local Len=vlength(Vector); 
      
  function {
      min(1,max(0,(x*FX + y*FY + z*FZ)/Len))
  }

#end 

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.