polytree/README.md

31 lines
1.4 KiB
Markdown
Raw Permalink Normal View History

2021-04-17 18:51:58 +00:00
# PolyTree
2021-04-17 18:43:58 +00:00
2021-04-19 04:07:31 +00:00
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.
2021-04-17 18:51:58 +00:00
## Implementation
2021-04-19 04:07:31 +00:00
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
2021-04-19 04:07:31 +00:00
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):
```bash
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
```
2021-04-19 04:07:31 +00:00
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:
```
2021-04-19 04:07:31 +00:00
coffee --watch -c *.coffee &
http-server
```
Now visit http://localhost:8080 in your browser.