diff --git a/chaostest/chaostest3.html b/chaostest/chaostest3.html deleted file mode 100644 index 3adf2e0..0000000 --- a/chaostest/chaostest3.html +++ /dev/null @@ -1,115 +0,0 @@ - -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/chaostest/connected-lines.html b/chaostest/connected-lines.html
new file mode 100644
index 0000000..06f2230
--- /dev/null
+++ b/chaostest/connected-lines.html
@@ -0,0 +1,52 @@
+
+JavaScript <=> PaperScript example
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/chaostest/connected-lines.js b/chaostest/connected-lines.js
new file mode 100644
index 0000000..3ebdcfc
--- /dev/null
+++ b/chaostest/connected-lines.js
@@ -0,0 +1,64 @@
+
+function connected_lines_get_rnd_params() {
+ return {
+ start: new Point(Math.random(), Math.random()),
+ offs: new Point(0.05, 0.05),
+ num_steps: 5,
+ };
+}
+
+
+function connected_lines(params) {
+ if(typeof params == 'undefined') {
+ var params = connected_lines_get_rnd_params();
+ }
+
+ var lines = [];
+ for(var i=0; i<2; i++) {
+ var x = params.start.x + i*params.offs.x;
+ var y = params.start.y + i*params.offs.y;
+ var path = new paper.Path({strokeWidth: 5, strokeColor: 'black'});
+ for(var s=0; s