|
![](/i/fill.gif) |
> I assume you use a rectangular grid for ease of representation. To my
> surprise it is not commonly known (or at least used) that when you
> /pretend/ that in every alternating row the gridpoints are shifted one
> half that you get conceptually a triangular grid. Gridpoints on every
> odd line will be connected to the points to the left on the adhacent
> rows and the even to the ones on the right. You can find out what the
> real neaghbours are with a simple bit mask. If I make myself clear,
> probably not :(
Oh, I understood fine. That's something to keep in mind in case I write
future macros that might need them. As it is now, my MMM and LSSM work on
the rectangle-grid. I've got no excuse for the MMM aside that it was just
easy to visualize and represent the data in an array, but for the LSSM, the
algorithm is deriven from a technique that normally works on textures and is
pixel-based, hence 2d-grid instead of hexagon.
I've got in mind to script a more versatile set of macros for
vertex/normal/UV generation on arbitrary topology (something close to the
usual mesh2-format, with arrays of vertices, normals and uvs, which are
index with a fourth array to build the actual mesh). But that'll have to
wait till I've got some spare time *and* a use for it. :-)
--
"Tim Nikias v2.0"
Homepage: <http://www.nolights.de>
Post a reply to this message
|
![](/i/fill.gif) |