diff --git a/public/index.html b/public/index.html index 2bd0078..048946b 100644 --- a/public/index.html +++ b/public/index.html @@ -19,12 +19,26 @@ html, body { background-color: rgb(0,0,16); } + .tile { + display: inline-block; + }

Inward spiral

-
- +
+

Regular

+
+
+
+

Randomized

+
+
+
+

Triangle

+
+
+ \ No newline at end of file diff --git a/public/index.html b/public/index.html index 2bd0078..048946b 100644 --- a/public/index.html +++ b/public/index.html @@ -19,12 +19,26 @@ html, body { background-color: rgb(0,0,16); } + .tile { + display: inline-block; + }

Inward spiral

-
- +
+

Regular

+
+
+
+

Randomized

+
+
+
+

Triangle

+
+
+ \ No newline at end of file diff --git a/src/FractalSVG.ts b/src/FractalSVG.ts index 431fa94..87af9c0 100644 --- a/src/FractalSVG.ts +++ b/src/FractalSVG.ts @@ -1,6 +1,6 @@ import { Polygon, Point } from "./Polygon"; -function inwardSpiral(input:Polygon, scalar:number): Polygon +function inwardSpiral(input:Polygon, scalar:number, randomizeShrinkRate:number): Polygon { const output = new Polygon(); @@ -8,13 +8,20 @@ let b:Point; let cx: number; let cy: number; + let rate:number; for(let i=0;i

Inward spiral

-
- +
+

Regular

+
+
+
+

Randomized

+
+
+
+

Triangle

+
+
+ \ No newline at end of file diff --git a/src/FractalSVG.ts b/src/FractalSVG.ts index 431fa94..87af9c0 100644 --- a/src/FractalSVG.ts +++ b/src/FractalSVG.ts @@ -1,6 +1,6 @@ import { Polygon, Point } from "./Polygon"; -function inwardSpiral(input:Polygon, scalar:number): Polygon +function inwardSpiral(input:Polygon, scalar:number, randomizeShrinkRate:number): Polygon { const output = new Polygon(); @@ -8,13 +8,20 @@ let b:Point; let cx: number; let cy: number; + let rate:number; for(let i=0;i