//DEPS org.openjfx:javafx-graphics:11.0.2:${os.detected.jfxname} import javafx.animation.*; import javafx.application.*; import javafx.scene.*; import javafx.scene.layout.*; import javafx.scene.paint.*; import javafx.scene.shape.*; import javafx.stage.*; import javafx.util.*; public class CircleSpinnyThingies extends Application { Pane pane = new Pane(); Transition master; int numCircles = 100; int width = 1800; int height = 1000; int bigSize = 20; int smallSize = 6; int offset = 5; @Override public void start(Stage stage) throws Exception { for (int outer = 0; outer <= numCircles; outer++) { for (int i = 0; i <= numCircles; i++) { Circle big = new Circle(bigSize); big.setFill(null); big.setStroke(Color.BLACK); big.setOpacity(0.0); Circle small = new Circle(smallSize, Color.BLACK); int bigX = i * (bigSize + offset); int bigY = outer * (bigSize + offset); int smallX = bigX; int smallY = bigY - bigSize; big.setCenterX(bigX); big.setCenterY(bigY); small.setCenterX(smallX); small.setCenterY(smallY); PathTransition pt = new PathTransition(Duration.millis(3500), big); pt.setNode(small); pt.setInterpolator(Interpolator.LINEAR); pt.setOrientation(PathTransition.OrientationType.ORTHOGONAL_TO_TANGENT); pt.setCycleCount(Timeline.INDEFINITE); pt.setDelay(Duration.millis((50 * i) + (50 * outer))); pt.play(); // Start animation pane.getChildren().addAll(big, small); } } Scene scene = new Scene(pane, width, height); stage.setScene(scene); stage.setMaximized(true); stage.setTitle("Circle Spinny Thingie"); stage.show(); } public static void main(String[] args) { launch(args); } }