Module simpa.acc

Class ParaViewPlotter

java.lang.Object
simpa.acc.api.utils.ParaViewPlotter

public class ParaViewPlotter extends Object
Class for generating ParaView state files for visualizing point sources in a sequence.
  • Constructor Details

    • ParaViewPlotter

      public ParaViewPlotter()
  • Method Details

    • plotTrajectory

      public static void plotTrajectory(String file) throws IOException
      Throws:
      IOException
    • plotSequence

      public static void plotSequence(Sequence sequence) throws IOException
      Generates a ParaView Python state file for the given sequence. Creates CSV files for each element's point sources in /tmp/ and outputs the state file to the specified path.
      Parameters:
      sequence - the sequence containing elements with point sources
      Throws:
      IOException - if an I/O error occurs
    • plotSurfacePoints

      public static void plotSurfacePoints(String elementName) throws IOException
      Throws:
      IOException
    • plotPoints

      public static void plotPoints(List<org.apache.commons.math3.geometry.euclidean.threed.Vector3D> points, String title, double[] color, double pointSize) throws IOException
      General helper that creates a ParaView python script for a single list of points, writes it to /tmp, and launches ParaView with the script.
      Parameters:
      points - list of points to plot (must be non-empty)
      title - used for temporary filenames and python variable names
      color - RGB triplet (0..1)
      pointSize - point size for visualization
      Throws:
      IOException - on write errors