Skip to content

emmanueljs1/HaXtal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HaXtal

Members:

David Buckman - dbuckman

Emmanuel Suarez - emsu

Kyle Rosenbluth - kyro

How To Run:

Desktop App:

stack build
stack exec haxtal-exe

Testing Suite:

stack test

Web App:

git clone https://github.com/reflex-frp/reflex-platform

Then, navigate into the reflex-platform folder and run the try-reflex command.

cd reflex-platform ./try-reflex

Then, cd back to this folder in the nix shell, and run ghcjs Web.hs Then go into the Web.jsexe folder, and double click index.html

Overview:

Main.hs

Create pictures from example LSystems, and present the user with a menu to display example fractals or choose parameters for a random fractal.

LSystem.hs

Definition of the LSystem data type. Includes show and arbitrary instance, and helper functions for defining rules to be used in user-generated LSystems. Also includes a definition of LSysComps, a string representation of an LSystem, along with its monoid instance and a function for converting LSysComps to LSystems.

Draw.hs

Module that allows for conversion from an LSystem definition to a format that can be displayed. This format is a list of lines, where each line is a list of points.

Examples.hs

Contains definitions of the example LSystems used in Main.hs.

Spec.hs

Top level test suite file.

LSystemTest.hs

Contains tests for LSystem.hs.

DrawTest.hs

Contains tests for Draw.hs.

Dependencies:

- Stack
- GHCJS (Web only)
- Reflex (Web only)
- Gloss (App only)
- QuickCheck
- HUnit

Acknowledgements

This was a final project for CIS 552 at the University of Pennsylvania: http://cis.upenn.edu/~cis552/