diff --git a/public/index.html b/public/index.html index 632d6b3..21f9861 100644 --- a/public/index.html +++ b/public/index.html @@ -4,15 +4,25 @@ + + + + Fractals + + + + + +

Inward spiral

\ No newline at end of file diff --git a/public/index.html b/public/index.html index 632d6b3..21f9861 100644 --- a/public/index.html +++ b/public/index.html @@ -4,15 +4,25 @@ + + + + Fractals + + + + + +

Inward spiral

\ No newline at end of file diff --git a/public/manifest.json b/public/manifest.json new file mode 100644 index 0000000..79b490b --- /dev/null +++ b/public/manifest.json @@ -0,0 +1,34 @@ +{ + "name": "Fractals", + "background_color": "rgb(0,0,16)", + "theme_color": "rgb(0,0,16)", + "display": "standalone", + "icons": [ + { + "src": "style/favicon32.png", + "type": "image/png", + "sizes": "32x32" + }, + { + "src": "style/favicon96.png", + "type": "image/png", + "sizes": "96x96" + }, + { + "src": "style/favicon196.png", + "type": "image/png", + "sizes": "196x196" + }, + { + "src": "style/favicon512.png", + "type": "image/png", + "sizes": "512x512" + }, + { + "src": "style/favicon.svg", + "type": "image/svg+xml", + "sizes": "any" + } + ], + "start_url": "index.html" +} \ No newline at end of file diff --git a/public/index.html b/public/index.html index 632d6b3..21f9861 100644 --- a/public/index.html +++ b/public/index.html @@ -4,15 +4,25 @@ + + + + Fractals + + + + + +

Inward spiral

\ No newline at end of file diff --git a/public/manifest.json b/public/manifest.json new file mode 100644 index 0000000..79b490b --- /dev/null +++ b/public/manifest.json @@ -0,0 +1,34 @@ +{ + "name": "Fractals", + "background_color": "rgb(0,0,16)", + "theme_color": "rgb(0,0,16)", + "display": "standalone", + "icons": [ + { + "src": "style/favicon32.png", + "type": "image/png", + "sizes": "32x32" + }, + { + "src": "style/favicon96.png", + "type": "image/png", + "sizes": "96x96" + }, + { + "src": "style/favicon196.png", + "type": "image/png", + "sizes": "196x196" + }, + { + "src": "style/favicon512.png", + "type": "image/png", + "sizes": "512x512" + }, + { + "src": "style/favicon.svg", + "type": "image/svg+xml", + "sizes": "any" + } + ], + "start_url": "index.html" +} \ No newline at end of file diff --git a/public/style/core.css b/public/style/core.css new file mode 100644 index 0000000..372d35b --- /dev/null +++ b/public/style/core.css @@ -0,0 +1,54 @@ +html, body { + /* margin: 0; */ + /* background: #202020; */ + font-family: Arial, Helvetica, sans-serif; + color: #EEEEEE; +} + +a, a:visited { + color: #EEEEEE; +} + +input[type=text], input[type=password] { + /* font-family: Arial, Helvetica, sans-serif; */ + background-color: #EEEEEE; + color: #202020; +} + +.linkbutton, input[type=button], input[type=submit] { + color: #EEEEEE; + background: rgb(69, 18, 255); + border: 0; + border-radius: 3px; + padding: 5px; + font-size: 1em; +} +.linkbutton:hover, input[type=button]:hover, input[type=submit]:hover, select:hover { + background: rgb(51, 15, 182); + cursor: pointer; +} +.linkbutton:active, input[type=button]:active, input[type=submit]:active, select:active { + background: rgb(37, 12, 131); +} +.linkbutton:disabled, input[type=button]:disabled, input[type=submit]:disabled, select:disabled { + color: #868686; + background: #adadad; +} + +select { + background: rgb(69, 18, 255); + color: #EEEEEE; + border: none; + border-radius: 2px; + padding: 2px; +} + +.table { + display: table; +} +.table > * { + display: table-row +} +.table > * > * { + display: table-cell; +} \ No newline at end of file diff --git a/public/index.html b/public/index.html index 632d6b3..21f9861 100644 --- a/public/index.html +++ b/public/index.html @@ -4,15 +4,25 @@ + + + + Fractals + + + + + +

Inward spiral

\ No newline at end of file diff --git a/public/manifest.json b/public/manifest.json new file mode 100644 index 0000000..79b490b --- /dev/null +++ b/public/manifest.json @@ -0,0 +1,34 @@ +{ + "name": "Fractals", + "background_color": "rgb(0,0,16)", + "theme_color": "rgb(0,0,16)", + "display": "standalone", + "icons": [ + { + "src": "style/favicon32.png", + "type": "image/png", + "sizes": "32x32" + }, + { + "src": "style/favicon96.png", + "type": "image/png", + "sizes": "96x96" + }, + { + "src": "style/favicon196.png", + "type": "image/png", + "sizes": "196x196" + }, + { + "src": "style/favicon512.png", + "type": "image/png", + "sizes": "512x512" + }, + { + "src": "style/favicon.svg", + "type": "image/svg+xml", + "sizes": "any" + } + ], + "start_url": "index.html" +} \ No newline at end of file diff --git a/public/style/core.css b/public/style/core.css new file mode 100644 index 0000000..372d35b --- /dev/null +++ b/public/style/core.css @@ -0,0 +1,54 @@ +html, body { + /* margin: 0; */ + /* background: #202020; */ + font-family: Arial, Helvetica, sans-serif; + color: #EEEEEE; +} + +a, a:visited { + color: #EEEEEE; +} + +input[type=text], input[type=password] { + /* font-family: Arial, Helvetica, sans-serif; */ + background-color: #EEEEEE; + color: #202020; +} + +.linkbutton, input[type=button], input[type=submit] { + color: #EEEEEE; + background: rgb(69, 18, 255); + border: 0; + border-radius: 3px; + padding: 5px; + font-size: 1em; +} +.linkbutton:hover, input[type=button]:hover, input[type=submit]:hover, select:hover { + background: rgb(51, 15, 182); + cursor: pointer; +} +.linkbutton:active, input[type=button]:active, input[type=submit]:active, select:active { + background: rgb(37, 12, 131); +} +.linkbutton:disabled, input[type=button]:disabled, input[type=submit]:disabled, select:disabled { + color: #868686; + background: #adadad; +} + +select { + background: rgb(69, 18, 255); + color: #EEEEEE; + border: none; + border-radius: 2px; + padding: 2px; +} + +.table { + display: table; +} +.table > * { + display: table-row +} +.table > * > * { + display: table-cell; +} \ No newline at end of file diff --git a/public/style/favicon.svg b/public/style/favicon.svg new file mode 100644 index 0000000..df4eae5 --- /dev/null +++ b/public/style/favicon.svg @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/public/index.html b/public/index.html index 632d6b3..21f9861 100644 --- a/public/index.html +++ b/public/index.html @@ -4,15 +4,25 @@ + + + + Fractals + + + + + +

Inward spiral

\ No newline at end of file diff --git a/public/manifest.json b/public/manifest.json new file mode 100644 index 0000000..79b490b --- /dev/null +++ b/public/manifest.json @@ -0,0 +1,34 @@ +{ + "name": "Fractals", + "background_color": "rgb(0,0,16)", + "theme_color": "rgb(0,0,16)", + "display": "standalone", + "icons": [ + { + "src": "style/favicon32.png", + "type": "image/png", + "sizes": "32x32" + }, + { + "src": "style/favicon96.png", + "type": "image/png", + "sizes": "96x96" + }, + { + "src": "style/favicon196.png", + "type": "image/png", + "sizes": "196x196" + }, + { + "src": "style/favicon512.png", + "type": "image/png", + "sizes": "512x512" + }, + { + "src": "style/favicon.svg", + "type": "image/svg+xml", + "sizes": "any" + } + ], + "start_url": "index.html" +} \ No newline at end of file diff --git a/public/style/core.css b/public/style/core.css new file mode 100644 index 0000000..372d35b --- /dev/null +++ b/public/style/core.css @@ -0,0 +1,54 @@ +html, body { + /* margin: 0; */ + /* background: #202020; */ + font-family: Arial, Helvetica, sans-serif; + color: #EEEEEE; +} + +a, a:visited { + color: #EEEEEE; +} + +input[type=text], input[type=password] { + /* font-family: Arial, Helvetica, sans-serif; */ + background-color: #EEEEEE; + color: #202020; +} + +.linkbutton, input[type=button], input[type=submit] { + color: #EEEEEE; + background: rgb(69, 18, 255); + border: 0; + border-radius: 3px; + padding: 5px; + font-size: 1em; +} +.linkbutton:hover, input[type=button]:hover, input[type=submit]:hover, select:hover { + background: rgb(51, 15, 182); + cursor: pointer; +} +.linkbutton:active, input[type=button]:active, input[type=submit]:active, select:active { + background: rgb(37, 12, 131); +} +.linkbutton:disabled, input[type=button]:disabled, input[type=submit]:disabled, select:disabled { + color: #868686; + background: #adadad; +} + +select { + background: rgb(69, 18, 255); + color: #EEEEEE; + border: none; + border-radius: 2px; + padding: 2px; +} + +.table { + display: table; +} +.table > * { + display: table-row +} +.table > * > * { + display: table-cell; +} \ No newline at end of file diff --git a/public/style/favicon.svg b/public/style/favicon.svg new file mode 100644 index 0000000..df4eae5 --- /dev/null +++ b/public/style/favicon.svg @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/public/style/favicon196.png b/public/style/favicon196.png new file mode 100644 index 0000000..ecd7caa --- /dev/null +++ b/public/style/favicon196.png Binary files differ diff --git a/public/index.html b/public/index.html index 632d6b3..21f9861 100644 --- a/public/index.html +++ b/public/index.html @@ -4,15 +4,25 @@ + + + + Fractals + + + + + +

Inward spiral

\ No newline at end of file diff --git a/public/manifest.json b/public/manifest.json new file mode 100644 index 0000000..79b490b --- /dev/null +++ b/public/manifest.json @@ -0,0 +1,34 @@ +{ + "name": "Fractals", + "background_color": "rgb(0,0,16)", + "theme_color": "rgb(0,0,16)", + "display": "standalone", + "icons": [ + { + "src": "style/favicon32.png", + "type": "image/png", + "sizes": "32x32" + }, + { + "src": "style/favicon96.png", + "type": "image/png", + "sizes": "96x96" + }, + { + "src": "style/favicon196.png", + "type": "image/png", + "sizes": "196x196" + }, + { + "src": "style/favicon512.png", + "type": "image/png", + "sizes": "512x512" + }, + { + "src": "style/favicon.svg", + "type": "image/svg+xml", + "sizes": "any" + } + ], + "start_url": "index.html" +} \ No newline at end of file diff --git a/public/style/core.css b/public/style/core.css new file mode 100644 index 0000000..372d35b --- /dev/null +++ b/public/style/core.css @@ -0,0 +1,54 @@ +html, body { + /* margin: 0; */ + /* background: #202020; */ + font-family: Arial, Helvetica, sans-serif; + color: #EEEEEE; +} + +a, a:visited { + color: #EEEEEE; +} + +input[type=text], input[type=password] { + /* font-family: Arial, Helvetica, sans-serif; */ + background-color: #EEEEEE; + color: #202020; +} + +.linkbutton, input[type=button], input[type=submit] { + color: #EEEEEE; + background: rgb(69, 18, 255); + border: 0; + border-radius: 3px; + padding: 5px; + font-size: 1em; +} +.linkbutton:hover, input[type=button]:hover, input[type=submit]:hover, select:hover { + background: rgb(51, 15, 182); + cursor: pointer; +} +.linkbutton:active, input[type=button]:active, input[type=submit]:active, select:active { + background: rgb(37, 12, 131); +} +.linkbutton:disabled, input[type=button]:disabled, input[type=submit]:disabled, select:disabled { + color: #868686; + background: #adadad; +} + +select { + background: rgb(69, 18, 255); + color: #EEEEEE; + border: none; + border-radius: 2px; + padding: 2px; +} + +.table { + display: table; +} +.table > * { + display: table-row +} +.table > * > * { + display: table-cell; +} \ No newline at end of file diff --git a/public/style/favicon.svg b/public/style/favicon.svg new file mode 100644 index 0000000..df4eae5 --- /dev/null +++ b/public/style/favicon.svg @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/public/style/favicon196.png b/public/style/favicon196.png new file mode 100644 index 0000000..ecd7caa --- /dev/null +++ b/public/style/favicon196.png Binary files differ diff --git a/public/style/favicon32.png b/public/style/favicon32.png new file mode 100644 index 0000000..63b3a04 --- /dev/null +++ b/public/style/favicon32.png Binary files differ diff --git a/public/index.html b/public/index.html index 632d6b3..21f9861 100644 --- a/public/index.html +++ b/public/index.html @@ -4,15 +4,25 @@ + + + + Fractals + + + + + +

Inward spiral

\ No newline at end of file diff --git a/public/manifest.json b/public/manifest.json new file mode 100644 index 0000000..79b490b --- /dev/null +++ b/public/manifest.json @@ -0,0 +1,34 @@ +{ + "name": "Fractals", + "background_color": "rgb(0,0,16)", + "theme_color": "rgb(0,0,16)", + "display": "standalone", + "icons": [ + { + "src": "style/favicon32.png", + "type": "image/png", + "sizes": "32x32" + }, + { + "src": "style/favicon96.png", + "type": "image/png", + "sizes": "96x96" + }, + { + "src": "style/favicon196.png", + "type": "image/png", + "sizes": "196x196" + }, + { + "src": "style/favicon512.png", + "type": "image/png", + "sizes": "512x512" + }, + { + "src": "style/favicon.svg", + "type": "image/svg+xml", + "sizes": "any" + } + ], + "start_url": "index.html" +} \ No newline at end of file diff --git a/public/style/core.css b/public/style/core.css new file mode 100644 index 0000000..372d35b --- /dev/null +++ b/public/style/core.css @@ -0,0 +1,54 @@ +html, body { + /* margin: 0; */ + /* background: #202020; */ + font-family: Arial, Helvetica, sans-serif; + color: #EEEEEE; +} + +a, a:visited { + color: #EEEEEE; +} + +input[type=text], input[type=password] { + /* font-family: Arial, Helvetica, sans-serif; */ + background-color: #EEEEEE; + color: #202020; +} + +.linkbutton, input[type=button], input[type=submit] { + color: #EEEEEE; + background: rgb(69, 18, 255); + border: 0; + border-radius: 3px; + padding: 5px; + font-size: 1em; +} +.linkbutton:hover, input[type=button]:hover, input[type=submit]:hover, select:hover { + background: rgb(51, 15, 182); + cursor: pointer; +} +.linkbutton:active, input[type=button]:active, input[type=submit]:active, select:active { + background: rgb(37, 12, 131); +} +.linkbutton:disabled, input[type=button]:disabled, input[type=submit]:disabled, select:disabled { + color: #868686; + background: #adadad; +} + +select { + background: rgb(69, 18, 255); + color: #EEEEEE; + border: none; + border-radius: 2px; + padding: 2px; +} + +.table { + display: table; +} +.table > * { + display: table-row +} +.table > * > * { + display: table-cell; +} \ No newline at end of file diff --git a/public/style/favicon.svg b/public/style/favicon.svg new file mode 100644 index 0000000..df4eae5 --- /dev/null +++ b/public/style/favicon.svg @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/public/style/favicon196.png b/public/style/favicon196.png new file mode 100644 index 0000000..ecd7caa --- /dev/null +++ b/public/style/favicon196.png Binary files differ diff --git a/public/style/favicon32.png b/public/style/favicon32.png new file mode 100644 index 0000000..63b3a04 --- /dev/null +++ b/public/style/favicon32.png Binary files differ diff --git a/public/style/favicon512.png b/public/style/favicon512.png new file mode 100644 index 0000000..2f05ef1 --- /dev/null +++ b/public/style/favicon512.png Binary files differ diff --git a/public/index.html b/public/index.html index 632d6b3..21f9861 100644 --- a/public/index.html +++ b/public/index.html @@ -4,15 +4,25 @@ + + + + Fractals + + + + + +

Inward spiral

\ No newline at end of file diff --git a/public/manifest.json b/public/manifest.json new file mode 100644 index 0000000..79b490b --- /dev/null +++ b/public/manifest.json @@ -0,0 +1,34 @@ +{ + "name": "Fractals", + "background_color": "rgb(0,0,16)", + "theme_color": "rgb(0,0,16)", + "display": "standalone", + "icons": [ + { + "src": "style/favicon32.png", + "type": "image/png", + "sizes": "32x32" + }, + { + "src": "style/favicon96.png", + "type": "image/png", + "sizes": "96x96" + }, + { + "src": "style/favicon196.png", + "type": "image/png", + "sizes": "196x196" + }, + { + "src": "style/favicon512.png", + "type": "image/png", + "sizes": "512x512" + }, + { + "src": "style/favicon.svg", + "type": "image/svg+xml", + "sizes": "any" + } + ], + "start_url": "index.html" +} \ No newline at end of file diff --git a/public/style/core.css b/public/style/core.css new file mode 100644 index 0000000..372d35b --- /dev/null +++ b/public/style/core.css @@ -0,0 +1,54 @@ +html, body { + /* margin: 0; */ + /* background: #202020; */ + font-family: Arial, Helvetica, sans-serif; + color: #EEEEEE; +} + +a, a:visited { + color: #EEEEEE; +} + +input[type=text], input[type=password] { + /* font-family: Arial, Helvetica, sans-serif; */ + background-color: #EEEEEE; + color: #202020; +} + +.linkbutton, input[type=button], input[type=submit] { + color: #EEEEEE; + background: rgb(69, 18, 255); + border: 0; + border-radius: 3px; + padding: 5px; + font-size: 1em; +} +.linkbutton:hover, input[type=button]:hover, input[type=submit]:hover, select:hover { + background: rgb(51, 15, 182); + cursor: pointer; +} +.linkbutton:active, input[type=button]:active, input[type=submit]:active, select:active { + background: rgb(37, 12, 131); +} +.linkbutton:disabled, input[type=button]:disabled, input[type=submit]:disabled, select:disabled { + color: #868686; + background: #adadad; +} + +select { + background: rgb(69, 18, 255); + color: #EEEEEE; + border: none; + border-radius: 2px; + padding: 2px; +} + +.table { + display: table; +} +.table > * { + display: table-row +} +.table > * > * { + display: table-cell; +} \ No newline at end of file diff --git a/public/style/favicon.svg b/public/style/favicon.svg new file mode 100644 index 0000000..df4eae5 --- /dev/null +++ b/public/style/favicon.svg @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/public/style/favicon196.png b/public/style/favicon196.png new file mode 100644 index 0000000..ecd7caa --- /dev/null +++ b/public/style/favicon196.png Binary files differ diff --git a/public/style/favicon32.png b/public/style/favicon32.png new file mode 100644 index 0000000..63b3a04 --- /dev/null +++ b/public/style/favicon32.png Binary files differ diff --git a/public/style/favicon512.png b/public/style/favicon512.png new file mode 100644 index 0000000..2f05ef1 --- /dev/null +++ b/public/style/favicon512.png Binary files differ diff --git a/public/style/favicon96.png b/public/style/favicon96.png new file mode 100644 index 0000000..5352a5a --- /dev/null +++ b/public/style/favicon96.png Binary files differ diff --git a/public/index.html b/public/index.html index 632d6b3..21f9861 100644 --- a/public/index.html +++ b/public/index.html @@ -4,15 +4,25 @@ + + + + Fractals + + + + + +

Inward spiral

\ No newline at end of file diff --git a/public/manifest.json b/public/manifest.json new file mode 100644 index 0000000..79b490b --- /dev/null +++ b/public/manifest.json @@ -0,0 +1,34 @@ +{ + "name": "Fractals", + "background_color": "rgb(0,0,16)", + "theme_color": "rgb(0,0,16)", + "display": "standalone", + "icons": [ + { + "src": "style/favicon32.png", + "type": "image/png", + "sizes": "32x32" + }, + { + "src": "style/favicon96.png", + "type": "image/png", + "sizes": "96x96" + }, + { + "src": "style/favicon196.png", + "type": "image/png", + "sizes": "196x196" + }, + { + "src": "style/favicon512.png", + "type": "image/png", + "sizes": "512x512" + }, + { + "src": "style/favicon.svg", + "type": "image/svg+xml", + "sizes": "any" + } + ], + "start_url": "index.html" +} \ No newline at end of file diff --git a/public/style/core.css b/public/style/core.css new file mode 100644 index 0000000..372d35b --- /dev/null +++ b/public/style/core.css @@ -0,0 +1,54 @@ +html, body { + /* margin: 0; */ + /* background: #202020; */ + font-family: Arial, Helvetica, sans-serif; + color: #EEEEEE; +} + +a, a:visited { + color: #EEEEEE; +} + +input[type=text], input[type=password] { + /* font-family: Arial, Helvetica, sans-serif; */ + background-color: #EEEEEE; + color: #202020; +} + +.linkbutton, input[type=button], input[type=submit] { + color: #EEEEEE; + background: rgb(69, 18, 255); + border: 0; + border-radius: 3px; + padding: 5px; + font-size: 1em; +} +.linkbutton:hover, input[type=button]:hover, input[type=submit]:hover, select:hover { + background: rgb(51, 15, 182); + cursor: pointer; +} +.linkbutton:active, input[type=button]:active, input[type=submit]:active, select:active { + background: rgb(37, 12, 131); +} +.linkbutton:disabled, input[type=button]:disabled, input[type=submit]:disabled, select:disabled { + color: #868686; + background: #adadad; +} + +select { + background: rgb(69, 18, 255); + color: #EEEEEE; + border: none; + border-radius: 2px; + padding: 2px; +} + +.table { + display: table; +} +.table > * { + display: table-row +} +.table > * > * { + display: table-cell; +} \ No newline at end of file diff --git a/public/style/favicon.svg b/public/style/favicon.svg new file mode 100644 index 0000000..df4eae5 --- /dev/null +++ b/public/style/favicon.svg @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/public/style/favicon196.png b/public/style/favicon196.png new file mode 100644 index 0000000..ecd7caa --- /dev/null +++ b/public/style/favicon196.png Binary files differ diff --git a/public/style/favicon32.png b/public/style/favicon32.png new file mode 100644 index 0000000..63b3a04 --- /dev/null +++ b/public/style/favicon32.png Binary files differ diff --git a/public/style/favicon512.png b/public/style/favicon512.png new file mode 100644 index 0000000..2f05ef1 --- /dev/null +++ b/public/style/favicon512.png Binary files differ diff --git a/public/style/favicon96.png b/public/style/favicon96.png new file mode 100644 index 0000000..5352a5a --- /dev/null +++ b/public/style/favicon96.png Binary files differ diff --git a/src/app.ts b/src/app.ts index 44939c1..59e9c4d 100644 --- a/src/app.ts +++ b/src/app.ts @@ -6,14 +6,14 @@ const port = 8081; -const sideLenth = 270; +const sideLength = 400; let P:Polygon; P = new Polygon(); P.push(new Point(0,0)); -P.push(new Point(0,sideLenth)); -P.push(new Point(sideLenth,sideLenth)); -P.push(new Point(sideLenth,0)); +P.push(new Point(0,sideLength)); +P.push(new Point(sideLength,sideLength)); +P.push(new Point(sideLength,0)); function createInwardSpiral(input:Polygon, maxiterations:number, scalar:number): Polygon[] { @@ -75,18 +75,18 @@ app.get("/randomFractal.svg", (req, res) => { const svg = [``]; - let s = 0; - + let colorStrength = 0; + const initialColorStrength = 20; for(const cycle of cycles) { - s = 20; + colorStrength = initialColorStrength; for(const iteration of cycle) { - svg.push(toSVG(iteration, `fill:rgb(0,0,${Math.floor(s)})`)); - s += 235/cycle.length; + svg.push(toSVG(iteration, `fill:rgb(0,0,${Math.floor(colorStrength)})`)); + colorStrength += (255-initialColorStrength)/cycle.length; } }