POV-Ray : Newsgroups : povray.newusers : Problem with variables : Re: Problem with variables Server Time
4 Nov 2024 21:21:31 EST (-0500)
  Re: Problem with variables  
From: Johannes Dahlstrom
Date: 27 Oct 2002 08:04:24
Message: <3dbbe458@news.povray.org>
You could use an integer to represent the value you want to vary, like this:

#declare VaryAmbient = 1;
#declare VaryDiffuse = 2;
#declare VarySpecular = 3;

#declare WhichValueToVary = VaryAmbient;

#declare Variable = ... // Vary this

// ...
finish {
  ambient (WhichValueToVary == VaryAmbient) ? Variable : 0.1;
  diffuse (WhichValueToVary == VaryDiffuse) ? Variable : 0.6;
  specular (WhichValueToVary == VarySpecular) ? Variable : 1.0;
}
// ...


Post a reply to this message

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