From 9c1bb2ed99f26b84536c0d3f26060de6271b11b5 Mon Sep 17 00:00:00 2001 From: Yuval Adam Date: Sun, 20 May 2012 13:24:26 +0300 Subject: usage, playground, and code prettify --- index.html | 44 +++++++++++++++++++++++++++++++++++++++----- prettify.css | 30 ++++++++++++++++++++++++++++++ prettify.js | 28 ++++++++++++++++++++++++++++ style.css | 3 ++- 4 files changed, 99 insertions(+), 6 deletions(-) create mode 100644 prettify.css create mode 100644 prettify.js diff --git a/index.html b/index.html index 63a30ac..167f987 100644 --- a/index.html +++ b/index.html @@ -7,12 +7,16 @@ + + + - +
+

L-Systems.JS

Explore the power of L-Systems

@@ -21,14 +25,44 @@ Download L-Systems.JS

-
+ +

Usage

+
+
+
+
+  var lsys = new LSystem('F', { 'F': 'F-F+FF' });
+  var tree = lsys.iterate(2);
+  console.log(tree);  // F-F+FF-F-F+FF+F-F+FFF-F+FF
+  var coords = lsys.draw(Math.PI / 2);
+  console.log(coords);  // [[0,0,0], [0,1,0], [1,1,0], ...
+
+
+ +

Playground

+
+
+
+ +
+
+
+
+
+ +

Other