MDI

A Java framework for building interactive desktop applications for scientific visualization, simulation, and related technical work — and the companion site for the Apress book that teaches it.

Scientific Visualization & Simulation in Java with MDI · David Heddle · Apress · expected Q1 2027 · more about the book →

Scientific Visualization & Simulation in Java with MDI — book cover

MDI (pronounced “midi”) organizes an application around independent views hosted in a common desktop: drawings, plots, maps, simulations, optimization problems, three-dimensional scenes, images, and application-specific scientific content. The framework supplies the recurring infrastructure — application and view management, menus and toolbars, drawable items, coordinate systems, plotting, mapping, simulation control, background execution, optimization support, and 3D visualization — so the application developer can focus on the science.

About this site. This page collects the source code, API documentation, and errata for the book’s example projects. The book itself is published separately by Apress; this site is not a substitute for it.

The Projects

Five repositories accompany the book. Each is a runnable, standalone Maven project.

Core · Ch. 1–9

mdi

The core framework: application and desktop management, views, drawable items, toolbars and rubberbanding, the sPlot plotting package, 2D mapping, and the simulation and optimization engines.

Extension · Ch. 10

mdi-3D

A JOGL-based 3D extension. 3D views coexist with ordinary MDI views in the same application and reuse the framework’s application, simulation, and image-export infrastructure.

Companion · Ch. 7

mdi-radar

A standalone radar/map demonstration: radar preset tools, map-native radar items, ETOPO5 terrain shading, and terrain-aware line-of-sight visualization, built on the mapping chapter’s architecture.

Simulation example · Ch. 8

mdi-nbody

An interactive two-dimensional gravitational simulation demonstrating MDI’s simulation lifecycle, editable scientific items, immutable snapshots, linked diagnostics, and custom initial conditions.

Capstone · Ch. 11

mdi-ml-classifier

The book’s closing application: an image-classification tool covering external model inference, background execution, cancellation of stale work, and model comparison, built entirely on the framework introduced in earlier chapters.

How the Book Is Organized

Foundations
Ch. 1 The MDI Architecture · Ch. 2 Creating the Application · Ch. 3 Creating Views · Ch. 4 Items
Two-Dimensional Visualization
Ch. 5 Toolbars and Rubberbanding · Ch. 6 Plotting (sPlot) · Ch. 7 Mapping
Computation
Ch. 8 Simulation · Ch. 9 Optimization
Extensions & Capstone
Ch. 10 MDI-3D · Ch. 11 Machine-Learning Image Classification

Get Started

Each project builds with Maven and requires Java 17 or later. Clone a repository and run its demo application, e.g.:

git clone https://github.com/heddle/mdi.git
cd mdi
mvn install
mvn exec:java -Dexec.mainClass=edu.cnu.mdi.app.DemoApp

See each project’s page for its specific entry point and dependencies.