Spaces:
Running
Running
File size: 5,604 Bytes
c04d49d daf20e7 c04d49d daf20e7 c04d49d daf20e7 c04d49d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>MathMagic Visualizer | Interactive Math Learning</title>
<link rel="stylesheet" href="style.css">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjs/11.6.0/math.min.js"></script>
<script src="https://unpkg.com/feather-icons"></script>
</head>
<body class="bg-gray-50 min-h-screen">
<custom-navbar></custom-navbar>
<main class="container mx-auto px-4 py-12">
<section class="text-center mb-16">
<h1 class="text-5xl font-bold text-primary-700 mb-4">MathMagic Visualizer</h1>
<p class="text-xl text-gray-600 max-w-2xl mx-auto">Transform abstract math concepts into interactive visual experiences.</p>
</section>
<div class="grid grid-cols-1 md:grid-cols-2 gap-8 mb-16">
<div class="bg-white p-6 rounded-xl shadow-lg">
<h2 class="text-2xl font-bold text-gray-800 mb-4">Function Explorer</h2>
<div class="mb-4">
<label class="block text-gray-700 mb-2">Enter function (e.g., sin(x), x^2):</label>
<input type="text" id="functionInput" class="w-full px-4 py-2 border rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-transparent" value="sin(x)">
</div>
<div class="h-64 relative">
<canvas id="functionGraph"></canvas>
<div class="absolute top-4 right-4 flex space-x-2">
<button id="zoomIn" class="bg-white p-2 rounded-full shadow hover:bg-gray-100">
<i data-feather="zoom-in"></i>
</button>
<button id="zoomOut" class="bg-white p-2 rounded-full shadow hover:bg-gray-100">
<i data-feather="zoom-out"></i>
</button>
<button id="resetView" class="bg-white p-2 rounded-full shadow hover:bg-gray-100">
<i data-feather="refresh-cw"></i>
</button>
</div>
<div id="coordinatesDisplay" class="absolute bottom-4 left-4 bg-white/80 px-3 py-1 rounded-lg text-sm shadow">
x: 0, y: 0
</div>
</div>
</div>
<div class="bg-white p-6 rounded-xl shadow-lg">
<h2 class="text-2xl font-bold text-gray-800 mb-4">Geometry Playground</h2>
<div class="mb-4 grid grid-cols-2 gap-4">
<button id="drawLine" class="bg-primary-100 hover:bg-primary-200 text-primary-700 py-2 px-4 rounded-lg transition">Line</button>
<button id="drawCircle" class="bg-primary-100 hover:bg-primary-200 text-primary-700 py-2 px-4 rounded-lg transition">Circle</button>
<button id="drawRectangle" class="bg-primary-100 hover:bg-primary-200 text-primary-700 py-2 px-4 rounded-lg transition">Rectangle</button>
<button id="drawTriangle" class="bg-primary-100 hover:bg-primary-200 text-primary-700 py-2 px-4 rounded-lg transition">Triangle</button>
</div>
<div class="h-64 border-2 border-dashed border-gray-300 rounded-lg relative" id="geometryCanvas">
<div class="absolute inset-0 flex items-center justify-center text-gray-400">Draw shapes here</div>
</div>
</div>
</div>
<section class="bg-white rounded-xl shadow-lg overflow-hidden">
<div class="grid grid-cols-1 md:grid-cols-2">
<div class="p-8">
<h2 class="text-3xl font-bold text-gray-800 mb-4">Interactive Algebra</h2>
<p class="text-gray-600 mb-6">Manipulate equations in real-time to see how changes affect the graph.</p>
<div class="space-y-4">
<div>
<label class="block text-gray-700 mb-1">Equation: y = mx + b</label>
<div class="flex items-center space-x-4">
<div class="flex-1">
<label class="block text-sm text-gray-600 mb-1">Slope (m)</label>
<input type="range" id="sliderM" min="-5" max="5" step="0.1" value="1" class="w-full">
</div>
<div class="flex-1">
<label class="block text-sm text-gray-600 mb-1">Intercept (b)</label>
<input type="range" id="sliderB" min="-10" max="10" step="0.5" value="0" class="w-full">
</div>
</div>
</div>
</div>
</div>
<div class="bg-gray-50 p-8 flex items-center">
<div class="h-64 w-full">
<canvas id="algebraGraph"></canvas>
</div>
</div>
</div>
</section>
</main>
<custom-footer></custom-footer>
<script src="components/navbar.js"></script>
<script src="components/footer.js"></script>
<script src="script.js"></script>
<script src="math-visualizer.js"></script>
<script>feather.replace();</script>
</body>
</html> |