Vampire Squid from Hell
Vampyroteuthis infernalis cephalopod anatomy showing the velvety red-black interbrachial web cloak, glowing blue arm tip photophores, and sensory velar filaments.
60 FPS • Canvas 2D
Click + Drag to interact with field
</>
Full Executable Algorithm Code
137 lines
5284 chars
// 047 - Vampire Squid from Hell (creatures)
// 1:1 Original algorithm engine source
function createVampireSquid() {
const ARM_COUNT = 8;
const WEB_LAYERS = 18;
return {
setup() {
},
render(context, timeState, params) {
const { ctx, width, height } = context;
const pulseSpeed = Number(params.swimSpeed || 1);
const t = timeState.time * pulseSpeed;
ctx.fillStyle = "#020306";
ctx.fillRect(0, 0, width, height);
const cx = width * 0.5;
const cy = height * 0.46;
const squidScale = Math.min(width, height) / 480;
const rotY = Math.sin(t * 0.5) * 0.45;
const rotX = 0.55 + Math.sin(t * 0.7) * 0.25;
const rotZ = Math.sin(t * 0.4) * 0.15;
ctx.save();
ctx.globalCompositeOperation = "screen";
const baseHue = (350 + Math.sin(t * 0.6) * 15) % 360;
for (let layer = 1; layer <= WEB_LAYERS; layer++) {
const normL = layer / WEB_LAYERS;
const curR = 120 * normL * squidScale;
const mantleConeZ = (1 - normL) * (75 * squidScale);
ctx.beginPath();
const steps = 64;
let avgDepth = 0;
for (let i = 0; i <= steps; i++) {
const phi = i / steps * Math.PI * 2;
const armIndex = phi / (Math.PI * 2) * ARM_COUNT;
const armWave = Math.sin(t * 2.8 + armIndex * 0.8) * (18 * normL * squidScale);
const rawX = Math.cos(phi) * (curR + armWave);
const rawY = Math.sin(phi) * (curR * 0.7 + armWave) + 20 * normL * squidScale;
const rawZ = -mantleConeZ + Math.sin(phi * ARM_COUNT) * (12 * normL * squidScale);
const p = project3D(rawX, rawY, rawZ, rotX, rotY, rotZ, cx, cy, 450, 520);
avgDepth += p.depth;
if (i === 0) ctx.moveTo(p.x, p.y);
else ctx.lineTo(p.x, p.y);
}
avgDepth /= steps + 1;
const layerHue = (baseHue + normL * 25) % 360;
const alpha = (0.06 + normL * 0.32) * avgDepth;
ctx.strokeStyle = hsla(layerHue, 90, 65, alpha);
ctx.lineWidth = Math.max(0.8, (layer === WEB_LAYERS ? 2 : 0.9) * avgDepth);
ctx.stroke();
}
for (let a = 0; a < ARM_COUNT; a++) {
const phi = a / ARM_COUNT * Math.PI * 2;
const armWave = Math.sin(t * 2.8 + a * 0.8) * (18 * squidScale);
const armR = (120 + armWave) * squidScale;
const tipX = Math.cos(phi) * armR;
const tipY = Math.sin(phi) * (armR * 0.7) + 20 * squidScale;
const tipZ = Math.sin(phi * ARM_COUNT) * (12 * squidScale);
const pOrigin = project3D(0, -35 * squidScale, -60 * squidScale, rotX, rotY, rotZ, cx, cy, 450, 520);
const pTip = project3D(tipX, tipY, tipZ, rotX, rotY, rotZ, cx, cy, 450, 520);
ctx.beginPath();
ctx.moveTo(pOrigin.x, pOrigin.y);
ctx.lineTo(pTip.x, pTip.y);
ctx.strokeStyle = hsla(350, 80, 50, 0.45 * pTip.depth);
ctx.lineWidth = Math.max(0.8, 1.4 * pTip.depth);
ctx.stroke();
const pulse = 1 + 0.35 * Math.sin(t * 4 + a);
const glowR = 5.5 * pulse * squidScale * pTip.depth;
ctx.fillStyle = hsla(190, 100, 75, 0.95);
ctx.shadowColor = "#38bdf8";
ctx.shadowBlur = 12 * pTip.depth;
ctx.beginPath();
ctx.arc(pTip.x, pTip.y, glowR, 0, Math.PI * 2);
ctx.fill();
ctx.shadowBlur = 0;
}
for (let s = -1; s <= 1; s += 2) {
ctx.beginPath();
const filSteps = 30;
const maxDrop = 190 * squidScale;
for (let st = 0; st <= filSteps; st++) {
const nst = st / filSteps;
const fx = s * (16 * squidScale) + Math.sin(t * 2.2 - nst * 6 + s) * (22 * nst * squidScale);
const fy = (20 + nst * maxDrop) * squidScale;
const fz = Math.cos(t * 1.8 + nst * 8 + s) * (35 * nst * squidScale);
const p = project3D(fx, fy, fz, rotX, rotY, rotZ, cx, cy, 450, 520);
if (st === 0) ctx.moveTo(p.x, p.y);
else ctx.lineTo(p.x, p.y);
}
ctx.strokeStyle = "rgba(244, 114, 182, 0.65)";
ctx.lineWidth = 1.2;
ctx.stroke();
}
ctx.restore();
}
};
}
// Default parameters from content metadata
const defaultParams = [
{
"key": "swimSpeed",
"label": "Mantle Pulse Velocity",
"type": "range",
"min": 0.4,
"max": 2.2,
"step": 0.1,
"defaultValue": 1,
"description": "Cloaked umbrella contraction rate"
},
{
"key": "cloakInversion",
"label": "Web Flaring Angle",
"type": "range",
"min": 0.2,
"max": 1.5,
"step": 0.1,
"defaultValue": 0.5,
"description": "Interbrachial webbing spread"
}
];
if (!window.__art_instances) window.__art_instances = {};
if (!window.__art_instances['vampire-squid']) {
const inst = typeof createVampireSquid === 'function' ? createVampireSquid() : null;
if (inst && inst.setup) {
inst.setup({ ctx, width, height, dpr: 1, aspectRatio: width / height }, defaultParams);
}
window.__art_instances['vampire-squid'] = inst;
}
const instance = window.__art_instances['vampire-squid'];
if (instance && instance.render) {
instance.render(
{ ctx, width, height, dpr: 1, aspectRatio: width / height },
{ time, deltaTime: dt, frameCount: Math.floor(time * 60), fps: 60 },
defaultParams
);
} Edit in Interactive Playground
Zero Dependencies • Standalone Canvas 2D
ƒ
Mathematical Formulation
high
Analytical Equation
pweb(a,t)=R(θa+wa(t))[Ra(t)0.7Ra(t)+y0],Iphoto(t)=I0[1+βsin(ωt+a)]
Click to expand
∑
Vampire Squid from Hell
Full Mathematical System • creatures
100%
Complete System of Equations
[Governing Law][Discrete Progression][Domain & Space][Parameter State]pweb(a,t)=R(θa+wa(t))[Ra(t)0.7Ra(t)+y0],Iphoto(t)=I0[1+βsin(ωt+a)]webarch=quadCurve(armTipa,midPt,armTipnext),photophore=circle(tip,3.5⋅(1+0.3⋅sin(4t+a)))x∈R2,t∈R+,ω∈[0,2π]λswimSpeed=1(Mantle Pulse Velocity),λcloakInversion=0.5(Web Flaring Angle)
pweb(a,t)=R(θa+wa(t))[Ra(t)0.7Ra(t)+y0],Iphoto(t)=I0[1+βsin(ωt+a)]
Computational Implementation (JavaScript Engine Equivalent)
web_arch = quadCurve(armTip_a, midPt, armTip_next), photophore = circle(tip, 3.5*(1 + 0.3*sin(4t + a))) Compact Formula
web_arch = quadCurve(armTip_a, midPt, armTip_next), photophore = circle(tip, 3.5*(1 + 0.3*sin(4t + a))) Mathematical Tags
#vampire-squid
#cephalopod
#deep-sea
#abyss
#creatures
#bioluminescence
#cloak
Author: Math Art Core Target: 60 FPS
Press ESC or F to exit