Skip to content

Avicted/galaxy_visualization_raylib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Galaxy Visualization

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

The assignment is to use parallel programming with CUDA (or HIP) 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 smaller compute cluster or supercomputer.

Note:

  • The students have to prove this on their own.
  • The expected runtime for the calculation is approximately 3 seconds.
    • It is possible to optimize the runtime to 0.85 seconds on a single GPU (my own solution tested with one AMD RX 6900 XT).
  • This program is a visualization of the data, not the solution to the assignment.

Prerequisites

This project can be built using clang through build.sh (raylib is the only dependency) or use Meson as the build system.

Dependencies

  • Git
  • Base Development Tools (e.g. build-essential on Ubuntu)
  • Raylib (Tested with v5.5-1)
  • Clang (or GCC)
  • Meson (optional)
  • gdb (optional)

Installation Commands

Arch Linux

sudo pacman -S raylib base-devel meson git clang

Ubuntu

sudo apt-get install -y raylib build-essential meson git clang

Build and Run the Project

You can choose from one of the following build systems:

  • Meson (F5 in VSCode)
  • build.sh

Meson

# Setup
meson setup build --buildtype=release 

# Build
meson compile -C build

# Run
./build/galaxy_visualization_raylib

# Clean
meson compile -C build --clean

Bash

# Build
chmod +x ./build.sh
./build.sh

# Run
./build/galaxy_visualization_raylib

Demo

demo


screen

Data sources

About

100k real ( +100k random ) galaxies from a sector. Visualized with Raylib.

Topics

Resources

License

Stars

Watchers

Forks