
KNOT: THE HEART OF INTELLIGENCE
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Knot - The Heart of Intelligence</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js"></script>
<style>
body {
margin: 0;
padding: 0;
background-color: #000 ;
color: #38bdf8 ;
font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
overflow: hidden;
display: flex;
flex-direction: column;
height: 100vh;
}
#canvas -container {
flex-grow: 1;
position: relative;
}
#ui -overlay {
position: absolute;
top: 20px;
left: 20px;
pointer-events: none;
z-index: 10;
}
.label {
font-size: 10px;
letter-spacing: 0.2em;
text-transform: uppercase;
opacity: 0.7;
margin-bottom: 4px;
}
.status {
font-size: 18px;
font-weight: 300;
text-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}
#metrics {
position: absolute;
bottom: 20px;
right: 20px;
text-align: right;
font-family: monospace;
font-size: 12px;
opacity: 0.6;
}
.control-hint {
position: absolute;
bottom: 20px;
left: 20px;
font-size: 10px;
opacity: 0.4;
}
</style>
</head>
<body>
<div id="ui-overlay">
<div class="label">Location: Zone B / Internal Void</div>
<div class="status">KNOT: THE HEART OF INTELLIGENCE</div>
<div style="margin-top: 10px;" class="label">Condition: UNKNOTTABLE / THREE-PHASE GEOMETRY</div>
</div>
<div id="metrics">
PHASE ALPHA: LOGIC RECURSION (#38bdf8)<br>
PHASE BETA: ABSTRACTION LAYER (#a855f7)<br>
PHASE GAMMA: INTUITION CORE (#22d3ee)<br>
CONNECTION: NULL_PHYSICAL_LAYER
</div>
<div class="control-hint">DRAG TO ROTATE THE CORE / SCROLL TO ZOOM INTO THE VOID</div>
<div id="canvas-container"></div>
<script>
let scene, camera, renderer, knotGroup, particles, voidSphere;
let mouseX = 0, mouseY = 0;
let targetRotationX = 0, targetRotationY = 0;
const container = document.getElementById('canvas-container');
function init() {
scene = new THREE.Scene();
scene.fog = new THREE.FogExp2(0x000000, 0.03);
camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000);
camera.position.z = 18;
renderer = new THREE.WebGLRenderer({ antialias: true, alpha: true });
renderer.setSize(window.innerWidth, window.innerHeight);
renderer.setPixelRatio(window.devicePixelRatio);
container.appendChild(renderer.domElement);
knotGroup = new THREE.Group();
scene.add(knotGroup);
// --- Optimized Three-Phase Knot Construction ---
// Adjusted p and q for more aesthetic symmetry
const p = 3;
const q = 7;
const radius = 5;
const tubularSegments = 2000; // Increased for smoothness
const radialSegments = 12;
// Phase colors
const phases = [
{ color: 0x38bdf8, offset: 0.0, opacity: 0.5, label: 'Alpha' },
{ color: 0xa855f7, offset: 0.15, opacity: 0.4, label: 'Beta' },
{ color: 0x22d3ee, offset: -0.15, opacity: 0.6, label: 'Gamma' }
];
phases.forEach((phase, index) => {
const tubeRadius = 0.08 + (index * 0.015);
const geometry = new THREE.TorusKnotGeometry(radius + phase.offset, tubeRadius, tubularSegments, radialSegments, p, q);
const material = new THREE.MeshBasicMaterial({
color: phase.color,
wireframe: true,
transparent: true,
opacity: phase.opacity,
blending: THREE.AdditiveBlending
});
const mesh = new THREE.Mesh(geometry, material);
// Slight initial rotation offset for each phase to create depth
mesh.rotation.y = (Math.PI / 4) * index;
knotGroup.add(mesh);
});
// 2. Void Atmosphere (Particles)
const particleCount = 3000;
const particlesGeometry = new THREE.BufferGeometry();
const positions = new Float32Array(particleCount * 3);
const colors = new Float32Array(particleCount * 3);
for (let i = 0; i < particleCount; i++) {
const r = 12 + Math.random() * 30;
const theta = Math.random() * Math.PI * 2;
const phi = Math.random() * Math.PI;
positions[i * 3] = r * Math.sin(phi) * Math.cos(theta);
positions[i * 3 + 1] = r * Math.sin(phi) * Math.sin(theta);
positions[i * 3 + 2] = r * Math.cos(phi);
colors[i * 3] = 0.2;
colors[i * 3 + 1] = 0.5;
colors[i * 3 + 2] = 0.9;
}
particlesGeometry.setAttribute('position', new THREE.BufferAttribute(positions, 3));
particlesGeometry.setAttribute('color', new THREE.BufferAttribute(colors, 3));
const particlesMaterial = new THREE.PointsMaterial({
size: 0.04,
vertexColors: true,
transparent: true,
opacity: 0.5,
blending: THREE.AdditiveBlending
});
particles = new THREE.Points(particlesGeometry, particlesMaterial);
scene.add(particles);
// 3. The Void Boundary
const boundaryGeo = new THREE.SphereGeometry(12, 64, 64);
const boundaryMat = new THREE.MeshBasicMaterial({
color: 0x38bdf8,
wireframe: true,
transparent: true,
opacity: 0.08
});
voidSphere = new THREE.Mesh(boundaryGeo, boundaryMat);
scene.add(voidSphere);
// Listeners
window.addEventListener('resize', onWindowResize, false);
document.addEventListener('mousemove', onMouseMove, false);
document.addEventListener('wheel', onScroll, false);
}
function onWindowResize() {
camera.aspect = window.innerWidth / window.innerHeight;
camera.updateProjectionMatrix();
renderer.setSize(window.innerWidth, window.innerHeight);
}
function onMouseMove(event) {
mouseX = (event.clientX - window.innerWidth / 2) / 150; // Slower response
mouseY = (event.clientY - window.innerHeight / 2) / 150;
}
function onScroll(event) {
camera.position.z += event.deltaY * 0.01;
camera.position.z = Math.max(8, Math.min(60, camera.position.z));
}
function animate() {
requestAnimationFrame(animate);
const time = Date.now() * 0.0002; // Slowed down from 0.0005
// Group rotation
knotGroup.rotation.y = time * 0.15;
knotGroup.rotation.z = time * 0.08;
// Individual phase subtle movement
knotGroup.children.forEach((mesh, i) => {
mesh.rotation.x = Math.sin(time * 0.3 + i) * 0.08;
});
// Interaction rotation (smoothed)
targetRotationX += (mouseY - targetRotationX) * 0.02;
targetRotationY += (mouseX - targetRotationY) * 0.02;
knotGroup.rotation.x += targetRotationX * 0.03;
knotGroup.rotation.y += targetRotationY * 0.03;
// Subtle Pulse effect
const scale = 1 + Math.sin(time * 2) * 0.015;
knotGroup.scale.set(scale, scale, scale);
// Atmosphere drift
particles.rotation.y -= 0.0002;
voidSphere.rotation.y += 0.0004;
renderer.render(scene, camera);
}
window.onload = () => {
init();
animate();
};</script>
</body>
</html>