use of org.jwildfire.create.tina.randomflame.RandomFlameGeneratorSampler in project JWildfire by thargor6.
the class RandomFlameMutation method execute.
@Override
public void execute(Layer pLayer) {
RandomFlameGenerator randGen = new AllRandomFlameGenerator();
int palettePoints = 3 + Tools.randomInt(68);
boolean fadePaletteColors = Math.random() > 0.33;
boolean uniformWidth = Math.random() > 0.75;
int IMG_WIDTH = 80;
int IMG_HEIGHT = 60;
RandomFlameGeneratorSampler sampler = new RandomFlameGeneratorSampler(IMG_WIDTH, IMG_HEIGHT, Prefs.getPrefs(), randGen, RandomSymmetryGeneratorList.SPARSE, RandomGradientGeneratorList.DEFAULT, palettePoints, fadePaletteColors, uniformWidth, RandomBatchQuality.NORMAL);
RandomFlameGeneratorSample sample = sampler.createSample();
pLayer.assign(sample.getFlame().getFirstLayer());
}
use of org.jwildfire.create.tina.randomflame.RandomFlameGeneratorSampler in project JWildfire by thargor6.
the class RandomMovieGenerator method genRandomFlame.
protected Flame genRandomFlame(RandomFlameGenerator pRandGen, Prefs pPrefs) {
final int IMG_WIDTH = 80;
final int IMG_HEIGHT = 60;
int palettePoints = 3 + Tools.randomInt(68);
boolean fadePaletteColors = Math.random() > 0.33;
boolean uniformWidth = Math.random() > 0.75;
RandomFlameGeneratorSampler sampler = new RandomFlameGeneratorSampler(IMG_WIDTH, IMG_HEIGHT, pPrefs, pRandGen, RandomSymmetryGeneratorList.NONE, RandomGradientGeneratorList.DEFAULT, palettePoints, fadePaletteColors, uniformWidth, RandomBatchQuality.NORMAL);
return sampler.createSample().getFlame();
}
use of org.jwildfire.create.tina.randomflame.RandomFlameGeneratorSampler in project JWildfire by thargor6.
the class DancingFractalsController method genRandomFlames.
public void genRandomFlames() {
try {
final int IMG_WIDTH = 80;
final int IMG_HEIGHT = 60;
int count = (int) ((Double) randomCountIEd.getValue() + 0.5);
for (int i = 0; i < count; i++) {
RandomFlameGenerator randGen = RandomFlameGeneratorList.getRandomFlameGeneratorInstance((String) randomGenCmb.getSelectedItem(), true);
int palettePoints = 3 + Tools.randomInt(68);
boolean fadePaletteColors = Math.random() > 0.33;
boolean uniformSize = Math.random() > 0.75;
RandomFlameGeneratorSampler sampler = new RandomFlameGeneratorSampler(IMG_WIDTH, IMG_HEIGHT, prefs, randGen, RandomSymmetryGeneratorList.NONE, RandomGradientGeneratorList.DEFAULT, palettePoints, fadePaletteColors, uniformSize, RandomBatchQuality.NORMAL);
project.getFlames().add(validateDancingFlame(sampler.createSample().getFlame()));
}
refreshProjectFlames();
enableControls();
} catch (Throwable ex) {
errorHandler.handleError(ex);
}
}
use of org.jwildfire.create.tina.randomflame.RandomFlameGeneratorSampler in project JWildfire by thargor6.
the class TinaController method getCurrFlame.
@Override
public Flame getCurrFlame(boolean autoGenerateIfEmpty) {
if (_currFlame == null) {
final int IMG_WIDTH = 80;
final int IMG_HEIGHT = 60;
RandomFlameGenerator randGen = new AllRandomFlameGenerator();
int palettePoints = 3 + Tools.randomInt(21);
boolean fadePaletteColors = Math.random() > 0.09;
boolean uniformWidth = Math.random() > 0.75;
RandomFlameGeneratorSampler sampler = new RandomFlameGeneratorSampler(IMG_WIDTH, IMG_HEIGHT, prefs, randGen, RandomSymmetryGeneratorList.SPARSE, RandomGradientGeneratorList.DEFAULT, palettePoints, fadePaletteColors, uniformWidth, RandomBatchQuality.LOW);
Flame flame = sampler.createSample().getFlame();
setCurrFlame(flame);
}
return _currFlame;
}
use of org.jwildfire.create.tina.randomflame.RandomFlameGeneratorSampler in project JWildfire by thargor6.
the class JWildfireApplet method genRandomFlame.
public void genRandomFlame(RandomBatchQuality pQuality) {
final int IMG_WIDTH = 80;
final int IMG_HEIGHT = 60;
RandomFlameGenerator randGen = new AllRandomFlameGenerator();
int palettePoints = 3 + Tools.randomInt(21);
boolean fadePaletteColors = Math.random() > 0.09;
boolean uniformSize = Math.random() > 0.75;
RandomFlameGeneratorSampler sampler = new RandomFlameGeneratorSampler(IMG_WIDTH, IMG_HEIGHT, prefs, randGen, RandomSymmetryGeneratorList.SPARSE, RandomGradientGeneratorList.DEFAULT, palettePoints, fadePaletteColors, uniformSize, pQuality);
currFlame = sampler.createSample().getFlame();
}
Aggregations