import java.awt.*; import java.awt.image.*; // 1D Lagrangian hydro; perfect gas, shockwave, no Q. // Should be symmetrical! class Main { static final int ms = 20; static final double dt = .003, dur = 12; static final boolean se = true; static class zone{double x, v, T;} static final int X = 800, Y = 700; // m[j].T is the temperature of the material zone between m[j].x and m[j+1].x // Each zone has mass 1; pv=NRt static zone[] m = new zone[ms+1]; static double co = se?0:ms/2; static BufferedImage I = new BufferedImage(X, Y, BufferedImage.TYPE_INT_RGB); static WritableRaster wr = I.getRaster(); static int[] mk = new int[] {255, 255, 255}; static {for(int j = 0; j