mctrace is an experimental visualization tool built with code generated by the mcparse project. (See the mcparse README for further details.)
The mctrace project demonstrates how to build high-level functionality directly while including the low-level C simulation code, making "simulation intrinsics" available at the tool level. It utilizes the mcstas components and simulation core without relying on current tooling.
The project's main purposes are:
- Provide a first-order validation of the parsing and code generatation provided by mcparse
- Wrap the physics components in a generic and visualization-friendly header
- Provides component initialization using 4x4 affine transformation matrices
- Wrap the entire McStas static simulation library into easily-inlcuded header-only files; simcore.h and simlib.h
- Enabling a tight development loop with a very low turn-around time for core- or component development, including direct component code debugging
- Greatly reduced dependencies
The visualization is written on top of a thin platform layer (glew/glfw/OpenGL), which makes it very portable.
Run the getdeps.sh and build.sh scripts to install dependencies (glew/glfw) and build.
Build from source with w64devkit (https://github.com/skeeto/w64devkit/releases): Run build_win.sh.
Run included binaries: The binary is found in the release folder. The executable is not signed, so Windows Defender will pop up a blue window. Click "Run Anyway" to start the app.
The mctrace and mcparse projects are a tech demo. For the official McCode simulation project for neutron- and x-ray scattering instrumentation, see mccode.org.