Package org.jwildfire.create.tina.base

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


          varFunc = VariationFuncList.getVariationFuncInstance("spherical3D_wf", true);
          if (Math.random() < 0.5) {
            varFunc.setParameter("invert", 1);
          }
      }
      xForm.addVariation(0.25 + Math.random() * 0.75, varFunc);

      XFormTransformService.rotate(xForm, 45.0, false);
      XFormTransformService.globalTranslate(xForm, 0.0, 0.25, false);
      XFormTransformService.globalTranslate(xForm, 0.0, -0.25, true);
      xForm.setColor(1.0);
View Full Code Here


        varFunc.setParameter("offsety", -(ymax - ymin) * 0.5);
        varFunc.setParameter("scale", 2.0 * scale);

      }
      varFunc.setParameter("scalez", 1.0 + Math.random() * 10.0);
      xForm.addVariation(1.0, varFunc);
    }
    // final
    if (Math.random() < 0.75) {
      XForm xForm = new XForm();
      layer.getFinalXForms().add(xForm);
View Full Code Here

    // final
    if (Math.random() < 0.75) {
      XForm xForm = new XForm();
      layer.getFinalXForms().add(xForm);
      varFunc = VariationFuncList.getVariationFuncInstance(FNCLST_FINAL[(int) (Math.random() * FNCLST_FINAL.length)], true);
      xForm.addVariation(1.0, varFunc);
    }
    flame.getFirstLayer().randomizeColors();
    return flame;
  }

View Full Code Here

      int idx = Math.random() > 0.5 ? 2 : (int) (-20 + Math.random() * 40);
      if (idx == 0 || idx == 1) {
        idx = 2;
      }
      varFunc.setParameter("power", (double) idx);
      xForm.addVariation(1.0, varFunc);
      xForm.setColor(0.0);
      xForm.setColorSymmetry(0.0);
      XFormTransformService.globalTranslate(xForm, -1.0 + 2.0 * Math.random(), -3.0 + 6.0 * Math.random(), false);
      XFormTransformService.globalTranslate(xForm, -0.1 + 0.2 * Math.random(), -0.1 + 0.2 * Math.random(), true);
      XFormTransformService.rotate(xForm, -20.0 + Math.random() * 40.0, false);
View Full Code Here

    Layer layer = flame.getFirstLayer();

    XForm xForm = new XForm();
    layer.getFinalXForms().add(xForm);
    xForm.addVariation(0.25 + Math.random() * 0.25, VariationFuncList.getVariationFuncInstance("linear3D", true));
    VariationFunc post_dcztransl = VariationFuncList.getVariationFuncInstance(PostDCZTranslFunc.VARNAME, true);
    xForm.addVariation(0.75 + Math.random() * 0.25, post_dcztransl);
    double factor = 0.5 + Math.random() * 2.0;
    if (Math.random() < 0.42) {
      factor = 0.0 - factor;
View Full Code Here

    XForm xForm = new XForm();
    layer.getFinalXForms().add(xForm);
    xForm.addVariation(0.25 + Math.random() * 0.25, VariationFuncList.getVariationFuncInstance("linear3D", true));
    VariationFunc post_dcztransl = VariationFuncList.getVariationFuncInstance(PostDCZTranslFunc.VARNAME, true);
    xForm.addVariation(0.75 + Math.random() * 0.25, post_dcztransl);
    double factor = 0.5 + Math.random() * 2.0;
    if (Math.random() < 0.42) {
      factor = 0.0 - factor;
    }
    post_dcztransl.setParameter("factor", factor);
View Full Code Here

        }
        XFormTransformService.localTranslate(xForm, -1.0 + 2.0 * Math.random(), -1.0 + 2.0 * Math.random(), true);
        scl *= 0.75 + Math.random() / 4;
        XFormTransformService.scale(xForm, scl, true, true, true);
        int fncIdx = (int) (Math.random() * fnc.length);
        xForm.addVariation(Math.random() * 0.9 + 0.1, VariationFuncList.getVariationFuncInstance(Math.random() > 0.25 ? fnc[fncIdx] : "linear3D", true));
        xForm.setColor(Math.random());
      }
    }
    return flame;
  }
View Full Code Here

    // 1st xForm
    {
      XForm xForm = new XForm();
      layer.getXForms().add(xForm);
      xForm.setWeight(0.5 + Math.random());
      xForm.addVariation(1.5 + Math.random(), VariationFuncList.getVariationFuncInstance(Math.random() < 0.12 ? VariationFuncList.getRandomVariationname() : "spherical", true));
      xForm.setColorSymmetry(-0.5);

      XFormTransformService.localTranslate(xForm, 0.75 - 5.50 * Math.random(), 0.75 - 1.50 * Math.random(), false);
      XFormTransformService.rotate(xForm, -60.0 + Math.random() * 30.0, false);
      XFormTransformService.scale(xForm, 0.1 + Math.random() * 0.4, true, true, false);
View Full Code Here

      xForm.setWeight(1.0 + Math.random() * 100.0);

      VariationFunc varFunc = VariationFuncList.getVariationFuncInstance(Math.random() < 0.8 ? "juliascope" : "julian", true);
      varFunc.setParameter("power", Math.random() < 0.8 ? 2 : 2 + Math.random() * 10.0);
      varFunc.setParameter("dist", Math.random() < 0.8 ? 1.0 : -2.0 + 4.0 * Math.random());
      xForm.addVariation(0.5 + Math.random(), varFunc);
      xForm.setColorSymmetry(0.5);

      XFormTransformService.rotate(xForm, Math.random() * 360.0, false);
      XFormTransformService.localTranslate(xForm, 1.75 - 3.50 * Math.random(), 0.75 - 5.50 * Math.random(), false);
      XFormTransformService.scale(xForm, 1.1 + Math.random() * 2.0, true, true, false);
View Full Code Here

    if (Math.random() > 0.667) {
      XForm xForm = new XForm();
      layer.getXForms().add(xForm);
      xForm.setWeight(1.0 + Math.random() * 100.0);
      VariationFunc varFunc = VariationFuncList.getVariationFuncInstance(VariationFuncList.getRandomVariationname(), true);
      xForm.addVariation(0.25 + 1.25 * Math.random(), varFunc);

      XFormTransformService.rotate(xForm, -12.0 + Math.random() * 24.0, true);
      XFormTransformService.localTranslate(xForm, -0.125 + Math.random() * 0.25, -0.125 + Math.random() * 0.25, true);
      XFormTransformService.scale(xForm, 0.9 + Math.random() * 0.2, true, true, true);

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.