riley-raster 2026.5.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. riley_raster-2026.5.0/LICENSE +21 -0
  2. riley_raster-2026.5.0/MANIFEST.in +20 -0
  3. riley_raster-2026.5.0/PKG-INFO +124 -0
  4. riley_raster-2026.5.0/README.md +110 -0
  5. riley_raster-2026.5.0/pyproject.toml +24 -0
  6. riley_raster-2026.5.0/setup.cfg +4 -0
  7. riley_raster-2026.5.0/setup.py +365 -0
  8. riley_raster-2026.5.0/src/riley/__init__.py +69 -0
  9. riley_raster-2026.5.0/src/riley/cyth/__init__.py +9 -0
  10. riley_raster-2026.5.0/src/riley/cyth/riley.c +46583 -0
  11. riley_raster-2026.5.0/src/riley/cyth/riley.h +248 -0
  12. riley_raster-2026.5.0/src/riley/cyth/riley.pxd +239 -0
  13. riley_raster-2026.5.0/src/riley/cyth/riley.py +1002 -0
  14. riley_raster-2026.5.0/src/riley/zig/__init__.py +9 -0
  15. riley_raster-2026.5.0/src/riley/zig/buildconfig.zig +128 -0
  16. riley_raster-2026.5.0/src/riley/zig/c-riley.zig +1757 -0
  17. riley_raster-2026.5.0/src/riley/zig/camera.zig +1822 -0
  18. riley_raster-2026.5.0/src/riley/zig/camera_common.zig +44 -0
  19. riley_raster-2026.5.0/src/riley/zig/camera_scalar.zig +192 -0
  20. riley_raster-2026.5.0/src/riley/zig/camera_simd.zig +488 -0
  21. riley_raster-2026.5.0/src/riley/zig/clibtiff.zig +82 -0
  22. riley_raster-2026.5.0/src/riley/zig/csvio.zig +217 -0
  23. riley_raster-2026.5.0/src/riley/zig/geometrykernels.zig +1136 -0
  24. riley_raster-2026.5.0/src/riley/zig/hull.zig +23 -0
  25. riley_raster-2026.5.0/src/riley/zig/hull_common.zig +242 -0
  26. riley_raster-2026.5.0/src/riley/zig/hull_scalar.zig +127 -0
  27. riley_raster-2026.5.0/src/riley/zig/hull_simd.zig +221 -0
  28. riley_raster-2026.5.0/src/riley/zig/imageio.zig +1300 -0
  29. riley_raster-2026.5.0/src/riley/zig/imageops.zig +192 -0
  30. riley_raster-2026.5.0/src/riley/zig/matslice.zig +600 -0
  31. riley_raster-2026.5.0/src/riley/zig/matstack.zig +791 -0
  32. riley_raster-2026.5.0/src/riley/zig/meshio.zig +475 -0
  33. riley_raster-2026.5.0/src/riley/zig/meshops.zig +1382 -0
  34. riley_raster-2026.5.0/src/riley/zig/ndarray.zig +388 -0
  35. riley_raster-2026.5.0/src/riley/zig/newton.zig +514 -0
  36. riley_raster-2026.5.0/src/riley/zig/normals.zig +523 -0
  37. riley_raster-2026.5.0/src/riley/zig/parachunkexec.zig +379 -0
  38. riley_raster-2026.5.0/src/riley/zig/rasterconfig.zig +156 -0
  39. riley_raster-2026.5.0/src/riley/zig/rasterengine.zig +20 -0
  40. riley_raster-2026.5.0/src/riley/zig/rasterengine_common.zig +1063 -0
  41. riley_raster-2026.5.0/src/riley/zig/rasterengine_scalar.zig +511 -0
  42. riley_raster-2026.5.0/src/riley/zig/rasterengine_simd.zig +1124 -0
  43. riley_raster-2026.5.0/src/riley/zig/rasterops.zig +1380 -0
  44. riley_raster-2026.5.0/src/riley/zig/report.zig +1368 -0
  45. riley_raster-2026.5.0/src/riley/zig/riley.zig +1905 -0
  46. riley_raster-2026.5.0/src/riley/zig/rotation.zig +102 -0
  47. riley_raster-2026.5.0/src/riley/zig/scalingpolicy.zig +257 -0
  48. riley_raster-2026.5.0/src/riley/zig/shaderkernels.zig +17 -0
  49. riley_raster-2026.5.0/src/riley/zig/shaderkernels_common.zig +219 -0
  50. riley_raster-2026.5.0/src/riley/zig/shaderkernels_scalar.zig +89 -0
  51. riley_raster-2026.5.0/src/riley/zig/shaderkernels_simd.zig +322 -0
  52. riley_raster-2026.5.0/src/riley/zig/shaderops.zig +51 -0
  53. riley_raster-2026.5.0/src/riley/zig/shaderops_common.zig +678 -0
  54. riley_raster-2026.5.0/src/riley/zig/shaderops_scalar.zig +18 -0
  55. riley_raster-2026.5.0/src/riley/zig/shaderops_simd.zig +524 -0
  56. riley_raster-2026.5.0/src/riley/zig/shapefun.zig +504 -0
  57. riley_raster-2026.5.0/src/riley/zig/simdops.zig +21 -0
  58. riley_raster-2026.5.0/src/riley/zig/sliceops.zig +313 -0
  59. riley_raster-2026.5.0/src/riley/zig/textureops.zig +35 -0
  60. riley_raster-2026.5.0/src/riley/zig/textureops_common.zig +932 -0
  61. riley_raster-2026.5.0/src/riley/zig/textureops_simd.zig +1951 -0
  62. riley_raster-2026.5.0/src/riley/zig/uvio.zig +143 -0
  63. riley_raster-2026.5.0/src/riley/zig/vecsimd.zig +250 -0
  64. riley_raster-2026.5.0/src/riley/zig/vecslice.zig +327 -0
  65. riley_raster-2026.5.0/src/riley/zig/vecstack.zig +350 -0
  66. riley_raster-2026.5.0/src/riley_raster.egg-info/SOURCES.txt +63 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 scepticalrabbit
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,20 @@
1
+ include LICENSE
2
+ include README.md
3
+ include pyproject.toml
4
+ include setup.py
5
+
6
+ recursive-include src/riley *.py *.pxd *.h *.zig
7
+
8
+ prune src/riley/__pycache__
9
+ prune src/riley/cyth/__pycache__
10
+ prune src/riley/zig/__pycache__
11
+ prune src/riley_raster.egg-info
12
+ prune src/riley.egg-info
13
+
14
+ global-exclude *.pyc
15
+ global-exclude *.pyo
16
+ global-exclude *.pyd
17
+ global-exclude *.so
18
+ global-exclude *.dylib
19
+ global-exclude *.dll
20
+ global-exclude *.html
@@ -0,0 +1,124 @@
1
+ Metadata-Version: 2.4
2
+ Name: riley-raster
3
+ Version: 2026.5.0
4
+ Summary: A python->Zig CPU rasteriser.
5
+ Author-email: "scepticalrabbit (Lloyd Fletcher)" <thescepticalrabbit@gmail.com>
6
+ License-Expression: MIT
7
+ Project-URL: Repository, https://github.com/Computer-Aided-Validation-Laboratory/riley-raster
8
+ Requires-Python: >=3.11.0
9
+ Description-Content-Type: text/markdown
10
+ License-File: LICENSE
11
+ Requires-Dist: numpy>=2.0.0
12
+ Requires-Dist: Pillow>=10.0.0
13
+ Dynamic: license-file
14
+
15
+ # Riley
16
+ `Riley` is a performant software rasteriser written in Zig specifically designed for digital image correlation (DIC) uncertainty quantification (UQ). `Riley` performs off-line rendering of deformed speckle pattern images from an input finite element simulation. `Riley` supports accurate rendering of higher order finite elements including `tri3`, `tri6`, `quad4`, `quad8` and `quad9` surface elements. Texture shading with higher order texture sampling is also supported for accurate speckle pattern rendering including: cubic sampling (Catmull-Rom, Mitchell-Netravali, BSpline), quintic sampling (BSpline) and Lancsoz (lancsoz3). Rendering multiple meshes with different element types and shading strategies in the same scene is supported.
17
+
18
+ We specifically chose to implement `Riley` in Zig as it is a compiled language with manual memory management. It also allows for compile time code generation and has excellent support for SIMD vector types. We have used `comptime` to generate speciliased kernels for geometry and shader types removing run time dispatch overhead. We have also leveraged Zig's `io` interface to implement hierarchical parallelisation allowing for inter and intra frame parallelisation for offline rendering.
19
+
20
+ ## Getting Started: Zig
21
+ `Riley` uses the Zig 0.16.0 compiler release which can be downloaded from [here](https://ziglang.org/download/). The `Riley` repository contains a minimal set of regression tests (called the "min" test suite) which should be run before generating a wider set gold regression data and running performance benchmark suites. The min test suite can be run from the project root directory using:
22
+ ```shell
23
+ zig test -lc -O ReleaseSafe ./src/test_min.zig
24
+ ```
25
+ The min test suite contains two cases a render of the "multimesh" case which is two elements of each type in a single scene that are rendered with nodal interpolation shading or texture shading. The min test suite also contains a rendering of the "sphere200" case which is a sphere with 200 elements of a single type with every possible combination of nodal or texture shading. the sphere200 case is particularly sensitive to breaking changes due to the range of element orientations.
26
+
27
+ Once the min test suite passes the additional gold regression data can be generated for two suites the first is the "all" suite and the second is the "bench" suite. The "bench" suite is based on the benchmarks described in the "Benchmarks" section below. Before we can render the gold images we first need to generate the larger meshes for the "bench" cases using a python script that has numpy as a dependency, run this from the project root:
28
+ ```shell
29
+ python ./data/bench/gen_bench_data.py
30
+ ```
31
+
32
+ You should see a range of directories generated in the data/bench directory with different element types and case tags. Once that is done we can render the required gold output with:
33
+ ```shell
34
+ zig run -lc -O ReleaseSafe ./src/gen_gold_all.zig
35
+ ```
36
+
37
+ Now we can run the remaining "all" and "bench" test suites:
38
+ ```shell
39
+ zig test -lc -O ReleaseSafe ./src/test_gold_all.zig
40
+ zig test -lc -O ReleaseSafe ./src/test_bench.zig
41
+ ```
42
+
43
+ ## Getting Started: Python
44
+ We provide python bindings for the `Riley` dynamic library through cython. We also provide a `riley-raster` python package on pypi which builds `Riley` from zig source using the `ziglang` python package. You can install `Riley` into a python virtual environment using:
45
+
46
+ ```shell
47
+ pip install riley-raster
48
+ ```
49
+
50
+ Note that as this builds `Riley` from source on your local machine the install will take approximately 1 minute or more depending on your hardware. For all demonstration zig scripts described below we provide python equivalents in the ./pyscripts/ directory in the project root. You can also create an editable install by directly building from source on your local machine. Clone the `Riley` repo, create a python virtual environment of your choice and then with your environment active run the following from the project root:
51
+
52
+ ```shell
53
+ pip install -e .
54
+ ```
55
+
56
+ ## Capability Demonstration
57
+ We have included a series of capability demonstrations scripts in the /src/ directory (or in the /pyscripts/ directory for python versions). In Zig, these can be run using
58
+ ```shell
59
+ zig run -lc -O ReleaseFast ./src/demo_CASE.zig
60
+ ```
61
+ where CASE is the name of the demonstration script you want to run (CASE = sphere200, rabbits, dicuq, stereocal). The output renders will be saved to /out/demo-CASE/.
62
+
63
+ In python you should activate your virtual environment with `Riley` installed then you can run the examples using:
64
+
65
+ ```shell
66
+ python ./pyscripts/demo_CASE.py
67
+ ```
68
+
69
+ where CASE is the name of the demonstration script you want to run. The output renders will be saved to /pyout/demo-CASE/.
70
+
71
+ ### Speckle Sphere
72
+ For this demonstration we import a mesh of sphere and apply a speckle pattern texture shader to render a speckle pattern on the sphere. This is a simple single mesh and single shader case that would be typical for a DIC UQ workflow. A representative render of the sphere is shown below:
73
+
74
+ ![fig_sphere](/images/demo_sphere200.bmp)
75
+
76
+ ### Rendering Rabbits
77
+ In this demonstration we render a series of rabbit meshes that are composed of all supported element types: `tri3`, `tri6`, `quad4`, `quad8` and `quad9`. We also demonstrate the usage of all support shader types in the same scene rotating between a texture shader with cubic LUT-lerp sampling, a nodal interpolation shader interpolating the uv coordinates and an analytic function shader producing a sin wave pattern across the rabbit mesh based on the input uvs. The output render is shown below, the top row are the triangular meshes and the bottom row are the quadrilateral meshes:
78
+
79
+ ![fig_rabbit_render](/images/demo_rabbitrender.bmp)
80
+
81
+ ### Digital Image Correlation Uncertainty Quantification
82
+ For this case we demonstrate a representative DIC UQ rendering using an input finite element model of a plate with a hole loaded in tension imaged by a stereo DIC system consisting of two 5MPx cameras. The simulation mesh was generated with Gmsh and solved using the MOOSE solid mechanics module. The gmsh .geo and MOOSE .i input file can be found in the /data/FE/ directory.
83
+
84
+ | Camera 0 | Camera 1 |
85
+ |:---:|:---:|
86
+ | ![DIC Camera 0](./images/dicuq_cam0_frame0_field0.bmp) | ![DIC Camera 1](./images/dicuq_cam1_frame0_field0.bmp) |
87
+
88
+
89
+ ### Stereo Calibration
90
+ We now use the camera setup from the previous DIC UQ demo, import it and then render a series of stereo calibration target images with the same camera setup. The input meshes for this case can be found in the /data/calplate/ directory. In this directory there is a python script which can be used to scale the size of the calibration target mesh and to generate different combinations of rigid body translation and rotation within user specified bound. A representative render is shown below:
91
+
92
+ | Camera 0 | Camera 1 |
93
+ |:---:|:---:|
94
+ | ![Cal Camera 0](./images/cal_cam0_frame0_field0.bmp) | ![ Cal Camera 1](./images/cal_cam1_frame0_field0.bmp) |
95
+
96
+
97
+ ## Performance Benchmarks
98
+ We used four cases to analyse the performance of `Riley`: 1) Minimum elements filling the screen (2 triangles or 1 quadrilateral), called "fullraster", 2) 1e5 elements filling screen, called "geom", 3) A sphere in the centre of the screen with 2000 elements, called sphere2000. Case 1 is intended to test the throughput of the raster hot loop. Case 2 is intended to test the throughput of the geometry pre-processing. Case 3 is a more realistic case with a balance of element orientations. Case 4 tests thread scaling on the same case as the DIC UQ demonstration. These benchmark suites can be run using:
99
+
100
+ ```shell
101
+ zig run -lc -O ReleaseFast ./src/bench_fullraster.zig
102
+ zig run -lc -O ReleaseFast ./src/bench_geom.zig
103
+ zig run -lc -O ReleaseFast ./src/bench_sphere2000.zig
104
+ zig run -lc -O ReleaseFast ./src/bench_dicuq.zig
105
+ ```
106
+ You will find the rendered output for these benchmarks in ./out/bench-CASE where CASE is fullraster, geom, sphere2000 or dicuq.
107
+
108
+ ## Navigating the Codebase
109
+ The main entry point for the `Riley` rendering pipeline is the `rasterAllFrames` function in /src/riley/zig/riley.zig.
110
+
111
+ ### C Interface
112
+
113
+ `Riley` provides a small C-compatible API for use from other languages. The Python bindings use this interface through Cython, but it can also be called from C or from languages with C FFI support. The extern types and functions for this interface can be found in /src/riley/zig/c-riley.zig.
114
+
115
+ ## Contributors
116
+ - Lloyd Fletcher ([ScepticalRabbit](https://github.com/ScepticalRabbit)), UK Atomic Energy Authority
117
+ - Joel Hirst ([JoelPhys](https://github.com/JoelPhys)), UK Atomic Energy Authority
118
+ - Wiera Bielajewa ([WieraB](https://github.com/WieraB)), UK Atomic Energy Authority
119
+
120
+ ## Dedication
121
+
122
+ Named in memory of Riley, and for Feebee, her sister and bondmate. Without your love and support, this project would never have happened.
123
+
124
+ ![Riley](images/RileyHelping.jpg)
@@ -0,0 +1,110 @@
1
+ # Riley
2
+ `Riley` is a performant software rasteriser written in Zig specifically designed for digital image correlation (DIC) uncertainty quantification (UQ). `Riley` performs off-line rendering of deformed speckle pattern images from an input finite element simulation. `Riley` supports accurate rendering of higher order finite elements including `tri3`, `tri6`, `quad4`, `quad8` and `quad9` surface elements. Texture shading with higher order texture sampling is also supported for accurate speckle pattern rendering including: cubic sampling (Catmull-Rom, Mitchell-Netravali, BSpline), quintic sampling (BSpline) and Lancsoz (lancsoz3). Rendering multiple meshes with different element types and shading strategies in the same scene is supported.
3
+
4
+ We specifically chose to implement `Riley` in Zig as it is a compiled language with manual memory management. It also allows for compile time code generation and has excellent support for SIMD vector types. We have used `comptime` to generate speciliased kernels for geometry and shader types removing run time dispatch overhead. We have also leveraged Zig's `io` interface to implement hierarchical parallelisation allowing for inter and intra frame parallelisation for offline rendering.
5
+
6
+ ## Getting Started: Zig
7
+ `Riley` uses the Zig 0.16.0 compiler release which can be downloaded from [here](https://ziglang.org/download/). The `Riley` repository contains a minimal set of regression tests (called the "min" test suite) which should be run before generating a wider set gold regression data and running performance benchmark suites. The min test suite can be run from the project root directory using:
8
+ ```shell
9
+ zig test -lc -O ReleaseSafe ./src/test_min.zig
10
+ ```
11
+ The min test suite contains two cases a render of the "multimesh" case which is two elements of each type in a single scene that are rendered with nodal interpolation shading or texture shading. The min test suite also contains a rendering of the "sphere200" case which is a sphere with 200 elements of a single type with every possible combination of nodal or texture shading. the sphere200 case is particularly sensitive to breaking changes due to the range of element orientations.
12
+
13
+ Once the min test suite passes the additional gold regression data can be generated for two suites the first is the "all" suite and the second is the "bench" suite. The "bench" suite is based on the benchmarks described in the "Benchmarks" section below. Before we can render the gold images we first need to generate the larger meshes for the "bench" cases using a python script that has numpy as a dependency, run this from the project root:
14
+ ```shell
15
+ python ./data/bench/gen_bench_data.py
16
+ ```
17
+
18
+ You should see a range of directories generated in the data/bench directory with different element types and case tags. Once that is done we can render the required gold output with:
19
+ ```shell
20
+ zig run -lc -O ReleaseSafe ./src/gen_gold_all.zig
21
+ ```
22
+
23
+ Now we can run the remaining "all" and "bench" test suites:
24
+ ```shell
25
+ zig test -lc -O ReleaseSafe ./src/test_gold_all.zig
26
+ zig test -lc -O ReleaseSafe ./src/test_bench.zig
27
+ ```
28
+
29
+ ## Getting Started: Python
30
+ We provide python bindings for the `Riley` dynamic library through cython. We also provide a `riley-raster` python package on pypi which builds `Riley` from zig source using the `ziglang` python package. You can install `Riley` into a python virtual environment using:
31
+
32
+ ```shell
33
+ pip install riley-raster
34
+ ```
35
+
36
+ Note that as this builds `Riley` from source on your local machine the install will take approximately 1 minute or more depending on your hardware. For all demonstration zig scripts described below we provide python equivalents in the ./pyscripts/ directory in the project root. You can also create an editable install by directly building from source on your local machine. Clone the `Riley` repo, create a python virtual environment of your choice and then with your environment active run the following from the project root:
37
+
38
+ ```shell
39
+ pip install -e .
40
+ ```
41
+
42
+ ## Capability Demonstration
43
+ We have included a series of capability demonstrations scripts in the /src/ directory (or in the /pyscripts/ directory for python versions). In Zig, these can be run using
44
+ ```shell
45
+ zig run -lc -O ReleaseFast ./src/demo_CASE.zig
46
+ ```
47
+ where CASE is the name of the demonstration script you want to run (CASE = sphere200, rabbits, dicuq, stereocal). The output renders will be saved to /out/demo-CASE/.
48
+
49
+ In python you should activate your virtual environment with `Riley` installed then you can run the examples using:
50
+
51
+ ```shell
52
+ python ./pyscripts/demo_CASE.py
53
+ ```
54
+
55
+ where CASE is the name of the demonstration script you want to run. The output renders will be saved to /pyout/demo-CASE/.
56
+
57
+ ### Speckle Sphere
58
+ For this demonstration we import a mesh of sphere and apply a speckle pattern texture shader to render a speckle pattern on the sphere. This is a simple single mesh and single shader case that would be typical for a DIC UQ workflow. A representative render of the sphere is shown below:
59
+
60
+ ![fig_sphere](/images/demo_sphere200.bmp)
61
+
62
+ ### Rendering Rabbits
63
+ In this demonstration we render a series of rabbit meshes that are composed of all supported element types: `tri3`, `tri6`, `quad4`, `quad8` and `quad9`. We also demonstrate the usage of all support shader types in the same scene rotating between a texture shader with cubic LUT-lerp sampling, a nodal interpolation shader interpolating the uv coordinates and an analytic function shader producing a sin wave pattern across the rabbit mesh based on the input uvs. The output render is shown below, the top row are the triangular meshes and the bottom row are the quadrilateral meshes:
64
+
65
+ ![fig_rabbit_render](/images/demo_rabbitrender.bmp)
66
+
67
+ ### Digital Image Correlation Uncertainty Quantification
68
+ For this case we demonstrate a representative DIC UQ rendering using an input finite element model of a plate with a hole loaded in tension imaged by a stereo DIC system consisting of two 5MPx cameras. The simulation mesh was generated with Gmsh and solved using the MOOSE solid mechanics module. The gmsh .geo and MOOSE .i input file can be found in the /data/FE/ directory.
69
+
70
+ | Camera 0 | Camera 1 |
71
+ |:---:|:---:|
72
+ | ![DIC Camera 0](./images/dicuq_cam0_frame0_field0.bmp) | ![DIC Camera 1](./images/dicuq_cam1_frame0_field0.bmp) |
73
+
74
+
75
+ ### Stereo Calibration
76
+ We now use the camera setup from the previous DIC UQ demo, import it and then render a series of stereo calibration target images with the same camera setup. The input meshes for this case can be found in the /data/calplate/ directory. In this directory there is a python script which can be used to scale the size of the calibration target mesh and to generate different combinations of rigid body translation and rotation within user specified bound. A representative render is shown below:
77
+
78
+ | Camera 0 | Camera 1 |
79
+ |:---:|:---:|
80
+ | ![Cal Camera 0](./images/cal_cam0_frame0_field0.bmp) | ![ Cal Camera 1](./images/cal_cam1_frame0_field0.bmp) |
81
+
82
+
83
+ ## Performance Benchmarks
84
+ We used four cases to analyse the performance of `Riley`: 1) Minimum elements filling the screen (2 triangles or 1 quadrilateral), called "fullraster", 2) 1e5 elements filling screen, called "geom", 3) A sphere in the centre of the screen with 2000 elements, called sphere2000. Case 1 is intended to test the throughput of the raster hot loop. Case 2 is intended to test the throughput of the geometry pre-processing. Case 3 is a more realistic case with a balance of element orientations. Case 4 tests thread scaling on the same case as the DIC UQ demonstration. These benchmark suites can be run using:
85
+
86
+ ```shell
87
+ zig run -lc -O ReleaseFast ./src/bench_fullraster.zig
88
+ zig run -lc -O ReleaseFast ./src/bench_geom.zig
89
+ zig run -lc -O ReleaseFast ./src/bench_sphere2000.zig
90
+ zig run -lc -O ReleaseFast ./src/bench_dicuq.zig
91
+ ```
92
+ You will find the rendered output for these benchmarks in ./out/bench-CASE where CASE is fullraster, geom, sphere2000 or dicuq.
93
+
94
+ ## Navigating the Codebase
95
+ The main entry point for the `Riley` rendering pipeline is the `rasterAllFrames` function in /src/riley/zig/riley.zig.
96
+
97
+ ### C Interface
98
+
99
+ `Riley` provides a small C-compatible API for use from other languages. The Python bindings use this interface through Cython, but it can also be called from C or from languages with C FFI support. The extern types and functions for this interface can be found in /src/riley/zig/c-riley.zig.
100
+
101
+ ## Contributors
102
+ - Lloyd Fletcher ([ScepticalRabbit](https://github.com/ScepticalRabbit)), UK Atomic Energy Authority
103
+ - Joel Hirst ([JoelPhys](https://github.com/JoelPhys)), UK Atomic Energy Authority
104
+ - Wiera Bielajewa ([WieraB](https://github.com/WieraB)), UK Atomic Energy Authority
105
+
106
+ ## Dedication
107
+
108
+ Named in memory of Riley, and for Feebee, her sister and bondmate. Without your love and support, this project would never have happened.
109
+
110
+ ![Riley](images/RileyHelping.jpg)
@@ -0,0 +1,24 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0", "wheel", "Cython", "numpy", "ziglang"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "riley-raster"
7
+ version = "2026.5.0"
8
+ description = "A python->Zig CPU rasteriser."
9
+ authors = [
10
+ { name = "scepticalrabbit (Lloyd Fletcher)", email = "thescepticalrabbit@gmail.com" },
11
+ ]
12
+ license = "MIT"
13
+ readme = "README.md"
14
+ requires-python = ">=3.11.0"
15
+ dependencies = [
16
+ "numpy>=2.0.0",
17
+ "Pillow>=10.0.0",
18
+ ]
19
+
20
+ [project.urls]
21
+ "Repository" = "https://github.com/Computer-Aided-Validation-Laboratory/riley-raster"
22
+
23
+ [tool.setuptools.packages.find]
24
+ where = ["src"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+