Package org.jwildfire.create.tina.base

Examples of org.jwildfire.create.tina.base.XForm.addVariation()


        checks.setParameter("x", 3.0);
        checks.setParameter("y", 3.0);
        xForm.addVariation(0.01 + Math.random() * 0.04, checks);
      }
      else {
        xForm.addVariation(0.1 + Math.random() * 0.5, VariationFuncList.getVariationFuncInstance("bubble", true));
      }
      xForm.addVariation(4 + Math.random() * 2, VariationFuncList.getVariationFuncInstance("pre_blur", true));
      xForm.setColorSymmetry(-0.5);
      XFormTransformService.scale(xForm, 1.1 + Math.random() * 1.9, true, true, false);
      XFormTransformService.localTranslate(xForm, 0.75 - 1.50 * Math.random(), 0.75 - 1.50 * Math.random(), false);
View Full Code Here


        xForm.addVariation(0.01 + Math.random() * 0.04, checks);
      }
      else {
        xForm.addVariation(0.1 + Math.random() * 0.5, VariationFuncList.getVariationFuncInstance("bubble", true));
      }
      xForm.addVariation(4 + Math.random() * 2, VariationFuncList.getVariationFuncInstance("pre_blur", true));
      xForm.setColorSymmetry(-0.5);
      XFormTransformService.scale(xForm, 1.1 + Math.random() * 1.9, true, true, false);
      XFormTransformService.localTranslate(xForm, 0.75 - 1.50 * Math.random(), 0.75 - 1.50 * Math.random(), false);
      XFormTransformService.rotate(xForm, 30 - Math.random() * 60.0, false);
    }
View Full Code Here

        fName = ExperimentalSimpleRandomFlameGenerator.FNCLST_EXPERIMENTAL[(int) (Math.random() * fncCount)];
      }
      else {
        fName = Math.random() > 0.5 ? "linear3D" : "noise";
      }
      xForm.addVariation(0.5, VariationFuncList.getVariationFuncInstance(fName, true));
      xForm.setColorSymmetry(-0.5);
      XFormTransformService.rotate(xForm, 30.0 - Math.random() * 60.0, false);
      if (Math.random() < 0.5) {
        XFormTransformService.scale(xForm, 0.5 + Math.random() * 1.5, true, true, false);
      }
View Full Code Here

        fName = Math.random() > 0.75 ? VariationFuncList.getRandomVariationname() : ExperimentalSimpleRandomFlameGenerator.FNCLST_EXPERIMENTAL[(int) (Math.random() * fncCount)];
      }
      else {
        fName = Math.random() > 0.5 ? "linear3D" : "gaussian_blur";
      }
      xForm.addVariation(0.5, VariationFuncList.getVariationFuncInstance(fName, true));
      xForm.setColorSymmetry(-0.5);
      XFormTransformService.rotate(xForm, 30.0 - Math.random() * 60.0, false);
      if (Math.random() < 0.5) {
        XFormTransformService.scale(xForm, 0.15 + Math.random() * 1.25, true, true, false);
      }
View Full Code Here

      xForm.setWeight(1.0);
      xForm.setColor(0.0);
      xForm.setColorSymmetry(-1.0);

      VariationFunc synth = VariationFuncList.getVariationFuncInstance("synth");
      xForm.addVariation(1.0, synth);
      synth.setParameter("mode", (int) (20 * Math.random())); //3;
      synth.setParameter("power", -0.2);

      int numWaves = (int) (Math.random() * 3.5 + 2);
      // Starting circle . . .
View Full Code Here

      synth.setParameter("power", centre_power);
      synth.setParameter("mode", centre_mode);
      synth.setParameter("smooth", centre_smooth);

      VariationFunc noise = VariationFuncList.getVariationFuncInstance("noise");
      xForm.addVariation(centre_noise, noise);

    }

    if (Math.random() < 0.55) {
      XForm xForm = new XForm();
View Full Code Here

      xForm.setWeight(5 * Math.random() + 0.125);
      xForm.setColor(centre_color + 0.2 * Math.random());
      xForm.setColorSymmetry(centre_symmetry - 0.4 * Math.random());

      VariationFunc varFunc = VariationFuncList.getVariationFuncInstance(VariationFuncList.getRandomVariationname());
      xForm.addVariation(0.25 + Math.random() * 1.5, varFunc);

      xForm.getModifiedWeights()[1] = 0.0;
    }

    return flame;
View Full Code Here

          if (varStr == null || varStr.length() == 0) {
            varStr = "0";
          }
          var.setFunc(VariationFuncList.getVariationFuncInstance(fName));
          var.setAmount(Tools.stringToDouble(varStr));
          xForm.addVariation(var);
        }
        refreshParamCmb(data.TinaNonlinearControlsRows[pIdx], xForm, var);
        refreshXFormUI(xForm);
        //        String selected = (String) TinaNonlinearControlsRows[pIdx].getNonlinearParamsCmb().getSelectedItem();
        //        boolean enabled = selected != null && selected.length() > 0;
View Full Code Here

        if (crackle == null) {
          XForm xform = new XForm();
          xform.setWeight(0.5);
          layer.getXForms().add(xform);
          crackle = xform.addVariation(1.0, VariationFuncList.getVariationFuncInstance(CrackleFunc.VAR_NAME));
          crackle.getFunc().setParameter(CrackleFunc.PARAM_SCALE, 0.0);
        }

        crackle.setAmount(1.0 + Math.random() * 2.0);
        crackle.getFunc().setParameter(CrackleFunc.PARAM_DISTORT, 1.5 + Math.random() * 1.5);
 
View Full Code Here

      varFunc = VariationFuncList.getVariationFuncInstance("spherical3D_wf", true);
      if (invert) {
        varFunc.setParameter("invert", 1);
      }
      xForm.addVariation(1.0, varFunc);
      XFormTransformService.rotate(xForm, Math.random() < 0.5 ? 90.0 : -90.0, false);
      XFormTransformService.globalTranslate(xForm, 1.0, 0.0, false);

      xForm.setColor(1.0);
      xForm.setColorSymmetry(0.9 + Math.random() * 0.1);
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.