Giter Club home page Giter Club logo

beaubell / amethyst Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 3.24 MB

An OpenGL, RK4 based, GPU accelerated gravity simulator that wants to become a full space physics simulator. It is also an experiment with wrapping OpenGL 4.0 primitives with C++ objects, OpenCL, stereoscopic visualization, dynamic module loading, and multiplayer support over a network using a server.

CMake 1.76% C++ 50.51% C 41.53% GLSL 0.18% Shell 4.82% HTML 0.36% Makefile 0.14% M4 0.70%

amethyst's Introduction

Introduction

This is my pet project to explore iterative integration and visualization techniques. My dream was to turn this into a game or multiplayer simulator with realistic physics, but I've since decided to put this out there as an example of a working gravity simulator with high-precision with other goodies.

This project uses OpenGL 3.3 Core and is (was, currently untested) multi-platform. While I was a student at the University of Alaska Fairbanks (UAF) studying physics, I made an extensive overhaul to the engine to use Runge-Kutta 4th order integration as well as make use of GPGPU hardware. I used this as a tool for my undergraduate research project to explore the Interplanetary Transport Network (ITN) which is a set of pathways throughout our solar system that allow travel using little to no energy, that is, if time is not an issue.

It supports module loading, bmp texture loading, custom shaders, stereoscopic display, loading and saving state via YAML and HDF5, offloading O(n^2) gravity calculation to GPU via OpenCL, and multiplayer (currently broken). There are a few modules that can be loaded to show more science-related visuals, such as gravimetric potential (wells) over the whole system.

Screenshot with overlay modules installed

A screenshot showing U/D stereoscopic visual suitable for some 3D televisions.

Screenshot showing 3D Stereo

Demo of Gravimetric Potential Plane visualization module.

Gravimetric Potential

Build Requirements

  • Boost
  • Simple DirectMedia Layer v2 (libSDL2)
  • OpenGL
  • OpenCL
  • OpenAL
  • yaml-cpp (as a git subproject)
  • GLEW
  • GLUT
  • HDF5

If GUI components (OpenGL, X11, etc) are missing during build, only the library, server, and commandline utilities will be built.

on Fedora

dnf install boost-devel boost-static freetype-devel libxml2-devel SDL2-devel SDL2-static glew-devel hdf5-devel ocl-icd-devel openal-devel glut-devel vulkan-loader-devel vulkan-headers vulkan-validation-layers-devel

Building

mkdir build && cd build

cmake ..

Prepping for first run

Populate resource directory in your home directory. ( Ex. ~/.amethyst/)

TODO - the resources that are used in the screenshots are not distributable. I'm working a solution for that.

Move modules into home directory

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.