From 089dbf52f28e4693a1bb665f6f604075bf07689f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Kr=C5=A1ka?= Date: Fri, 27 Sep 2024 10:48:26 +0200 Subject: [PATCH] colors --- src/gambleMath.ts | 6 +++--- src/templates/error.ejs | 25 ++++++++++++++++++++++++- src/templates/gamble.ejs | 1 + src/templates/index.ejs | 7 ++++--- src/templates/person.ejs | 1 + www/confetti.min.js | 1 + www/styles.css | 21 +++++++++++++++++++++ 7 files changed, 55 insertions(+), 7 deletions(-) create mode 100644 www/confetti.min.js create mode 100644 www/styles.css diff --git a/src/gambleMath.ts b/src/gambleMath.ts index 0a2f349..af5e459 100644 --- a/src/gambleMath.ts +++ b/src/gambleMath.ts @@ -1,8 +1,8 @@ -const deltaX: number = 12; -const ymax: number = 1; +const deltaX: number = 20; +const ymax: number = 1.8; function f(a: number, x: number): number { - return Math.exp(-1 * Math.pow((x - a), 2) / 30); + return (1.2 + 0.75 * Math.cos(0.8 * (x - a))) * Math.exp(-1 * Math.pow(x - a - 5, 2) / 100); } // helper function diff --git a/src/templates/error.ejs b/src/templates/error.ejs index a72b5a3..41fea38 100644 --- a/src/templates/error.ejs +++ b/src/templates/error.ejs @@ -5,11 +5,23 @@ + + Nestabilní body + +