# A brief fling with OpenGL

OpenGL is kinda neat. I toyed very briefly with animations, trying to learn it the summer of 2016 after I met some guys who worked at Imaginex. I wanted to experiment with it to make cool animations like you might see in a fractal animation YouTube video. I didn’t get very far, but I did do enough to figure out a general strategy for building complex geometric animations.

Start with a simple shape (in my case, a square) and apply a function to it. Now you have a new pattern! Apply another function to this pattern, you get a totally new pattern. Keep applying patterns until you get something totally crazy and complex, all built out of simple building blocks.

**0: start with a boring square**

*P = sq*

**1: make that square empty**

*P = empty(sq)*

**2: now make it pulsate**

*P = pulsate(empty(sq))*

**3: a grid of squares (0’)**

*P = grid(sq)*

**4: a grid of empty squares (3+1)**

*P = grid(empty(sq))*

**5: a grid of pulsating empty squares (2+3) or (4x(2))**

*P = grid(pulsate(empty(sq)))*

**6: a zooming grid of pulsating empty squares (5’)**

*P = zoom(grid(pulsate(empty(sq))))*

I got some weird behavior here, with the green lines disappearing.

**This is something totally different… Spin!**

Now, to make the whole grid rotate!