------------------------------------------------------------
commit 40f2f595afdf894c473aa37a1ccc1dcf8a63aeca
Author: ffff:72.234.190.31 <ffff:72.234.190.31@hub.scroll.pub> Date: Mon Nov 18 20:08:48 2024 +0000 Updated index.scroll diff --git a/index.scroll b/index.scroll index 4442ed6..8e7cd22 100644 --- a/index.scroll +++ b/index.scroll @@ -1,4 +1,2 @@ buildHtml -theme roboto - -Hello World my name is \ No newline at end of file +claude.html ------------------------------------------------------------
commit 3feb630d4ead850e744b1f408f852f88ba43432f
Author: ffff:72.234.190.31 <ffff:72.234.190.31@hub.scroll.pub> Date: Mon Nov 18 20:08:45 2024 +0000 Updated claude.html diff --git a/claude.html b/claude.html index e69de29..0fc12c3 100644 --- a/claude.html +++ b/claude.html @@ -0,0 +1,203 @@ +<!doctype html> +<html> + <head> + <style> + .container { + max-width: 800px; + margin: 20px auto; + font-family: system-ui, sans-serif; + } + .controls { + margin: 20px 0; + } + .legend { + display: flex; + gap: 20px; + margin: 10px 0; + } + .legend-item { + display: flex; + align-items: center; + gap: 5px; + } + .color-box { + width: 20px; + height: 20px; + border-radius: 4px; + } + canvas { + margin: 20px 0; + } + </style> + </head> + <body> + <div class="container"> + <h2>Trigonometric Functions Visualization</h2> + <div class="controls"> + <label> + Zoom: + <input + type="range" + id="zoom" + min="0.5" + max="4" + step="0.1" + value="1" + /> + </label> + </div> + <div class="legend"> + <div class="legend-item"> + <div class="color-box" style="background: #ff6384"></div> + <span>sin(x)</span> + </div> + <div class="legend-item"> + <div class="color-box" style="background: #36a2eb"></div> + <span>cos(x)</span> + </div> + <div class="legend-item"> + <div class="color-box" style="background: #4bc0c0"></div> + <span>tan(x)</span> + </div> + </div> + <canvas id="chart" width="800" height="400"></canvas> + </div> + + <script> + const canvas = document.getElementById("chart"); + const ctx = canvas.getContext("2d"); + const zoomInput = document.getElementById("zoom"); + + let zoom = 1; + + function drawGrid() { + const width = canvas.width; + const height = canvas.height; + const centerX = width / 2; + const centerY = height / 2; + + ctx.strokeStyle = "#e0e0e0"; + ctx.lineWidth = 1; + + // Draw vertical grid lines and x-axis labels + for (let x = 0; x <= width; x += 50) { + ctx.beginPath(); + ctx.moveTo(x, 0); + ctx.lineTo(x, height); + ctx.stroke(); + + // Add x-axis labels + const xValue = ((x - centerX) * (0.01 / zoom) * Math.PI).toFixed(1); + if (x !== centerX) { + // Skip 0 as it's handled separately + ctx.fillStyle = "#666"; + ctx.font = "12px sans-serif"; + ctx.textAlign = "center"; + ctx.fillText(xValue + "π", x, centerY + 20); + } + } + + // Draw horizontal grid lines and y-axis labels + for (let y = 0; y <= height; y += 50) { + ctx.beginPath(); + ctx.moveTo(0, y); + ctx.lineTo(width, y); + ctx.stroke(); + + // Add y-axis labels + const yValue = -((y - centerY) / (100 * zoom)).toFixed(1); + if (y !== centerY) { + // Skip 0 as it's handled separately + ctx.fillStyle = "#666"; + ctx.font = "12px sans-serif"; + ctx.textAlign = "right"; + ctx.fillText(yValue, centerX - 10, y + 4); + } + } + + // Draw x and y axis + ctx.strokeStyle = "#000"; + ctx.lineWidth = 2; + + // X-axis + ctx.beginPath(); + ctx.moveTo(0, centerY); + ctx.lineTo(width, centerY); + ctx.stroke(); + + // Y-axis + ctx.beginPath(); + ctx.moveTo(centerX, 0); + ctx.lineTo(centerX, height); + ctx.stroke(); + + // Add axis labels + ctx.fillStyle = "#000"; + ctx.font = "bold 14px sans-serif"; + + // X-axis label + ctx.textAlign = "center"; + ctx.fillText("x (radians)", width - 40, centerY - 10); + + // Y-axis label + ctx.save(); + ctx.translate(20, height / 2); + ctx.rotate(-Math.PI / 2); + ctx.fillText("f(x)", 0, 0); + ctx.restore(); + + // Origin label + ctx.textAlign = "right"; + ctx.fillText("0", centerX - 5, centerY + 15); + } + + function plotFunction(fn, color) { + ctx.strokeStyle = color; + ctx.lineWidth = 2; + ctx.beginPath(); + + for (let i = 0; i < canvas.width; i++) { + const x = (i - canvas.width / 2) * (0.01 / zoom); + let y; + + // Handle potential infinity for tan + if (fn === Math.tan) { + y = Math.abs(fn(x)) > 5 ? NaN : fn(x); + } else { + y = fn(x); + } + + const scaledY = -y * 100 * zoom + canvas.height / 2; + + if (i === 0) { + ctx.moveTo(i, scaledY); + } else { + // Only draw if y is a finite number + if (!isNaN(y) && isFinite(y)) { + ctx.lineTo(i, scaledY); + } else { + ctx.moveTo(i, scaledY); + } + } + } + ctx.stroke(); + } + + function draw() { + ctx.clearRect(0, 0, canvas.width, canvas.height); + drawGrid(); + plotFunction(Math.sin, "#ff6384"); + plotFunction(Math.cos, "#36a2eb"); + plotFunction(Math.tan, "#4bc0c0"); + } + + zoomInput.addEventListener("input", (e) => { + zoom = parseFloat(e.target.value); + draw(); + }); + + // Initial draw + draw(); + </script> + </body> +</html> ------------------------------------------------------------
commit 6012f1db2b215eb906d9fbfad54916df8266c339
Author: ffff:72.234.190.31 <ffff:72.234.190.31@hub.scroll.pub> Date: Mon Nov 18 20:08:41 2024 +0000 Updated claude.html diff --git a/claude.html b/claude.html new file mode 100644 index 0000000..e69de29 ------------------------------------------------------------
commit 93e43037b7794c5d3de89eaf6afe3e3d561d8df3
Author: root <root@hub.scroll.pub> Date: Sun Nov 10 20:12:15 2024 +0000 initial blank_template template diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bd1a52d --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +.DS_Store +*.html +*.txt +*.xml +*.css +*.js +*.csv +requests.scroll \ No newline at end of file diff --git a/index.scroll b/index.scroll new file mode 100644 index 0000000..4442ed6 --- /dev/null +++ b/index.scroll @@ -0,0 +1,4 @@ +buildHtml +theme roboto + +Hello World my name is \ No newline at end of file