Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
GlowingSun Processing Program
void setup() {
size(640, 360);
}
void draw() {
background(135, 206, 235);
noStroke();
int sunX = 200;
int sunY = 100;
int sunWidth = 100;
// Draw the glow
for (int i = 10; i >= 0; i--) {
fill(255, 128, 0, 90 - (i*5));
int glowWidth = sunWidth + (i * 5);
ellipse(sunX, sunY, glowWidth, glowWidth);
}
// Draw the sun
fill(255, 128, 0);
ellipse(sunX, sunY, sunWidth, sunWidth);
}
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.