POV-Ray : Newsgroups : povray.general : Square or X gradient Server Time: 22 Oct 2017 21:05:31 GMT
  Square or X gradient (Message 1 to 4 of 4)  
From: Mike Horvath
Subject: Square or X gradient
Date: 21 Feb 2017 22:36:52
Message: <58acc104$1@news.povray.org>
How would I create a pattern such as this:

https://www.filterforge.com/wiki/images/3/32/Square_gradient.jpg

Thanks!


Mike


Post a reply to this message

From: Mike Horvath
Subject: Re: Square or X gradient
Date: 21 Feb 2017 22:52:39
Message: <58acc4b7$1@news.povray.org>
On 2/21/2017 5:37 PM, Mike Horvath wrote:
> How would I create a pattern such as this:
>
> https://www.filterforge.com/wiki/images/3/32/Square_gradient.jpg
>
> Thanks!
>
>
> Mike


Never mind. I was able to piece it together using four triangles, each 
with a different linear gradient.


Mike


Post a reply to this message

From: omniverse
Subject: Re: Square or X gradient
Date: 22 Feb 2017 04:25:01
Message: <web.58ad1216933428799c5d6c810@news.povray.org>
Mike Horvath <mik### [at] gmailcom> wrote:
> On 2/21/2017 5:37 PM, Mike Horvath wrote:
> > How would I create a pattern such as this:
> >
> > https://www.filterforge.com/wiki/images/3/32/Square_gradient.jpg
>
> Never mind. I was able to piece it together using four triangles, each
> with a different linear gradient.

Mike, maybe you didn't remember the boxed pattern?

plane{
    z,0
    pigment{
        boxed
        color_map{
            [0 rgb 0][1 rgb 1]
        }
    }
}

That should be same, except 'finish' statement to adjust.

Bob


Post a reply to this message

From: Alain
Subject: Re: Square or X gradient
Date: 23 Feb 2017 01:02:52
Message: <58ae34bc@news.povray.org>
Le 17-02-21 à 17:37, Mike Horvath a écrit :
> How would I create a pattern such as this:
>
> https://www.filterforge.com/wiki/images/3/32/Square_gradient.jpg
>
> Thanks!
>
>
> Mike

box{<-1,-1,0><1,1,1> pigment{boxed}}
or
plane{z, 0 pigment{boxed}}
The pattern appears only once, centered at the origin.

It start at a value of 1 at the origin and drop to zero at the edge of 
box{-1,1}

You can use :
translate 1 // make it fit the warp span
  warp{repeat x*2}
  warp{repeat y*2}
  warp{repeat z*2}
translate -1 // take it back to it's otiginal location
to make it fill the space.


Post a reply to this message

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