Skip to content

The minimalistic Rubik's Cube mosaic generator.

Notifications You must be signed in to change notification settings

adlrwbr/Tessellate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tessellate

The minimalistic Rubik's Cube mosaic generator written in C++.

Contents

About

Have you ever seen a Rubik's Cube mosaic?

Flappy Bird Rubik's Cube Mosaic by Simone Santarsiero

Y'know, these?

Tessellate is a program for Windows that displays a grid of 3D, graphical Rubik's Cubes. The cubes solve themselves in order to display a supplied image in low (or if your CPU can handle it, medium) resolution.

Technologies

It was my goal to create Tessellate without the aid of huge image libraries. The project served as my first time working with 3D graphics, and I wanted to create each part of the process, from vertex shaders to a custom BMP image loader.

That said, in order to fully realize Tessellate, I needed to take advantage of a few external libraries and resources.

These include:

  • Pillow to resize input images and convert between file types
  • GLM, a lightweight math library for OpenGL
  • GLFW, an OpenGL library that handles windowing and input
  • GLEW, the OpenGL Extension Wrangler Library

Features

Image conversion

Tessellate reads a supplied bitmap image file (.BMP) to properly arrange the grid of cubes. If you wish to display another file type, dithering.py will downsample, apply dither, and convert an image to .BMP format.

In the diagram above, Marilyn Monroe (.PNG) is downsampled to an efficient resolution (lower res = faster calculations) and converted into the bitmap image file type (.BMP).

Due to the Rubik's Cube's limited color palette, the image is also manipulated by the Floyd–Steinberg dithering algorithm to maintain as much resemblence to the original as possible.

Mosaic solver

In the .GIF above, 289 cubes calculate the most efficient set of moves to display their respective patterns. Immediately after calculating, the cubes begin simultaneously solving for the image.

Individual cube control

Pick a cube and control its faces manually, or optionally avoid the grid altogether.

Grow your solving skills with fast, easy to learn software. Testing an algorithm? Enter a series of legal moves. Tesselate understands Singmaster notation!

Camera Settings

Bird's Eye

View the action from above...

Focus Mode

...or down low.

About

The minimalistic Rubik's Cube mosaic generator.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published