POV-Ray : Newsgroups : povray.beta-test : Slope pattern Server Time
12 Nov 2024 20:02:31 EST (-0500)
  Slope pattern (Message 1 to 4 of 4)  
From: Trevor Quayle
Subject: Slope pattern
Date: 23 Sep 2001 15:38:46
Message: <3bae3a46@news.povray.org>
3.5 beta3 Windows

Slope pattern still does not work for slope = 1
See attached scene file, the flat top of the object should be red.

-tgq


camera{
  direction<0,0,1>
  up<0,1,0>
  right<4/3,0,0>
  location <-60,60,-60>
  look_at  0
}

light_source{
  0
  color rgb 1
  translate<-50,200,-50>
}

background {color 0}

#declare MD1=
material{
  texture{
    pigment{rgb 1}
    finish{ambient 0.5 diffuse 0.05}
  }
  texture{
    pigment{
      slope y
      color_map{
        [0.5 rgbt 1]
        [1.0 red 1]
      }
    }
    finish{ambient 0.5 diffuse 0.85}
  }
}

merge{
  torus{20 20}
  cylinder{-20*y 20*y 20}
  material{MD1}
}


Post a reply to this message

From: Ron Parker
Subject: Re: Slope pattern
Date: 24 Sep 2001 16:42:53
Message: <slrn9qv6mf.pbu.ron.parker@fwi.com>
On Sun, 23 Sep 2001 15:31:52 -0400, Trevor Quayle wrote:
>3.5 beta3 Windows
>
>Slope pattern still does not work for slope = 1
>See attached scene file, the flat top of the object should be red.

This is because maps "wrap around" at 1, with the value exactly equal to
1 not being represented in the map.  Something with slope exactly equal 
to 1 (well, not really, but you know what I mean) will use the value at the 
0 end of the map.

A temporary workaround is to use 

      color_map{
        [.000001 red 1]
        [.000001 rgbt 1]
        [0.5 rgbt 1]
        [1.0 red 1]
      }

instead of the color_map you had.  This is technically correct behavior,
but it's worth discussing whether the slope pattern should be an exception
to the rule.

-- 
#local R=rgb 99;#local P=R-R;#local F=pigment{gradient x}box{0,1pigment{gradient
y pigment_map{[.5F pigment_map{[.3R][.3F color_map{[.15red 99][.15P]}rotate z*45
translate x]}]#local H=pigment{gradient y color_map{[.5P][.5R]}scale 1/3}[.5F
pigment_map{[.3R][.3H][.7H][.7R]}]}}}camera{location.5-3*z}//only my opinions


Post a reply to this message

From: Trevor Quayle
Subject: Re: Slope pattern
Date: 24 Sep 2001 20:38:49
Message: <3bafd219@news.povray.org>
If this is what is happening then I would support making slope pattern an
exception to the rule, if possible.  That way the pattern would make more
sense as the slope pattern does not wrap around in the way that others may.
If 1 represents the positive perpendicular plane, then it should use the 1
value from the colour map.  In the workaround you proposed, the top is
fixed, but if you look at the bottom of the object (move the camera, don't
rotate the object, or change the direction from y to -y), now the flat
bottom is red where it should be white.

-tgq

"Ron Parker" <ron### [at] povrayorg> wrote in message
news:slr### [at] fwicom...
> On Sun, 23 Sep 2001 15:31:52 -0400, Trevor Quayle wrote:
> >3.5 beta3 Windows
> >
> >Slope pattern still does not work for slope = 1
> >See attached scene file, the flat top of the object should be red.
>
> This is because maps "wrap around" at 1, with the value exactly equal to
> 1 not being represented in the map.  Something with slope exactly equal
> to 1 (well, not really, but you know what I mean) will use the value at
the
> 0 end of the map.
>
> A temporary workaround is to use
>
>       color_map{
>         [.000001 red 1]
>         [.000001 rgbt 1]
>         [0.5 rgbt 1]
>         [1.0 red 1]
>       }
>
> instead of the color_map you had.  This is technically correct behavior,
> but it's worth discussing whether the slope pattern should be an exception
> to the rule.
>
> --
> #local R=rgb 99;#local P=R-R;#local F=pigment{gradient
x}box{0,1pigment{gradient
> y pigment_map{[.5F pigment_map{[.3R][.3F color_map{[.15red
99][.15P]}rotate z*45
> translate x]}]#local H=pigment{gradient y color_map{[.5P][.5R]}scale
1/3}[.5F
> pigment_map{[.3R][.3H][.7H][.7R]}]}}}camera{location.5-3*z}//only my
opinions


Post a reply to this message

From: Ron Parker
Subject: Re: Slope pattern
Date: 24 Sep 2001 22:15:47
Message: <slrn9qvq6m.f7.ron.parker@fwi.com>
On Mon, 24 Sep 2001 20:38:36 -0400, Trevor Quayle wrote:
>If this is what is happening then I would support making slope pattern an
>exception to the rule, if possible.  That way the pattern would make more
>sense as the slope pattern does not wrap around in the way that others may.
>If 1 represents the positive perpendicular plane, then it should use the 1
>value from the colour map.  In the workaround you proposed, the top is
>fixed, but if you look at the bottom of the object (move the camera, don't
>rotate the object, or change the direction from y to -y), now the flat
>bottom is red where it should be white.

Good point.   This will be fixed in the next beta.

-- 
#macro R(L P)sphere{L F}cylinder{L P F}#end#macro P(V)merge{R(z+a z)R(-z a-z)R(a
-z-z-z a+z)torus{1F clipped_by{plane{a 0}}}translate V}#end#macro Z(a F T)merge{
P(z+a)P(z-a)R(-z-z-x a)pigment{rgbt 1}hollow interior{media{emission T}}finish{
reflection.1}}#end Z(-x-x.2y)Z(-x-x.4x)camera{location z*-10rotate x*90}


Post a reply to this message

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