POV-Ray : Newsgroups : povray.binaries.images : Tessellations : Re: Tessellations Server Time
4 Nov 2024 20:14:41 EST (-0500)
  Re: Tessellations  
From: Christian Froeschlin
Date: 18 Mar 2008 13:44:14
Message: <47e00d7e$1@news.povray.org>
Russell Towle wrote:

> I have a problem and could use some help. I wish to use a fixed scene file as a
> point of beginning for any such tiling, yet I do not know how many subsets may
> exist. Yet if I have not defined T1, T2, T3 etc. in my scene file, I cannot
> call the #include file. Currently I define T1 through T4. It occurs to me that
> it would be nice to have a way to define Tk up to k=100 or some large number by
> using colors.inc somehow. But I do not see quite how to do that. I am not much
> of an expert in the POV SDL. In particular, I have had trouble with arrays, and
> have never used #ifndef.

Using an array of textures is not difficult:

#declare T_NUM = 100;

#declare T = array[T_NUM];

#declare T[0] = texture {...}
...

Of course getting it filled automatically with reasonable
colors is more difficult, maybe fill the first few by hand
and use some hacked rgb values for the rest as in:

#declare i = 0;
#while (i < T_NUM)
   #declare T[i] = texture
   {
     pigment {color rgb <mod(i,3)/3, mod(i,5)/5, mod(i,7)/7>}
   }
   #declare i = i + 1;
#end


Post a reply to this message

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