|
|
On 13 Jul 2001 15:33:26 -0400, Jim Snow wrote:
>
>I thought about alternating verticals and horizontals, but decided it would
>make the texture look a little too predictable.
I drew a dozen or so squares by hand and it didn't look as predictable as
one might expect, believe it or not.
> However, the algorithm
>could be vastly simplified - instead of testing distance from the
>originating points to determine which mortar line wins when they intersect,
>I could make it so that a mortar line always wins within its own square and
>loses outside its own square. The search grid would only have to be 3x3 to
>garuntee that no line escapes the grid.
And you wouldn't have to test the corner squares, either.
--
#macro R(L P)sphere{L F}cylinder{L P F}#end#macro P(V)merge{R(z+a z)R(-z a-z)R(a
-z-z-z a+z)torus{1F clipped_by{plane{a 0}}}translate V}#end#macro Z(a F T)merge{
P(z+a)P(z-a)R(-z-z-x a)pigment{rgbt 1}hollow interior{media{emission T}}finish{
reflection.1}}#end Z(-x-x.2y)Z(-x-x.4x)camera{location z*-10rotate x*90}
Post a reply to this message
|
|