Package danirod.fractal

Examples of danirod.fractal.Fractal


public class FractalAWT
{
    public static void main(String args[])
    {
        Fractal fractal = new Fractal();
        Random rnd = new Random();
        long seed = rnd.nextLong();
        fractal.init(seed, 0, 0);
        for(int i = 0; i < 8; i++)
            fractal.iterate();
       
        FractalFrame ff = new FractalFrame(fractal);
        ff.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
        ff.setVisible(true);
    }
View Full Code Here


   */
  private long seed;
 
  public FractalGame(String title) {
    super(title);
    this.f = new Fractal();
    rnd = new Random();
    seed = rnd.nextLong();
    itcount = 8; // initially we set to 8, it's a nice value.
  }
View Full Code Here

  }

  @Override
  public void update(GameContainer gc, int delta) throws SlickException {
    if(gc.getInput().isKeyPressed(Input.KEY_R)) { // R: RESET
      f = new Fractal();
      gc.reinit();
    } else if(gc.getInput().isKeyPressed(Input.KEY_S)) { // S: RESEED
      seed = rnd.nextLong();
      gc.reinit();
    } else if(gc.getInput().isKeyPressed(Input.KEY_UP)) { // UP: T++
View Full Code Here

TOP

Related Classes of danirod.fractal.Fractal

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.