POV-Ray : Newsgroups : povray.newusers : Gradients Server Time
4 Nov 2024 19:19:17 EST (-0500)
  Gradients (Message 1 to 8 of 8)  
From: Parasonic
Subject: Gradients
Date: 21 Dec 2001 13:37:46
Message: <3c23817a$1@news.povray.org>
I try to find answers by my own, especially by trial and error here, but I
haven't been able to figure this one either. I'm making a sky_sphere, and I
want a single gradient, blue to black, with a median at 0*y. The gradient
now is basically inverted in the lower 'hemisphere' I just need a gradient
of mostly blue in the upper 'hemisphere' to mostly black in the lower one.

Thanks for your help.


Post a reply to this message

From: Warp
Subject: Re: Gradients
Date: 21 Dec 2001 14:07:00
Message: <3c238854@news.povray.org>
Parasonic <par### [at] parasonicpar> wrote:
: I try to find answers by my own, especially by trial and error here, but I
: haven't been able to figure this one either. I'm making a sky_sphere, and I
: want a single gradient, blue to black, with a median at 0*y. The gradient
: now is basically inverted in the lower 'hemisphere' I just need a gradient
: of mostly blue in the upper 'hemisphere' to mostly black in the lower one.

sky_sphere
{ pigment
  { gradient y color_map
    { [0 rgb 0][1 rgb z]
    }
    scale 2 translate -y
  }
}

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

From: Trevor Quayle
Subject: Re: Gradients
Date: 21 Dec 2001 14:09:00
Message: <3c2388cc$1@news.povray.org>
"Parasonic" <par### [at] parasonicpar> wrote in message
news:3c23817a$1@news.povray.org...
> I try to find answers by my own, especially by trial and error here, but I
> haven't been able to figure this one either. I'm making a sky_sphere, and
I
> want a single gradient, blue to black, with a median at 0*y. The gradient
> now is basically inverted in the lower 'hemisphere' I just need a gradient
> of mostly blue in the upper 'hemisphere' to mostly black in the lower one.
>
> Thanks for your help.
>
>
for sky_sphere:

sky_sphere{
  pigment {
    gradient y
    color_map {
      [0.0 rgb <0.0,0.0,0.0>]
      [1.0 rgb <0.0,0.0,1.0>]
    }
   translate -y/2 scale 2
  }
}


-tgq


Post a reply to this message

From: Parasonic
Subject: Re: Gradients
Date: 21 Dec 2001 17:45:22
Message: <3c23bb82$1@news.povray.org>
Thanks, Trevor and Warp!

"Trevor Quayle" <Tin### [at] hotmailcom> wrote in message
news:3c2388cc$1@news.povray.org...
> "Parasonic" <par### [at] parasonicpar> wrote in message
> news:3c23817a$1@news.povray.org...
> > I try to find answers by my own, especially by trial and error here, but
I
> > haven't been able to figure this one either. I'm making a sky_sphere,
and
> I
> > want a single gradient, blue to black, with a median at 0*y. The
gradient
> > now is basically inverted in the lower 'hemisphere' I just need a
gradient
> > of mostly blue in the upper 'hemisphere' to mostly black in the lower
one.
> >
> > Thanks for your help.
> >
> >
> for sky_sphere:
>
> sky_sphere{
>   pigment {
>     gradient y
>     color_map {
>       [0.0 rgb <0.0,0.0,0.0>]
>       [1.0 rgb <0.0,0.0,1.0>]
>     }
>    translate -y/2 scale 2
>   }
> }
>
>
> -tgq
>
>


Post a reply to this message

From: Parasonic
Subject: Re: Gradients
Date: 22 Dec 2001 01:36:25
Message: <3c2429e9$1@news.povray.org>
That interests me..how did you know how to do that? I've looked in the
manual (I printed all x hundred pages a few years ago)..nihil.

Thanks.
"Parasonic" <par### [at] parasonicpar> wrote in message
news:3c23817a$1@news.povray.org...
> I try to find answers by my own, especially by trial and error here, but I
> haven't been able to figure this one either. I'm making a sky_sphere, and
I
> want a single gradient, blue to black, with a median at 0*y. The gradient
> now is basically inverted in the lower 'hemisphere' I just need a gradient
> of mostly blue in the upper 'hemisphere' to mostly black in the lower one.
>
> Thanks for your help.
>
>


Post a reply to this message

From: Jan Walzer
Subject: Re: Gradients
Date: 28 Dec 2001 04:11:48
Message: <3c2c3754@news.povray.org>
not only printing, but reading them helps a lot ...

SCNR .... ;)

--
Jan Walzer <jan### [at] lzernet>


Post a reply to this message

From: John D  Gwinner
Subject: Re: Gradients
Date: 2 Jan 2002 19:38:46
Message: <3c33a816$1@news.povray.org>
This is a follow up question that belongs in 'new users' ..

when you code things like

translate -y

is it really the same thing as

translate <0, -1, 0>  (as the doc's imply)

or is the value 'y' being evaluated inside the color map somewhere?

The reason I'm asking is that I'm using Moray a lot lately, and I can't code
'-y' although I have no problem intercepting the POVRay output, I'm just
wondering if I can code it the other way.

== John ==

"Warp" <war### [at] tagpovrayorg> wrote in message
news:3c238854@news.povray.org...
> Parasonic <par### [at] parasonicpar> wrote:
> : I try to find answers by my own, especially by trial and error here, but
I
> : haven't been able to figure this one either. I'm making a sky_sphere,
and I
> : want a single gradient, blue to black, with a median at 0*y. The
gradient
> : now is basically inverted in the lower 'hemisphere' I just need a
gradient
> : of mostly blue in the upper 'hemisphere' to mostly black in the lower
one.
>
> sky_sphere
> { pigment
>   { gradient y color_map
>     { [0 rgb 0][1 rgb z]
>     }
>     scale 2 translate -y
>   }
> }
>
> --
> #macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb
x]
> [1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
> -1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// -
Warp -


Post a reply to this message

From: Ken
Subject: Re: Gradients
Date: 2 Jan 2002 20:52:57
Message: <3C33B97B.3FDDC65E@pacbell.net>
"John D. Gwinner" wrote:
> 
> This is a follow up question that belongs in 'new users' ..
> 
> when you code things like
> 
> translate -y
> 
> is it really the same thing as
> 
> translate <0, -1, 0>  (as the doc's imply)
> 
> or is the value 'y' being evaluated inside the color map somewhere?

Yes:

translate -y = translate <0,-1,0>

translate x+-y = translate <1,-1,0>


Additionally:

pigment { rgb y } = pigment { rgb <0,1,0> } = Green

pigment { rgb x+y+z } = pigment { rgb <1,1,1> } = White


Questions?

-- 
Ken Tyler


Post a reply to this message

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