vec3 parametric (in float u, in float v)
{
return vec3(
2.0*cosh(v)*sin(u) - (2.0/3.0)*cos(3.0*v)*sinh(3.0*u),
2.0*cosh(v)*sin(u) - (2.0/3.0)*sin(3.0*v)*sinh(3.0*u),
2.0*cosh(2.0*v)*cos(2.0*u)
);
}
I should probably add a shift-u shift-v feature, would make nice gifs
strange creature
2.0*cosh(v)*sin(u) - (2.0/3.0)*cosh(3.0*v)*sinh(3.0*u),
2.0*cosh(v)*sin(u) - (2.0/3.0)*sinh(3.0*v)*sinh(3.0*u),
2.0*sinh(2.0*v)*cosh(2.0*u)
Added a bit of stuff here
https://curved-ruler.github.io/webgl-sketches/parametric/parametric.html
vec3 parametric (in float u, in float v)
{
return vec3(
1.0 + u*cos(v)*cos(v)*cos(v),
1.0 + u*sin(v)*sin(v)*sin(v),
u+v - 10.0
);
}
Butterfly Lemniscate
const vec2 u_range = vec2(0.0, 2.0*PI);
const vec2 v_range = vec2(0.0, 4.0*PI);
vec3 parametric (in float u, in float v)
{
return vec3(
u * sin(v) / (1.0 + cos(2.0*v)*cos(2.0*v)),
u * sin(v)*cos(v) / (1.0 + cos(2.0*v)*cos(2.0*v)),
u - 4.0
);
}