This commit is contained in:
mtgmonkey 2025-06-12 07:44:55 -04:00
parent bd377d0dc6
commit c35a0b5108
2 changed files with 5 additions and 3 deletions

View file

@ -66,13 +66,13 @@ view computer memory =
<|
List.append
(makeCircles computer fx bounds memory [])
([ P.words black "Welcome to my math project! Use arrow keys to adjust the width of each rectangle."
([ P.words black "Welcome to my math project! Left and right arrows adjust dx, up and down change the visualization."
|> at ( (bounds.xmax - bounds.xmin) / 2, bounds.ymax - 0.5)
, P.words black ("The current dx is " ++ (String.fromFloat memory.dx))
|> at ( (bounds.xmax - bounds.xmin) / 2, bounds.ymax - 1)
, P.words black ("The current approximation is " ++ (String.fromFloat <| (\n->n/32/32) <| getArea computer corner fx bounds memory))
, P.words black ("The left approximation is " ++ (String.fromFloat <| (\n->n/32/32) <| getArea computer TopLeft fx bounds memory))
|> at ( (bounds.xmax - bounds.xmin) / 2, bounds.ymax - 1.5)
, P.words black ("The real area under the curve is thus about " ++ (String.fromFloat 898))
, P.words black ("The right approximation is about " ++ (String.fromFloat <| (\n->n/32/32) <| getArea computer TopRight fx bounds memory))
|> at ( (bounds.xmax - bounds.xmin) / 2, bounds.ymax - 2)
])

View file

@ -2,10 +2,12 @@
<html>
<head>
<script type = 'text/javascript' src = './main.js'></script>
<title id='title'></title>
</head>
<body>
<script>
var app = Elm.Main.init();
document.getElementById('title').textContent='Reimann Sum Visualizer';
</script>
</body>
</html>