POV-Ray : Newsgroups : povray.advanced-users : Media and Opposite Colors : Re: Media and Opposite Colors Server Time
2 Nov 2024 11:22:50 EDT (-0400)
  Re: Media and Opposite Colors  
From: Bob Hughes
Date: 28 Sep 1999 00:46:48
Message: <37f04838@news.povray.org>
I was trying this out to do it an easy way and stumbled into errors
concerning the color vector, int( ) and #if ( ). It would be fine were
it not for the negative vector created when switching back to original
color.  I didn't know vectors weren't allowed in these (and whatever
else there might be too).

// white pointlight at camera position
#declare LCX = 0;
#declare LCY = 0;
#declare LCZ = -10;

light_source { <LCX,LCY,LCZ> color rgb <1.5,1.5,1.5>
}
camera {
  location  <LCX,LCY,LCZ>
  angle 30
  look_at   <0,0,0>
}

// zero or 1 (more than 1 not acceptable)
#declare EAF=0;
// original color to calc opposite of
#declare OC=.5; // <.1,.3,.9>;  vector does not go into int( )
// opposite color vector (or not) [int(EAF-OC) errors wanting float
only]
#declare RGB=EAF-OC;
 // convert to positive if negative [#if (RGB errors wanting float)]
 #if (RGB<0) #declare RGB=-1*RGB; #end

box {-1,1 pigment {color rgb RGB} rotate <30,45,60>}

Bob

TonyB <ben### [at] panamaphoenixnet> wrote in message
news:37f03117@news.povray.org...
> (1 - OriginalColor)    ?
>
>


Post a reply to this message

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