2
$\begingroup$

I recently encountered something odd and I was wondering if anyone have seen something like it before, and could possibly explain what is going on.

Given a coordinate system, for each xy coordinate within that system apply some function f: f(x,y) = Z. For the result, sum the component digits and use that sum to place a specific color at that xy coordinate.

With variations of this, you get these types of results:

If f(x,y) = and(x,y), i.e. bitwise AND, then the resulting image looks something like this: https://i.imgur.com/ohf6Fkp.png

If f(x,y) = or(x,y), i.e. bitwise OR, then the resulting image looks something like this: https://i.imgur.com/nRC81PF.png

If f(x,y) = mul(x,y), i.e multiplication, then the resulting image looks something like this: https://i.imgur.com/MqOINpz.png

If f(x,y) = xor(x,y), i.e. bitwise XOR, then the resulting image looks something like this: https://i.imgur.com/3j8wTOZ.png

If f(x,y) = add(mul(x,x), mul(y,y)), i.e. (xx) + (yy), then the resulting image looks something like this: https://i.imgur.com/OdS85IQ.png

Here is a sketch that shows different aspects of this behaviour: https://www.shadertoy.com/view/tlBGDV

I hope someone has seen this before and can talk about it a little bit.

$\endgroup$
  • 1
    $\begingroup$ The first two look like variations on the Sierpinsky gasket. Apparently, you get some such pattern by coloring Pascal's triangle mod 2. $\endgroup$ – Conifold Jun 25 at 20:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.