POV-Ray : Newsgroups : povray.newusers : #declare/Object coloring question : Re: #declare/Object coloring question Server Time
30 Jul 2024 20:28:24 EDT (-0400)
  Re: #declare/Object coloring question  
From: Tim Nikias v2 0
Date: 17 Sep 2003 15:17:52
Message: <3f68b360$1@news.povray.org>
Hm. Then I'd make it a macro:

#macro MyTorus_Macro(Light_Color)
#declare MyTorus=[...]
[In the lightsource, put "rgb Light_Color"]
object{MyTorus}
#end

MyTorus_Macro(Blue)
MyTorus_Macro(Orange)

If you'd want to move it around, you can just add
another parameter to the macor:

#macro MyTorus_Macro(Light_Color,Position)
#declare MyTorus=[...]
object{MyTorus translate Position}
#end

Regards,
Tim
-- 
Tim Nikias v2.0
Homepage: http://www.digitaltwilight.de/no_lights
Email: no_lights (@) digitaltwilight.de


>
> > I'm not quiet sure what you're after. The rgb in the
> > lightsource-brackets describes the Red, Green
> > and Blue componentes of the lightsource's color.
> > rgb <1,1,1> is white, rgb<0,0,0> is black.
> > The rgb in in the pigment-brackets belongs to
> > all torii, so changing that will change the color
> > of the torii.
> >
> > Aside of that, it might be better to take the lightsource
> > out of the union and place it into the scene by itself,
> > unless you're after something specific.
> >
>
> What I was going for is that instead of having to put 50 copies of that
> in my scene, I could write it once, then use object to make the copies.
>    The particular thing I was going after was a different color
> lightsource in the middle of each torus. so I could do like:
>
> object{ MyTorus scale<.5,.5,.5> translate<4,1.25,0> Blue }
> object{ MyTorus scale<.5,.5,.5> translate<0,1.25,0> Red }
> object{ MyTorus scale<.5,.5,.5> translate<-4,1.25,0> Orange}
>
> etc, so that one would have a red lightsource, one blue, and then orange
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.518 / Virus Database: 316 - Release Date: 11.09.2003


Post a reply to this message

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