|
|
"alphaQuad" <alp### [at] earthlinknet> wrote:
> just do all the calcs in pov script?
>
> would love to see the method,
Well I've been thinking, why not implement the GDM in POV?
Right now I've got it in Mathematica's language, and I ported it from PostScript
of all things. Could it live in POV SDL? Maybe. Maybe yes!
It involves taking a set of lines which could be of the form {x,y,d} where {x,y}
is a unit vector and d is the distance of the line perpendicular to this vector
from the origin. Typically d will run through integers -k to k for any given
{x,y} and typically the various {x,y}'s will run through the vertices of a
regular polygon. An n-gon, say. So there will be something like n*((2*k)+1)
lines altogether.
Then follows a sort of complicated business of taking the signs of determinants
of 3X3 subsets of the lines. Sign vectors are formed which encode how to make
the tiling: take a step along this vector, then along that, and so on, until
you reach a certain point: then make the polygon which is rooted at that point
from some other subset of the original vectors.
Along the way various degenerate polygons arise with zero area and so there is
some parsing to discard any of these.
It seems daunting to me because it was by an agony of effort I ever ported it
from PostScript to Mathematica. Does POV even have determinants? I guess that's
the easiest part, they could be programmed in if they're not there already in
the SDL.
If it was done right one would have a macro which accepted as input a list of
lines of the form {x,y,d}. A different macro could make this list of lines I
suppose. Just thinking about it makes me feel faint.
Post a reply to this message
|
|