repositories
/
SugarCubes.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sinesphere cool
[SugarCubes.git]
/
ArjunBanker.pde
diff --git
a/ArjunBanker.pde
b/ArjunBanker.pde
index 6af635a6286bcb7b755606dbd36ada5176dd00ba..c8fe1a616b5c701d798231d13e4c9047b2836f11 100644
(file)
--- a/
ArjunBanker.pde
+++ b/
ArjunBanker.pde
@@
-16,7
+16,7
@@
class TelevisionStatic extends SCPattern {
void run(double deltaMs) {
boolean d = direction.getValuef() > 5.0;
for (Point p : model.points) {
void run(double deltaMs) {
boolean d = direction.getValuef() > 5.0;
for (Point p : model.points) {
- colors[p.index] =
color
((lx.getBaseHuef() + random(hueParameter.getValuef() * 360))%360, random(saturationParameter.getValuef() * 100), random(brightParameter.getValuef() * 100));
+ colors[p.index] =
lx.hsb
((lx.getBaseHuef() + random(hueParameter.getValuef() * 360))%360, random(saturationParameter.getValuef() * 100), random(brightParameter.getValuef() * 100));
}
}
}
}
}
}
@@
-40,7
+40,7
@@
class AbstractPainting extends SCPattern {
void run(double deltaMs) {
for (Point p : model.points) {
color c = img.get((int)((p.x / model.xMax) * img.width), img.height - (int)((p.y / model.yMax) * img.height));
void run(double deltaMs) {
for (Point p : model.points) {
color c = img.get((int)((p.x / model.xMax) * img.width), img.height - (int)((p.y / model.yMax) * img.height));
- colors[p.index] =
color(hue(c) + colorMod.getValuef()%360, saturation(c), brightness(c) - ((p.fz - brightMod.getValuef())/p.f
z));
+ colors[p.index] =
lx.hsb(hue(c) + colorMod.getValuef()%360, saturation(c), brightness(c) - ((p.z - brightMod.getValuef())/p.
z));
}
}
}
}
}
}
@@
-56,7
+56,7
@@
class Spirality extends SCPattern {
super(glucose);
addParameter(r);
for (Point p : model.points) {
super(glucose);
addParameter(r);
for (Point p : model.points) {
- colors[p.index] =
color
(0, 0, 0);
+ colors[p.index] =
lx.hsb
(0, 0, 0);
}
}
}
}
@@
-66,16
+66,16
@@
class Spirality extends SCPattern {
float x = model.xMax / 2 + cos(angle) * rad;
float y = model.yMax / 2 + sin(angle) * rad;
for (Point p : model.points) {
float x = model.xMax / 2 + cos(angle) * rad;
float y = model.yMax / 2 + sin(angle) * rad;
for (Point p : model.points) {
- float b = dist(x,y,p.
fx,p.f
y);
+ float b = dist(x,y,p.
x,p.
y);
if (b < 90) {
colors[p.index] = blendColor(
colors[p.index],
if (b < 90) {
colors[p.index] = blendColor(
colors[p.index],
-
color
(lx.getBaseHuef() + 25, 10, map(b, 0, 10, 100, 0)),
+
lx.hsb
(lx.getBaseHuef() + 25, 10, map(b, 0, 10, 100, 0)),
ADD);
} else {
colors[p.index] = blendColor(
colors[p.index],
ADD);
} else {
colors[p.index] = blendColor(
colors[p.index],
-
color
(25, 10, map(b, 0, 10, 0, 15)),
+
lx.hsb
(25, 10, map(b, 0, 10, 0, 15)),
SUBTRACT);
}
}
SUBTRACT);
}
}