Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/avicted/galaxy_visualization_raylib
100k real ( +100k random ) galaxies from a sector. Visualized with Raylib.
https://github.com/avicted/galaxy_visualization_raylib
c cmake galaxies gamedev linux meson physics raylib
Last synced: about 8 hours ago
JSON representation
100k real ( +100k random ) galaxies from a sector. Visualized with Raylib.
- Host: GitHub
- URL: https://github.com/avicted/galaxy_visualization_raylib
- Owner: Avicted
- License: mit
- Created: 2024-04-20T22:14:49.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-09-18T13:50:40.000Z (4 months ago)
- Last Synced: 2025-01-15T07:49:19.280Z (7 days ago)
- Topics: c, cmake, galaxies, gamedev, linux, meson, physics, raylib
- Language: C++
- Homepage:
- Size: 52.9 MB
- Stars: 87
- Watchers: 1
- Forks: 6
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Galaxy Visualization
Visualization of 100,000 real galaxies in blue and 100,000 randomly distributed galaxies in red.
## The Course
This project visualizes 100,000 real galaxies in blue and 100,000 randomly distributed galaxies in red. The data is sourced from the GPU programming course at
[Åbo Akademi University](https://studiehandboken.abo.fi/en/course/IT00CG19/19162?period=2024-2027)This course teaches parallel programming using CUDA.
The assignment is to use CUDA to calculate 10 billion angles between galaxies and prove they are not randomly distributed.
The students must leverage the GPU for these calculations on their own using a supercomputer.The students have to prove this on their own.
The expected runtime for the calculation is approximately 3 seconds.
This program is a visualization of the data, not the solution to the assignment.
## Prerequisites
This project can be built using plain g++ through build.sh (raylib is the only dependency), Meson, CMake, or Make.
Below are the installation instructions for the required dependencies:
### Dependencies
- **Raylib**
- **Base Development Tools** (e.g., `build-essential` on Ubuntu)
- **Meson**
- **CMake**
- **Git**
- **Clang** (or GCC)
- **gdb** (optional)### Installation Commands
#### Arch Linux
```bash
sudo pacman -S raylib base-devel meson git cmake clang
```#### Ubuntu
```bash
sudo apt-get install -y raylib build-essential meson git cmake clang
```### Build and Run the Project
You can choose from one of the following build systems:
- Meson (F5 in VSCode)
- Make with CMake
- build.sh## Meson
#### Setup:
```bash
meson setup build --buildtype=release
```#### Build:
```bash
meson compile -C build
```#### Run:
```bash
./build/galaxy_visualization_raylib
```#### Clean:
```bash
meson compile -C build --clean
```## Make
#### Build:
```bash
make
```#### Run:
```bash
make run
```#### Clean:
```bash
make clean
```## Demo
![demo](resources/images/galaxy_demo.gif "galaxy_demo.gif")
---
![screen](resources/images/screenshot.png "screenshot.png")
## Patch Notes
- Spacebar: Pauses the program.
- Added Makefile for Linux.
- Added Meson build system for Linux.
- The Meson build now links against the system-installed Raylib.
- Added earth model: https://science.nasa.gov/resource/earth-3d-model/ | Credit: NASA Visualization Technology Applications and Development (VTAD).
- Added Free Look Mode.
- Redshift data taken from: https://lweb.cfa.harvard.edu/~dfabricant/huchra/zcat/seyfert.dat
- Added build.sh for easy building on Linux.
- LShift to move slower in free look mode.