Skip to content

Instantly share code, notes, and snippets.

@grkvlt
Created October 15, 2017 20:07
Show Gist options
  • Save grkvlt/2be3efeec22737a91910d91d29ced7d8 to your computer and use it in GitHub Desktop.
Save grkvlt/2be3efeec22737a91910d91d29ced7d8 to your computer and use it in GitHub Desktop.
Exploring Iterated Function Systems
// Paint pixels unless using density rendering
if (!render.isDensity()) {
// Apply controller gamma correction
Color.RGBtoHSB(color.getRed(), color.getGreen(), color.getBlue(), hsb);
g.setPaint(alpha(Color.HSBtoRGB(hsb[0],
unity().apply(hsb[1] * vibrancy).floatValue() * vibrancyLimit,
unity().apply(Math.pow(hsb[2], config.getGamma()) * vibrancy).floatValue() * vibrancyLimit),
octet().apply((int) (color.getAlpha() * vibrancy))));
rect.setLocation(x, y);
g.fill(rect);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment