GithubHelp home page GithubHelp logo

rhombrick's Introduction

rhombrick

Intro

This is a hobby project written in Clojure using the Quil library. It was inspired by Paul Harrison's Ghost Diagrams. The tile assembler algorithm is described in detail in Chapter 7 of Paul Harrison's thesis. Ghost Diagrams creates planar tilings using either a square or hexagonal grid. The rhombrick program works in a similar way, but extends Ghost Diagrams square and hexagon tiles to include cube, hex prism, rhombic dodecahedron and truncated octahedron shapes tiles.

Tiles and tile sets

A tile is specified by a 12 digit alphanumeric "tilecode". Each digit represents the compatibility state of one face of a rhombic dodecahedral tile. The digits '0' to '9' represent like-compatible faces. The digits 'a' to 'f' represent opposite compatible faces, where for example and uppercase 'A' is only compatible with a lowercase 'a'. For like-compatible codes '0' represents the smallest bezier box (described below) radius and '9' represents the largest. For opposite-compatible codes it's the same, with 'A' or 'a' being the smallest radius and 'F' or 'f' the largest. The digit '-' represents an empty face. Tiles may be rotated to any of up to 24 orientations specified by chiral octahedral symmetry. Some tilecodes will have less than 24 rotations in the sense that some codes will have multiple rotations which produce the exact same form.

Two dimensional tilesets on a square or hex grid can be simulated by creating a tileset which is constrained to only allow certain faces to be non-empty. This almost gives a trivial way to map from Ghost Diagram's 2d codes to rhombrick's codes. It doesn't quite work because in Ghost Diagrams implementation the tiles can only rotate, but when simulating a 2d tileset in 3d, the tiles can be flipped (rotated 180°) as well as rotated.

An example tilecode:

"-010----bB--"

A tile set is simply a set of one or more distinct tilecodes.

An example tile set:

["-1-C-2------" "5-02B-1-4---" "0c------5-1-" "--4-C04---A-"]

Usage

Clone the repo then do: lein deps; lein run.

Keyboard commands

wasd        | Move camera (behaviour depends on camera mode)
Arrow keys  | navigate tileset editor
, .         | decrease/increase model scale 
r           | soft init tiler
R           | init tiler with random tile set
A           | toggle auto-seed
- =         | decrease/increase camera field of view
c           | cycle camera mode (1 - mouse/kb, 2 - rubberband to glider, 3 - follow paths)
C           | toggle draw console (WIP)
f           | toggle draw bezier box faces
F           | toggle draw cell faces
e           | toggle draw empty
l           | toggle draw bezier box lines
L           | toggle draw simple lines
M           | toggle bezier box smooth shading
g           | toggle draw gliders
G           | toggle draw graphs (WIP)
i           | toggle draw info
B           | toggle draw voxelized tiles
Z           | toggle game mode
u           | place tile at cursor (game mode)
j           | backtrack (game mode)
h k         | prev/next candidate (game mode)
y           | voxelize tileset
!           | cycle skybox texture
@           | cycle tile texture
`           | reload post process shader
% ^         | decrease/increase palette offset
_ +         | decrease/increase bezier box resolution
; '         | increase/decrease bezier box control bias (change shape of bezier curves)
* &         | increae/decrease bezier box line weight
t T         | decrease/increase max tiles
[ ]         | decrease/increase tiler adhd
{ }         | decrease/increase tiler autism (adhd and autism are parameters
              which affect the tiler's characteristics regarding backtracking)
P           | pause/unpause tiler
( )         | decrease/increase assemblage max radius
< >         | load prev/next saved tileset from library
S           | save the current tileset to library
n m         | symmetry display index (debugging)
b           | cycle boundary mode (0 - none, 1 - terminal, 2 - all)
#           | save frame to image file

rhombrick's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

rhombrick's Issues

Interface to Scad instead of quil?

Hello, I have always been fascinated by 3D tesselations. Lately I have been creating objects in OpenScad using the scad-clj library. I was recently reminded of your work here.

I have only looked over the code, so I have no idea how difficult this might be. But it seems the Quil layer is pretty thin. What do you think about creating an interface to scad? It would mean that ultimately some of these things could actually be printed on a 3d printer. Parts could also be used as building blocks for other things.

Eric

Can't 'lein run' rhombrick

On MacOS 10.11.3 (El Capitan) and MacOS 10.10.5 (Yosemite) with Oracle JDK 1.8.0_71, I can't use run rhombrick using 'lein run'.

On the topology branch, I get

java.io.FileNotFoundException: data/rhombrick-boundary.obj (No such file or directory), compiling:(tiling_render.clj:52:41)

while on master, I get a lot of reflection warnings and a new Java process ('main'), but no display.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.