Concept Map Visualization: Math Operations
I'll create a complete HTML file with CSS and JavaScript that visualizes math operations as a concept map, with the main concept in the center and child concepts connected with lines.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Math Operations Concept Map</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
body {
background: linear-gradient(135deg, #1a2a6c, #b21f1f, #1a2a6c);
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
padding: 20px;
color: #fff;
}
.container {
max-width: 1200px;
width: 100%;
text-align: center;
}
header {
margin-bottom: 30px;
text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
h1 {
font-size: 2.8rem;
margin-bottom: 10px;
color: #FFD700;
}
.subtitle {
font-size: 1.2rem;
opacity: 0.9;
max-width: 700px;
margin: 0 auto;
}
.concept-map {
position: relative;
height: 600px;
margin: 0 auto;
}
.main-concept {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
color: white;
width: 200px;
height: 200px;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
font-size: 1.8rem;
font-weight: bold;
text-align: center;
box-shadow: 0 10px 30px rgba(0,0,0,0.3);
cursor: pointer;
transition: all 0.3s ease;
z-index: 10;
padding: 15px;
border: 4px solid rgba(255, 255, 255, 0.3);
}
.main-concept:hover {
transform: translate(-50%, -50%) scale(1.05);
box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}
.child-concept {
position: absolute;
width: 150px;
height: 150px;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
font-size: 1.4rem;
font-weight: bold;
text-align: center;
box-shadow: 0 8px 25px rgba(0,0,0,0.2);
cursor: pointer;
transition: all 0.3s ease;
z-index: 5;
padding: 15px;
border: 3px solid rgba(255, 255, 255, 0.2);
color: #fff;
}
.child-concept:hover {
transform: scale(1.1);
z-index: 20;
box-shadow: 0 12px 35px rgba(0,0,0,0.3);
}
.connector {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1;
}
.line {
stroke: rgba(255, 255, 255, 0.5);
stroke-width: 3;
stroke-dasharray: 10, 5;
transition: stroke 0.3s ease;
}
.info-panel {
background: rgba(0, 0, 0, 0.7);
border-radius: 15px;
padding: 25px;
margin-top: 30px;
max-width: 800px;
margin-left: auto;
margin-right: auto;
backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.1);
}
.info-title {
font-size: 1.8rem;
margin-bottom: 15px;
color: #FFD700;
}
.info-content {
font-size: 1.1rem;
line-height: 1.6;
text-align: left;
}
.info-content ul {
padding-left: 25px;
margin: 15px 0;
}
.info-content li {
margin-bottom: 10px;
}
.highlight {
background: rgba(255, 215, 0, 0.2);
padding: 2px 5px;
border-radius: 4px;
}
.addition { background: linear-gradient(135deg, #00b09b, #96c93d); top: 15%; left: 50%; }
.subtraction { background: linear-gradient(135deg, #f85032, #e73827); top: 50%; left: 85%; }
.multiplication { background: linear-gradient(135deg, #834d9b, #d04ed6); top: 85%; left: 50%; }
.division { background: linear-gradient(135deg, #1d976c, #93f9b9); top: 50%; left: 15%; }
@media (max-width: 768px) {
.concept-map {
height: 500px;
}
.main-concept {
width: 150px;
height: 150px;
font-size: 1.4rem;
}
.child-concept {
width: 120px;
height: 120px;
font-size: 1.1rem;
}
h1 {
font-size: 2.2rem;
}
}
</style>
</head>
<body>
<div class="container">
<header>
<h1>Math Operations Concept Map</h1>
<p class="subtitle">Visualizing the fundamental arithmetic operations and their relationships</p>
</header>
<div class="concept-map">
<div class="main-concept" id="mainConcept">Math Operations</div>
<div class="child-concept addition" id="addition">Addition</div>
<div class="child-concept subtraction" id="subtraction">Subtraction</div>
<div class="child-concept multiplication" id="multiplication">Multiplication</div>
<div class="child-concept division" id="division">Division</div>
<svg class="connector" id="connector"></svg>
</div>
<div class="info-panel">
<h2 class="info-title">About Math Operations</h2>
<div class="info-content">
<p>Arithmetic is the branch of mathematics that deals with numbers and the basic operations between them: addition, subtraction, multiplication, and division. These operations form the foundation for more advanced mathematical concepts.</p>
<ul>
<li><span class="highlight">Addition (+)</span> is the process of combining two or more numbers to find their total.</li>
<li><span class="highlight">Subtraction (-)</span> is the process of taking one number away from another to find the difference.</li>
<li><span class="highlight">Multiplication (×)</span> is repeated addition of the same number, helping us calculate totals quickly.</li>
<li><span class="highlight">Division (÷)</span> is the process of splitting a number into equal parts, the inverse of multiplication.</li>
</ul>
<p>These operations are interconnected - multiplication is repeated addition, division is the inverse of multiplication, and subtraction is the inverse of addition. Understanding these relationships is fundamental to mastering mathematics.</p>
</div>
</div>
</div>
<script>
document.addEventListener('DOMContentLoaded', function() {
const mainConcept = document.getElementById('mainConcept');
const connectorSvg = document.getElementById('connector');
const childConcepts = [
document.getElementById('addition'),
document.getElementById('subtraction'),
document.getElementById('multiplication'),
document.getElementById('division')
];
// Draw connecting lines
function drawConnectors() {
// Clear previous lines
connectorSvg.innerHTML = '';
const mainRect = mainConcept.getBoundingClientRect();
const containerRect = document.querySelector('.concept-map').getBoundingClientRect();
const mainCenterX = mainRect.left + mainRect.width/2 - containerRect.left;
const mainCenterY = mainRect.top + mainRect.height/2 - containerRect.top;
childConcepts.forEach(child => {
const childRect = child.getBoundingClientRect();
const childCenterX = childRect.left + childRect.width/2 - containerRect.left;
const childCenterY = childRect.top + childRect.height/2 - containerRect.top;
const line = document.createElementNS('http://www.w3.org/2000/svg', 'line');
line.setAttribute('x1', mainCenterX);
line.setAttribute('y1', mainCenterY);
line.setAttribute('x2', childCenterX);
line.setAttribute('y2', childCenterY);
line.setAttribute('class', 'line');
connectorSvg.appendChild(line);
});
}
// Initial draw
drawConnectors();
// Redraw on window resize
window.addEventListener('resize', drawConnectors);
// Add interaction effects
childConcepts.forEach(child => {
child.addEventListener('mouseenter', function() {
const lines = document.querySelectorAll('.line');
const index = Array.from(childConcepts).indexOf(child);
if (lines[index]) {
lines[index].style.stroke = 'rgba(255, 255, 255, 1)';
lines[index].style.strokeWidth = '4';
}
});
child.addEventListener('mouseleave', function() {
const lines = document.querySelectorAll('.line');
lines.forEach(line => {
line.style.stroke = 'rgba(255, 255, 255, 0.5)';
line.style.strokeWidth = '3';
});
});
// Click effect
child.addEventListener('click', function() {
this.classList.add('pulse');
setTimeout(() => {
this.classList.remove('pulse');
}, 300);
});
});
// Add animation to main concept
mainConcept.addEventListener('click', function() {
this.classList.add('pulse');
setTimeout(() => {
this.classList.remove('pulse');
}, 300);
});
});
</script>
</body>
</html>
Features of this Concept Map Visualization:
-
Central Concept: "Math Operations" is positioned in the center with a distinctive design
-
Child Concepts: The four arithmetic operations (Addition, Subtraction, Multiplication, Division) are positioned around the main concept
-
Connecting Lines: SVG lines dynamically connect the main concept to each child concept
-
Color Coding: Each operation has a unique color scheme:
- Addition: Green gradient
- Subtraction: Red gradient
- Multiplication: Purple gradient
- Division: Teal gradient
-
Interactive Elements:
- Lines highlight when hovering over a child concept
- Concepts pulse when clicked
- Concepts scale up slightly on hover for emphasis
-
Responsive Design: Adapts to different screen sizes while maintaining the concept map structure
-
Information Panel: Provides details about each math operation and their relationships
-
Visual Design:
- Dark gradient background for contrast
- Glowing effects and shadows for depth
- Circular design for concepts to represent interconnectedness
The visualization clearly demonstrates how the four basic arithmetic operations are all connected to the central concept of "Math Operations" through the connecting lines extending from the parent to each child concept.