Compare commits

...

4 Commits

Author SHA1 Message Date
alardner 5168be0ea9 update readme 2026-07-14 00:20:01 -07:00
alardner 7f013bf36b Merge pull request 'Dev' (#3) from dev into main
Reviewed-on: #3
2026-07-13 23:38:42 -07:00
alardner fb2d5d2d0c add images to readme 2026-07-13 23:29:33 -07:00
alardner f50871e3d8 ??? 2026-07-13 23:05:46 -07:00
3 changed files with 18 additions and 1 deletions
+2
View File
@@ -41,3 +41,5 @@ debug
build
debug
.cache
tmp
screenshot*
+10 -1
View File
@@ -1,6 +1,6 @@
# polypartiCL
Naive photon simulator with SYCL and [raylib](https://raylib.com)
Naive photon simulator using [SYCL](https://khronos.org/sycl/) and [raylib](https://raylib.com)
This project uses the [raylib-cpp](https://robloach.github.io/raylib-cpp) wrapper library and is provided in the /include directory.
raylib-cpp is licensed under an unmodified zlib/libpng license. A copy of this license is provided at /include/LICENSE.
@@ -8,12 +8,21 @@ raylib-cpp is licensed under an unmodified zlib/libpng license. A copy of this l
cmake assumes icpx and the [Intel OneAPI](https://www.intel.com/content/www/us/en/developer/tools/oneapi/overview.html) environment is installed.
You'll need these even if you don't compile with cmake until SYCL gets native LLVM support.
All simulation code uses single-precision floating point arithmetic to ensure compatability with (integrated) graphics packages that do not support 64-bit floating point.
polypartiCL is licensed with the 3-clause BSD license.
## Todo
- Reduce corner escaping
- Ability limited by f32 precision
- Rewrite & optimize simulation code, store all points/velocites in one array and submit once
- Consider modelling each particle and all its relevant data points individually
- Submit each relevant data point by pointer offset, size of struct is irrelevant as long as it is constant, only necessary data will be submitted to kernel
- Add linear beams
- Add environment objects / multiple rooms per screen
- Add timed events
- Add compile option for 64-bit floating point simulation
![Screenshot 1](https://alexlardner.com/img/1.png)
![Screenshot 2](https://alexlardner.com/img/2.png)
![Screenshot 3](https://alexlardner.com/img/3.png)
+6
View File
@@ -67,6 +67,8 @@ int main(int argc, char* argv[]) {
raylib::Vector2 mouse_i, mouse_f, mouse_d;
raylib::Vector2 midpoint(screenWidth * 0.5, screenHeight * 0.5);
raylib::Image screenshot(screenWidth, screenHeight, WHITE);
float dirH[2] = {1.0f, 0.0f};
float dirV[2] = {0.0f, 1.0f};
@@ -89,6 +91,10 @@ int main(int argc, char* argv[]) {
if (IsKeyPressed(KEY_B)) useShader = !useShader;
if (IsKeyPressed(KEY_SPACE)) paused = !paused;
if (IsKeyPressed(KEY_T)) sim.reverseInterval();
if (IsKeyPressed(KEY_S)) {
screenshot.LoadFromScreen();
screenshot.ExportAsCode("screenshot" + std::to_string(window.GetTime()));
}
if (!paused) {
sim.updateFields(window.GetTime());