Desktop application for analyzing and visualizing optical surface characteristics. Built with Electron and React.
- Sphere - Simple spherical surfaces
- Even Asphere - Standard aspheric surfaces with even polynomial terms
- Odd Asphere - Aspheric surfaces with odd and even polynomial terms
- Zernike - Zernike Fringe Sag surfaces (FZERNSAG) with up to 37 terms
- Irregular - IRREGULA surface type with coordinate transformations
- Opal Un U - higher order surfaces from OPAL software
- Opal Un Z - higher order surfaces from OPAL software
- Poly - Pure polynomial surfaces
- Sag (z) - Surface height as a function of radial position
- Slope (dz/dr) - First derivative of sag
- Angle - Slope converted to degrees
- Asphericity - Deviation from best-fit sphere
- Aberration of Normals - useful for null lens design (shows deviation from sphere)
- Best Fit Sphere - Optimal fitting sphere radius
- Paraxial F/# - Paraxial focal ratio
- Working F/# - Effective focal ratio based on max slope
- RMS Error - Root Mean Square error (Zernike/Irregular)
- P-V Error - Peak-to-Valley error (Zernike/Irregular)
- 3D Surface Plots - Interactive 3D visualization with rotation and zoom
- 2D Contour Maps - False color heatmaps with customizable colorscales
- Cross-Section Plots - Radial cross-section analysis
- Data Tables - Detailed tabular data export
- Summary View - Comprehensive metrics and analysis
- Zemax ZMX Import - Import surfaces from Zemax optical design files
- Supports STANDARD, EVENASPH, ODDASPHE, IRREGULA, FZERNSAG surface types
- Surface Fitting - native javascript module for curve fitting or legacy Python-based curve fitting with lmfit library
- Fit data points to various surface equations
- Statistical metrics: RMSE, R², AIC, BIC, Chi-square
- Report Generation - Export professional HTML and PDF reports
- Embedded high-resolution plots
- Complete parameter documentation
- Summary metrics and data tables
- Folder Organization - Hierarchical organization for managing multiple surfaces
- Node.js (v16 or higher)
- npm (included with Node.js)
- Python 3.7+ (for surface fitting feature)
npm installpip install -r requirements.txtDevelopment mode (with DevTools):
npm run devProduction mode:
npm startBuild installers for your platform:
npm run buildOutputs will be in the dist/ directory:
- Windows: NSIS installer
- macOS: DMG package
- Linux: AppImage
- Add a Surface: Click "Add Surface" or press
Ctrl+Shift+A - Select Surface Type: Choose from the dropdown menu
- Enter Parameters: Input your surface parameters in the properties panel
- View Results: Switch between visualization tabs (3D, 2D, Cross-Section, Data, Summary)
- Create New:
Ctrl+N- Add a new surface - Remove:
Delete- Remove the selected surface - Switch: Click on surface name in the list
- Organize: Use folders to group related surfaces
- File → Import ZMX File (or
Ctrl+O) - Select your
.zmxfile - Choose which surfaces to import
Generate reports with all calculations and plots:
- HTML Report:
Ctrl+Eor File → Export HTML Report - PDF Report:
Ctrl+Por File → Export PDF Report
Reports include:
- Surface parameters
- Summary metrics (F/#, BFS, RMS/P-V errors)
- High-resolution plots (3D, 2D, cross-section)
- Complete data tables
Access settings via Ctrl+, or View → Settings:
- Plot Colorscale: Choose from 12 color maps (Viridis, Jet, Hot, Cool, etc.)
- Reference Wavelength: Set wavelength for RMS/P-V calculations (default: 632.8 nm)
- Grid Sizes: Customize 3D and 2D plot calculation density
Fit sag data to surface equations (installation of python with lmfit library is required)
- Framework: Electron 28.3.3
- UI Library: React 18.2.0 (without JSX, using
React.createElement) - Visualization: Plotly.js 2.27.0
- Architecture: Multi-process Electron with IPC communication
- Language: Pure JavaScript (ES6 modules, no TypeScript, no transpilation)
- Styling: Inline styles with dark theme color palette
Manual testing checklist and test files:
test_irregular.html- Test suite for Irregular surface calculationstest_precision.js- Precision testing for surface calculationstest_zemax_comparison.js- Zemax comparison tests
- Fork the repository
- Create a feature branch:
git checkout -b feature/my-feature - Make your changes and test thoroughly
- Commit with descriptive messages
- Push to your fork:
git push origin feature/my-feature - Create a Pull Request
MIT License - See LICENSE file for details
For bug reports and feature requests, please create an issue on the project repository.
- Built with Electron and React
- Visualization powered by Plotly.js
- Surface fitting using lmfit library
- Mathematical formulations based on Zemax optical design software conventions