Compare commits
4 Commits
821a01c167
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 5168be0ea9 | |||
| 7f013bf36b | |||
| fb2d5d2d0c | |||
| f50871e3d8 |
@@ -41,3 +41,5 @@ debug
|
|||||||
build
|
build
|
||||||
debug
|
debug
|
||||||
.cache
|
.cache
|
||||||
|
tmp
|
||||||
|
screenshot*
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# polypartiCL
|
# 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.
|
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.
|
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.
|
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.
|
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.
|
polypartiCL is licensed with the 3-clause BSD license.
|
||||||
|
|
||||||
## Todo
|
## Todo
|
||||||
|
- Reduce corner escaping
|
||||||
|
- Ability limited by f32 precision
|
||||||
- Rewrite & optimize simulation code, store all points/velocites in one array and submit once
|
- 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
|
- 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
|
- 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 linear beams
|
||||||
- Add environment objects / multiple rooms per screen
|
- Add environment objects / multiple rooms per screen
|
||||||
- Add timed events
|
- Add timed events
|
||||||
|
- Add compile option for 64-bit floating point simulation
|
||||||
|
|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|
|||||||
@@ -67,6 +67,8 @@ int main(int argc, char* argv[]) {
|
|||||||
raylib::Vector2 mouse_i, mouse_f, mouse_d;
|
raylib::Vector2 mouse_i, mouse_f, mouse_d;
|
||||||
raylib::Vector2 midpoint(screenWidth * 0.5, screenHeight * 0.5);
|
raylib::Vector2 midpoint(screenWidth * 0.5, screenHeight * 0.5);
|
||||||
|
|
||||||
|
raylib::Image screenshot(screenWidth, screenHeight, WHITE);
|
||||||
|
|
||||||
|
|
||||||
float dirH[2] = {1.0f, 0.0f};
|
float dirH[2] = {1.0f, 0.0f};
|
||||||
float dirV[2] = {0.0f, 1.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_B)) useShader = !useShader;
|
||||||
if (IsKeyPressed(KEY_SPACE)) paused = !paused;
|
if (IsKeyPressed(KEY_SPACE)) paused = !paused;
|
||||||
if (IsKeyPressed(KEY_T)) sim.reverseInterval();
|
if (IsKeyPressed(KEY_T)) sim.reverseInterval();
|
||||||
|
if (IsKeyPressed(KEY_S)) {
|
||||||
|
screenshot.LoadFromScreen();
|
||||||
|
screenshot.ExportAsCode("screenshot" + std::to_string(window.GetTime()));
|
||||||
|
}
|
||||||
|
|
||||||
if (!paused) {
|
if (!paused) {
|
||||||
sim.updateFields(window.GetTime());
|
sim.updateFields(window.GetTime());
|
||||||
|
|||||||
Reference in New Issue
Block a user