polygon-arrangement trees
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
Glen Whitney 20cacc8e2d feat: add a Deque of items to process 2 years ago
lib feat: incrementally add elements to sketch in draw 2 years ago
.gitignore feat: Minimal working p5/CoffeeScript setup 2 years ago
LICENSE Initial commit 2 years ago
README.md feat: add a Deque of items to process 2 years ago
deque.coffee feat: add a Deque of items to process 2 years ago
index.html feat: Minimal working p5/CoffeeScript setup 2 years ago
polytree.coffee feat: add a Deque of items to process 2 years ago

README.md

PolyTree

Starting from a central polygon, one can imagine a tree P of polygons created by attaching other polygons at each edge of the central one and iterating. Of course, many of the resulting polygons overlap. PolyTree selects and displays non-overlapping subtrees of P in a variety of ways.

Implementation

As a first pass, PolyTree will consist of a Processing sketch written in CoffeeScript along with some utility classes and a minimal framework for deploying it (a bit of HTML and JavaScript).

Running

Although you can use any server and CoffeeScript compiler you like, one path of low resistance for running PolyTree is to use Node.js. Hence, the following procedure assumes you have the Node package manager (npm) already installed.

Make sure you have http-server and CoffeeScript installed globally (note you may need to run the following with sudo depending on your setup):

npm install -g http-server coffeescript

Clone this repository and enter its top-level directory:

git clone https://code.studioinfinity.org/glen/polytree.git
cd polytree

Set coffee to compile the scripts in this directory (the "--watch" flag is only necessary if you may be editing the code and would like the files being served to update automatically), and start serving the files:

coffee --watch -c *.coffee &
http-server

Now visit http://localhost:8080 in your browser.