This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
color red = 0xffff0000; | |
println(red); | |
println(hex(red)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
color red = color(255, 0, 0); | |
color blue = color(0, 0, 255); | |
int margin = 64; | |
int left = margin; | |
int top = margin; | |
int right = width - margin; | |
int bottom = height - margin; | |
size(512, 256); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for (int i = left; i <= right; ++i) { | |
stroke(lerpColor(red, blue, (i - left) / float(right - left))); | |
line(i, top, i, bottom); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
color blue = 0xff0000ff; | |
color magenta = 0xffff00ff; | |
color red = 0xffff0000; | |
color yellow = 0xffffff00; | |
color startc; | |
color stopc; | |
float margin = 32; | |
float left = margin; | |
float right; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
color red = 0xffff0000; | |
color yellow = 0xffffff00; | |
float centerX = 256; | |
float centerY = 128; | |
float innerDiam = 32; | |
float outerDiam = 512; | |
size(512, 256); | |
background(255); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
color green = 0x3f00ff00; | |
color red = 0x3fff0000; | |
float centerXStart = 256; | |
float centerYStart = 128; | |
float centerXStop = 128; | |
float centerYStop = 64; | |
float innerDiam = 32; | |
float outerDiam = 512; | |
float detail = 30; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
size(512, 256); | |
loadPixels(); | |
int len = pixels.length; | |
float h = float(height); | |
float w = float(width); | |
float diamonds = TWO_PI * 8; | |
float red; | |
float green; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PImage bkg; | |
color px; | |
float centerX; | |
float centerY; | |
float run; | |
float rise; | |
float distSq; | |
float invDist; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
size(512, 256, P2D); | |
color start = 0xff00ffff; | |
color stop = 0xffff00ff; | |
color clear = 0x00ffff00; | |
float count = 64; | |
float centerX = width * 0.5; | |
float centerY = height * 0.5; | |
float stopRad = max(centerX, centerY) - 2.5; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ColorStop implements Comparable<ColorStop> { | |
float percent; | |
color clr; | |
ColorStop(float prc, float v1, float v2, float v3) { | |
this(prc, color(v1, v2, v3)); | |
} | |
ColorStop(float prc, float v1, float v2, float v3, float al) { | |
this(prc, color(v1, v2, v3, al)); |
OlderNewer