Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Programming Challenge: Easiest way to code this grid?

Made It! Look at bottom of the post!!!

Smart people of the world...

I'm trying to draw this grid using Processing (java), but I'm having trouble figuring out the smartest way around this. I could basically just plot each point in the repeating section, but I'm sure there's a better way around it.

grid

Any algorithm and language will do. I just need to see the concept.

EDIT

Updated with an image of the logo. This basically shows how I need to ability to "know" what areas are neighbors, in order to create a generative shape from the grid:

logo

EDIT 2

The grid is called a "quasi periodic eight fold grid" by the designer.

EDIT 3

Okay, that was harder than I thought. I've made a lot of progress, and you can find there code here: https://gist.github.com/3682600

I have the sub-divisioning working perfect for both shapes, however, when I start the recursion, something weird is going on. This is my output right now:

test

Any help is appreciated!

Edit 4

Okay, this is turning into an epic task. I've figured out that the problem arises when I the recursion becomes too deep. Either it's a problem with the rotation of the elements, or it's another thing I can't figure out. Anyway, here's the working sketch I have right now:

working

Edit 5

I made it! I had messed up the rotations of the cubes, which messed it all up. I changed it and it's working: https://gist.github.com/3682600. There may be a little too much stuff in there, but it's totally working. Proof:

leve1level2level3

like image 485
Ronze Avatar asked Sep 08 '12 19:09

Ronze


2 Answers

I'm not sure there will be an easy way, I started looking for a repeated section but it is quasi-periodic, or almost repeating.

enter image description here

It's obviously symetric across the green lines, but the patterns marked in blue don't actually seem to show the pattern of what the grid would look like extended farther away from the center. I could be wrong though.

like image 107
Xantix Avatar answered Nov 18 '22 18:11

Xantix


If this is indeed the Ammann-Beenker tiling @n.m. mentioned in his comment, then you'd most easily code this using the provided substitiution rules. Start with an arbitrary tile, and replace it with smaller tiles until you have a sufficient number of tiles for your purpose. Notice that the substitution rules apparently deal with oriented half squares.

like image 3
MvG Avatar answered Nov 18 '22 19:11

MvG