Added the mandelbrot calculator

This commit is contained in:
nora 2020-11-17 19:48:01 +01:00
parent 2234919b69
commit 64dc682257
7 changed files with 360 additions and 6 deletions

30
src/ui/Controller.java Normal file
View file

@ -0,0 +1,30 @@
package ui;
import javafx.event.ActionEvent;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import mandelbrotCalculator.MandelbrotSet;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
public class Controller {
public ImageView setPreview;
int currentFrame;
public void showImage(ActionEvent actionEvent) throws FileNotFoundException {
InputStream stream = new FileInputStream("C:\\Users\\nilsh\\IdeaProjects\\testStuff\\sequence/Sequence" + currentFrame + ".png");
Image image = new Image(stream);
setPreview.setImage(image);
currentFrame++;
}
public void startCalculation(ActionEvent actionEvent) {
MandelbrotSet m = new MandelbrotSet(2, 1, 3, 1);
m.startMandelbrot();
}
}