Public
Edited
Sep 19, 2023
Insert cell
Insert cell
shader({iTime: true})`

float a = iTime / 5.0;

float fn(vec2 p) {
return cos(gl_FragCoord.x / 30.0) * sin(p.y / 30.0) * 1000.0;
}

void mainImage(out vec4 fragColor, in vec2 fragCoord) {
vec2 p = (gl_FragCoord.xy - iResolution.xy / 2.0) * mat2(cos(a), -sin(a), sin(a), cos(a));
p = p / fn(p);
fragColor = vec4(vec3(float(pow(mod(p.x, 1.0), 0.1) * pow(mod(p.y, 1.0), 0.1))), 1.0);
}`
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more