|
|
"Bald Eagle" <cre### [at] netscapenet> wrote:
> This should have been bloody obvious --- but I'm slow. :|
>
> Use the TRIANGLE pattern.
(triangular)
But even more intriguing is the possibility to select the color based off a set
of two rectangular grids.
If rand can be used in a function, then along with mod and select, there might
be the chance this can somehow be applied to the problem.
I haven't had an uninterrupted minute to think about it clearly...
#version 3.7;
global_settings {assumed_gamma 1.0}
#include "colors.inc"
sky_sphere {pigment {rgb <1, 1, 1>}}
camera {
location <0, 20, 0> // position & direction of view
look_at <0, 0, 0.01>
right x*image_width/image_height // horizontal size of view
up y // vertical size of view
}
light_source {<0, 25, -1> color White}
box {<-1, 0, -1>*10, <1, 0.01, 1>*10
pigment {hexagon
color Black,
color Gray50,
color White
//rotate x*90
}
}
#declare A = sqrt(3);
#declare B = A/2;
#for (Z, -5, 5)
#for (X, -3, 3)
sphere {<X*3, 0, Z*A> 0.25 pigment {Red}}
#end
#end
#for (Z, -5, 5)
#for (X, -3, 2)
sphere {<(X*3)+1.5, 0, (Z*A)+B> 0.25 pigment {Green}}
#end
#end
Post a reply to this message
|
|