POV-Ray : Newsgroups : povray.general : Black on left and white on right. Server Time
31 Oct 2024 10:21:24 EDT (-0400)
  Black on left and white on right. (Message 1 to 3 of 3)  
From: Greg M  Johnson
Subject: Black on left and white on right.
Date: 5 Apr 2000 22:48:27
Message: <38ebfafb$1@news.povray.org>
How do I set up something that is black on the left and white on the
right? Before you answer, I want the demarcation at x=0, and the max &
min extent in x can vary wildly, and it's a BLOB!  (The arms can swing
out.)  This question is no-brainer if we are talking an unchangingsphere
but perhaps not solvable w/ pov if we are talking a blob of varying
extent.

The following solution won't work, because it is reflected over the x=0
plane.

pigment {         gradient x
                        pigment_map{
                         [0       Black]
                         [0.5       Black]
                         [0.51     White]
                         [1       White]
                         }
                         }

If I translate the image map, this won't work either, because it will
start at min extent of the actual figure, something impossible to
determine with a blob.


Post a reply to this message

From: Mark Wagner
Subject: Re: Black on left and white on right.
Date: 6 Apr 2000 01:53:55
Message: <38ec2673@news.povray.org>
Greg M. Johnson <"gregj;-)56590""@aol.c;-)om> wrote in message
<38ebfafb$1@news.povray.org>...
>How do I set up something that is black on the left and white on the
>right? Before you answer, I want the demarcation at x=0, and the max &
>min extent in x can vary wildly, and it's a BLOB!
>The following solution won't work, because it is reflected over the x=0
>plane.


Try this:
pigment

    gradient x
    pigment_map{
        [0       Black]
        [0.5       Black]
        [0.5     White]
        [1       White]
    }
    translate x*-0.5 /* Center the map */
    scale <10000,1,1> /* Make this as large as you want */
}

/* Mark */


Post a reply to this message

From: Greg M  Johnson
Subject: Re: Black on left and white on right.
Date: 6 Apr 2000 08:57:53
Message: <38EC88CB.E14C48E0@my-dejanews.com>
YES! how simple!  I was incorrectly thinking that gradient x had to anchor
itself off the leftmost edge of the object, and hence all my confusion.

Mark Wagner wrote:

> Try this:
> pigment
>
>     gradient x
>     pigment_map{
>         [0       Black]
>         [0.5       Black]
>         [0.5     White]
>         [1       White]
>     }
>     translate x*-0.5 /* Center the map */
>     scale <10000,1,1> /* Make this as large as you want */
> }
>
> /* Mark */


Post a reply to this message

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