POV-Ray : Newsgroups : povray.general : Can't get light_source to work properly (extremely simple scene) : Re: Can't get light_source to work properly (extremely simple scene) Server Time
29 Jul 2024 14:20:18 EDT (-0400)
  Re: Can't get light_source to work properly (extremely simple scene)  
From: Alain
Date: 23 Apr 2011 23:45:56
Message: <4db39cf4$1@news.povray.org>

> On 23/04/2011 12:14 PM, MagicMojo wrote:
> Hi, If you look in the message pane you will get a hint to what is
> wrong. "color" must be in a pigment which must be in a texture. Sp try
> this:
>
> //updownarrows.pov
>
> #include "colors.inc"
>
> background { White }
>
> camera {
> location <14 0, -235> //-35 or -50, nearly same result (too close)
> direction <14, 0, 2.25>
> right x*1.33
> look_at <0,0,0>
> }
> #declare Dist=180.0;
> light_source {< 0, 2.5, -10> color White //-50, 25, -50
> fade_distance Dist fade_power 2}
>
> #declare downarrow = union
> {
> cylinder
> {
> <0,0,0>,<0,4,0>,2
> texture { pigment { color Green } }
>
>
> }
> cone //hollow?
> {
> <0,0,0>3,<0,-2,0>,0.3
> texture { pigment { color Green } }
> }
> }
And now, the arrows will ALWAYS be green!

>
> object {downarrow
> texture { pigment { color Green } }
> }
> object {downarrow
> texture { pigment { color Blue } }
> translate x*6
> rotate x*180
> translate y*2
> }
>
>
You should rotate before you relocate. Otherwise, it will orbitate 
around the origin.
In this case, I'd rather use this construct:

union{// create a double pointed arrow
object{downarrow pigment{Green}}
oblect{downarrow pigment{Blue} scale<1, -1, 1> //mirror it verticaly
// add some transpate if needed
}// you can move it as one unit
}

The name and the 180 degree rotation seems to imply that you want a 
double pointed arrow.



Alain


Post a reply to this message

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