Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
tapered stroke
void setup(){
size(400,400,P3D);
smooth(8);
stroke(30);
noFill();
}
float q, weight, x, y;
void draw(){
background(250);
beginShape();
for(int i=0; i<=64; i++){
q = i/64.0;
x = width/2 + lerp(-120,120,q);
y = height/2 + 50*sin(PI*q - millis()*.0015);
weight = 1+16*q*(1-q);
strokeWeight(weight);
vertex(x,y);
}
endShape();
}
@hspencer

This comment has been minimized.

Copy link

hspencer commented Sep 26, 2019

This is simply wonderful. Thanks for sharing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.