Package org.jwildfire.create.tina.animate

Examples of org.jwildfire.create.tina.animate.FlameMovie


public class RotatingMandelbrotRandomMovieGenerator extends RandomMovieGenerator {

  @Override
  protected FlameMovie prepareMovie(Prefs pPrefs) {
    FlameMovie movie = new FlameMovie(pPrefs);
    Flame flame = genRandomFlame(new MandelbrotRandomFlameGenerator(), pPrefs);
    flame.setCamPerspective(0.1 + 0.2 * Math.random());
    if (Math.random() < 0.5) {
      flame.setCamDOF(0.05 + 0.1 * Math.random());
    }

    FlameMoviePart part = new FlameMoviePart();
    part.setFlame(flame);
    part.setFrameCount(320);
    part.setFrameMorphCount(0);
    movie.addPart(part);
    {
      double amplitude = -0.75 * Math.random() * 1.5;
      movie.getGlobalScripts()[0] = (new GlobalScript(GlobalScriptType.ROTATE_YAW, amplitude));
    }

    {
      double amplitude = -0.25 * Math.random() * 0.5;
      movie.getGlobalScripts()[1] = new GlobalScript(GlobalScriptType.ROTATE_ROLL, amplitude);
    }

    {
      double amplitude = -0.125 * Math.random() * 0.25;
      movie.getGlobalScripts()[2] = new GlobalScript(GlobalScriptType.ROTATE_PITCH, amplitude);
    }

    {
      double amplitude = 0.2 + Math.random() * 0.6;
      movie.getGlobalScripts()[2] = new GlobalScript(GlobalScriptType.MOVE_CAM_Z, amplitude);
    }
    {
      double amplitude = 0.2 + Math.random() * 1.4;
      movie.getGlobalScripts()[2] = new GlobalScript(GlobalScriptType.MOVE_CAM_Y, amplitude);
    }

    return movie;
  }
View Full Code Here


      currThumbnail = null;
      return;
    }
    try {
      if (currFile.exists()) {
        FlameMovie movie = new FlameMovieReader(prefs).readMovie(currFile.getAbsolutePath());
        Flame flame = null;
        if (movie != null) {
          for (FlameMoviePart part : movie.getParts()) {
            if (part.getFlame() != null) {
              flame = part.getFlame();
              break;
            }
          }
View Full Code Here

TOP

Related Classes of org.jwildfire.create.tina.animate.FlameMovie

Copyright © 2018 www.massapicom. 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.