0
$\begingroup$

I have a piece-wise 2-input function that I would like to repeatedly tile diagonally across a grid. See this image.

alt text

So here, I know the equations of the pink, blue and green areas in the range 0 - 2.

My problem is that I'm having trouble finding a way to tile the function diagonally across like shown in the image by transforming the inputs. I tried using $\mod (x_1 = x_1 \mod 2, x_2 = x_2 \mod 2)$ to transform the input, and it worked somewhat, but it was wrong at grids $(2-3, 1-2)$, $(1-2, 2-3)$, $(4-5, 3-4)$ and $(3-4, 4-5)$.

Any help is appreciated!

  • 0
    It is not really clear what you are asking. Perhaps explain what you mean by "equation of pink etc in range 0-2"? What is x_1, x_2 etc2010-11-05
  • 0
    x1, and x2 are the axes, and inputs to the function. Probably should have used x and y instead. By equation of pink, i meant some 2-input function e.g. x1*x2 defined from 0 - 1 as shown on the image. And similarly I have different 2-input equations for the first green and blue blocks in the lower left.2010-11-05

1 Answers 1

3

Let $F$ be the original functions, $f$ the new one. Define

$f(x,y) = F(x-m,y-m)$ where $m = \min(\lfloor x \rfloor, \lfloor y \rfloor)$.

  • 0
    Ah, thanks. So simple, but I never would have got it!2010-11-05