Topic 3 – Implementing the Beer-Lambert Law on GPU using OpenGL

IBSim-4i 2020

Dr Franck P. Vidal

13th Aug 2020

Path Length: Naive Approach

Is finding intersections in the right order important?

  1. Detect every intersection between a ray and the objects;
  2. Sort intersection (Can be handled by GPUs using depth-peeling, a multi-pass rendering technique for semi-transparent polygonal objects without sorting polygons);
  3. Compute path length.

Path Length: L-Buffer

Finding intersections in any order does not matter

Intersection sorting is actually not needed!

L-Buffer Implementation

Lpi - sng(V · Ni) x di

See http://dx.doi.org/10.2312/LocalChapterEvents/TPCG/TPCG09/025-032 for more details.

Multipass Rendering Pipeline

pixel = E x Nout

pixel = E x Nin(E) e(i μi Lp(i))

OpenGL pipeline to compute the Beer-Lambert law (monochromatic case).

Adding the Beam Spectrum

Simulation parameters

Polychromatic beam spectrum for 90kV X-ray tube peak voltage

Intensity profiles, see dash line in image above

Simulation with Different Source Shapes

Parallel beam Infinitely small point source 13mm source

Final Simulation Flowchart

Final OpenGL pipeline

Back to main menu

Click here