|
|
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
|
|