AI Personal Learning
and practical guidance

Math formulas as instructions to draw a swimming mysterious water creature in Claude

Math formulas are used as instructions to allow Claude Generate amazing animations that I'm sure you'll be very surprised to see.

Drawing a Swimming Mysterious Water Creature in Claude with Math Formulas-1


Simply enter the following math formula in Claude:

a=(x,y,d=mag(k=x/8-12,e=y/8-9)**2/50)=>stroke(99+99/abs(k)*sin(t*4+e*e)**2,96).point((q=x/3+e+60+1/k+k/sin(e)*sin(d-t))*sin(c=d/4- t/8)+200,(q-y*d/9)*cos(c)+200)
t=0,draw=$=>{t||createCanvas(w=400,w);background(6);for(t+=PI/90,i=1e4;i--;)a(i0,i/200<<2)}

Just wait for the code to be generated. If it is not generated, add a command:

Please visualize it for me.

 

Generate a code reference (save as .html locally and open it):

<!DOCTYPE html>
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.4.0/p5.js"></script>
<style>
body { margin: 0; display: flex; justify-content: center; align-items: center; height: 100vh; background: #111; }
canvas { border: 1px solid #333; }
</style>
</head>
<body>
<script>
let t = 0;

function mag(k, e) {
return Math.sqrt(k * k + e * e);
}

function stroke(v, a) {
stroke(v, v, v, a);
}

function a(x, y) {
const k = x/8 - 12;
const e = y/8 - 9;
const d = mag(k, e)**2/50;

stroke(99 + 99/Math.abs(k) * Math.sin(t*4 + e*e)**2, 96);

const q = x/3 + e + 60 + 1/k + k/Math.sin(e)*Math.sin(d-t);
const c = d/4 - t/8;

point(
q * Math.sin(c) + 200,
(q - y*d/9) * Math.cos(c) + 200
);
}

function setup() {
createCanvas(400, 400);
}

function draw() {
background(6);

for(let i = 0; i < 10000; i++) {
a(i % 200, Math.floor(i/200) * 4);
}

t += Math.PI/90;
}
</script>
</body>
</html>
AI Easy Learning

The layman's guide to getting started with AI

Help you learn how to utilize AI tools at a low cost and from a zero base.AI, like office software, is an essential skill for everyone. Mastering AI will give you an edge in your job search and half the effort in your future work and studies.

View Details>
May not be reproduced without permission:Chief AI Sharing Circle " Math formulas as instructions to draw a swimming mysterious water creature in Claude

Chief AI Sharing Circle

Chief AI Sharing Circle specializes in AI learning, providing comprehensive AI learning content, AI tools and hands-on guidance. Our goal is to help users master AI technology and explore the unlimited potential of AI together through high-quality content and practical experience sharing. Whether you are an AI beginner or a senior expert, this is the ideal place for you to gain knowledge, improve your skills and realize innovation.

Contact Us
en_USEnglish