Purpose: This document provides a high-level introduction to SSPlot, describing its purpose, core capabilities, and architectural organization. It serves as an entry point for understanding the system before diving into specific subsystems.
For detailed information about specific areas:
SSPlot is a Java-based plotting utility and numerical simulator designed for visualizing mathematical data, solving differential and difference equations, and studying dynamical systems. The application provides both GUI and CLI interfaces for maximum flexibility.
Core Capabilities:
Sources: io.github.babaissarkar.ssplot.metainfo.xml20-30 README.md1-6
SSPlot is organized into five major subsystems that handle distinct responsibilities:
Sources: src/main/java/com/babai/ssplot/ui/MainFrame.java66-247 src/main/java/com/babai/ssplot/cli/SSPlotCLI.java
SSPlot provides two operational modes controlled by command-line arguments:
| Mode | Entry Point | Primary Use Case | Key Classes |
|---|---|---|---|
| GUI Mode | MainFrame.main() | Interactive plotting and equation solving | MainFrame, SystemInputFrame, PlotView |
| CLI Mode | SSPlotCLI.main() | Batch processing and REPL calculations | SSPlotCLI, NumParse, CLILogger |
The mode selection occurs in src/main/java/com/babai/ssplot/ui/MainFrame.java485-489:
Sources: src/main/java/com/babai/ssplot/ui/MainFrame.java485-510
The GUI is built on a multi-document interface (MDI) architecture with JDesktopPane hosting internal frames:
The application window structure is initialized in src/main/java/com/babai/ssplot/ui/MainFrame.java86-247 Each internal frame serves a specific purpose:
PlotView and toolbar controls for zoom/rotationBufferedImage from PlotterSources: src/main/java/com/babai/ssplot/ui/MainFrame.java86-247 src/main/java/com/babai/ssplot/ui/PlotView.java45-92 src/main/java/com/babai/ssplot/ui/PlotFrame.java27-159 src/main/java/com/babai/ssplot/ui/DataView.java58-200
The mathematical engine transforms equations into numerical data through a multi-stage pipeline:
The pipeline begins when a user clicks a plot button in SystemInputFrame, which:
EquationSystem from input fieldsParser via ParserManagerSolver with the parser and systemrk4Iterate() for ODEs)PlotData with metadataSources: src/main/java/com/babai/ssplot/math/system/EquationSystem.java src/main/java/com/babai/ssplot/math/parser/ParserManager.java src/main/java/com/babai/ssplot/math/methods/Solver.java
The rendering subsystem transforms PlotData into displayable graphics:
Key rendering methods:
PlotType enumThe final BufferedImage is displayed by PlotView via src/main/java/com/babai/ssplot/ui/PlotView.java95-121
Sources: src/main/java/com/babai/ssplot/math/plot/Plotter.java src/main/java/com/babai/ssplot/math/plot/Canvas.java src/main/java/com/babai/ssplot/math/plot/Project2D.java src/main/java/com/babai/ssplot/ui/PlotView.java95-121
The complete data flow from user input to visualization follows this sequence:
| Stage | Component | Input | Output | Key Method |
|---|---|---|---|---|
| Configuration | SystemInputFrame | User equation strings | EquationSystem | build() |
| Parsing | ParserManager | Equation strings | Parser instance | getParser() |
| Computation | Solver | Equations + parameters | double[][] | rk4Iterate() / iterateMap() |
| Wrapping | PlotData constructor | Raw data array | PlotData | new PlotData(data) |
| Rendering | Plotter | PlotData | BufferedImage | plot() |
| Display | PlotView | BufferedImage | Visual output | paint() |
Update callbacks maintain bidirectional synchronization between SystemInputFrame, DataView, and PlotView, as established in src/main/java/com/babai/ssplot/ui/MainFrame.java118-130:
Sources: src/main/java/com/babai/ssplot/ui/MainFrame.java116-130
SSPlot is built using the following core technologies:
| Component | Technology | Purpose |
|---|---|---|
| Language | Java 17+ | Core implementation |
| Build System | Maven | Dependency management and packaging |
| Parser Generator | JavaCC | Mathematical expression parsing |
| UI Framework | Swing | GUI components |
| UI Theme | FlatLaf | Modern look-and-feel |
| Script Engines | JSR-223 (Rhino/Jython) | External expression parsers |
| Packaging | JPackage | Platform-specific installers |
| CI/CD | GitHub Actions | Automated builds |
Distribution formats:
Build configuration is defined in pom.xml and orchestrated by generate_all.sh1-14 for Linux packages.
Sources: README.md8-51 generate_all.sh1-14 pom.xml
The codebase follows a standard Maven project structure:
src/main/java/com/babai/ssplot/
├── cli/ # Command-line interface
├── math/ # Mathematical engine
│ ├── methods/ # Numerical solvers
│ ├── parser/ # Expression parsing
│ ├── plot/ # Plotting and rendering
│ └── system/ # Equation system configuration
├── ui/ # GUI components
│ ├── controls/ # Reactive UI framework
│ └── help/ # Documentation viewer
└── util/ # Utilities (logging, file I/O, system info)
Key files:
Sources: Project directory structure
SSPlot is licensed under LGPL 2.1 or later. The bundled Inter font uses the SIL Open Font License 1.1.
Sources: README.md77-79 io.github.babaissarkar.ssplot.metainfo.xml8-9
Refresh this wiki
This wiki was recently refreshed. Please wait 3 days to refresh again.