Lesson 10 of 10 · Strange attractors on the GPU
In motion
Everything together, turning in the void.
Everything together: 130,000 particles computed by the GPU, colored by speed, adding light and turning in the void. They leave a trail, so you see flow instead of a frozen image.
Three equations. One hundred thousand travelers. A form that should not exist.
This is your piece. Make it yours.
AizawaRewrite the function or move its constants and watch the entire population migrate to a new geometry.
Move Stretch (
d) and Inflate (a), or rewrite the whole function and watch all 130k particles migrate.The code
vec3 attractor(vec3 p){
// Aizawa · mueve los números y mira
float a=0.95, b=0.70, c=0.60, d=3.50, e=0.25, f=0.10;
float dx = (p.z - b)*p.x - d*p.y;
float dy = d*p.x + (p.z - b)*p.y;
float dz = c + a*p.z - p.z*p.z*p.z/3.0
- (p.x*p.x + p.y*p.y)*(1.0 + e*p.z) + f*p.z*p.x*p.x*p.x;
return vec3(dx, dy, dz);
}