POV-Ray : Newsgroups : povray.advanced-users : Grid Interpolation? : Re: Grid Interpolation? Server Time
28 Jul 2024 20:35:09 EDT (-0400)
  Re: Grid Interpolation?  
From: andrel
Date: 18 Apr 2005 18:13:12
Message: <4264306E.7050002@hotmail.com>
Tim Nikias wrote:
>>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 know you understood it, but let me reiterate that you can even
reinterpret a rectangular grid of pixels as a grid of hexagons.
It is at first sight counterintuitive, but I sometimes use it
for erosions and dilations if I want the operations to be invariant
for foreground/background inversions.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.