public void animate() {

    ColorPalette ising = new ColorPalette();
    ising.setColor(1, Color.BLACK);
    ising.setColor(-1, Color.WHITE);
    ising.setColor(0, Color.RED);

    grid1.setColors(ising);
    grid2.setColors(ising);
    grid1.registerData(L1, L2, isingspin);
    grid2.registerData(L1, L2, isingcopy);
  }
  public void animate() {
    ColorPalette ising = new ColorPalette();
    ising.setColor(1, Color.BLACK); // up spin
    ising.setColor(-1, Color.WHITE); // down spin
    ising.setColor(0, Color.RED); // normal dilution
    ising.setColor(2, Color.BLUE); // clusters
    ising.setColor(-2, Color.GREEN); //
    ising.setColor(3, Color.darkGray); // the centers of the clusters

    grid1.setColors(ising);
    grid1.registerData(IS.L1, IS.L2, IS.spin);
    grid2.setColors(ising);
    grid2.registerData(Istemp.L1, Istemp.L2, Istemp.spin);
  }
Beispiel #3
0
  public void animate() {
    ColorPalette ising = new ColorPalette();
    ising.setColor(1, Color.BLACK);
    ising.setColor(-1, Color.WHITE);
    ising.setColor(0, Color.RED);
    ising.setColor(2, Color.BLUE);
    ising.setColor(-2, Color.GREEN);

    // ColorGradient heatmap = new ColorGradient();

    grid1.setColors(ising);
    grid1.registerData(IBaf.IS.L1, IBaf.IS.L2, IBaf.IS.spin);
    // grid2.setColors(ising);
    // grid2.registerData(IBaf.IS.L1, IBaf.IS.L2, IBaf.IS.biaslabel);

  }
Beispiel #4
0
  public void movie(Grid grid, int number, int copynumber) // function to capture the grid
      {

    String SaveAs =
        "/Users/liukang2002507/Desktop/simulation/AFnucleation/pic_"
            + fmt.format(copynumber)
            + "_"
            + fmt.format(number)
            + ".png";
    try {
      ImageIO.write(grid.getImage(), "png", new File(SaveAs));
    } catch (IOException e) {
      System.err.println("Error in Writing File" + SaveAs);
    }
  }
Beispiel #5
0
  public void clear() {
    grid1.clear();
    // grid2.clear();

  }