Skip to content
Snippets Groups Projects
Commit ccec7cac authored by Johannes Lukas Bartunek's avatar Johannes Lukas Bartunek
Browse files

Merge branch 'bartunej-main-patch-84260' into 'main'

Update stargazer/README.md, stargazer/CMakeLists.txt,...

See merge request bartunej/n-body!4
parents 6337f1a3 02750066
No related branches found
No related tags found
1 merge request!4Update stargazer/README.md, stargazer/CMakeLists.txt,...
cmake_minimum_required(VERSION 3.10)
project(main LANGUAGES C)
project(stargazer LANGUAGES C)
link_libraries( -lGL -lglfw -lm -ggdb -lgraphene-1.0 -g -lpthread -O2)
add_executable(main ${PROJECT_SOURCE_DIR}/src/main.c ${PROJECT_SOURCE_DIR}/src/glad.c)
add_executable(stargazer ${PROJECT_SOURCE_DIR}/src/main.c ${PROJECT_SOURCE_DIR}/src/glad.c)
include_directories( PRIVATE include)
include_directories(PRIVATE /usr/lib64/graphene-1.0/include) #beware: not system agnostic
# Welcome to Stargazer
This is the visualization portion of this repository.
Fly around the scene and study the trajectory of your system.
# Build and Run
This program has been tested to work with Fedora35 so your mileage may vary. Feel free to open an issue or PR, if you can not get it to run on your platform.
```
cmake . -DCMAKE_BUILD_TYPE=Release
make
./Stargazer <name-to-logfile>
```
# Controls
`SPACE` Pause/ Unpause
`.` Speed up time
`,` Slow/ Reverse time
`c` Toggle trajectory trace
`n` Shorter trace
`m` Longer trace
`k/ l` Scale the scene
`o/ p` Scale the size of the objects
`right/ left arrows` Increase/ Decrease movement speed
Use the mouse/ touchpad to look around.
File moved
File moved
File moved
stargazer/screenshot/chaosI.png

32.7 KiB

stargazer/screenshot/chaosII.png

53.3 KiB

stargazer/screenshot/solar_system.png

21.9 KiB

File moved
File moved
File moved
File moved
......@@ -107,7 +107,7 @@ int main(int argc, char *argv[]) {
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 5);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
glfwWindowHint(GLFW_SAMPLES,1);
glfwWindowHint(GLFW_SAMPLES,4);
glfwWindowHint(GLFW_CLIENT_API, GLFW_OPENGL_API);
glfwWindowHint(GLFW_CONTEXT_CREATION_API, GLFW_NATIVE_CONTEXT_API);
......@@ -131,6 +131,7 @@ int main(int argc, char *argv[]) {
glViewport(0, 0, 1000, 1000);
glfwSetFramebufferSizeCallback(window, framebuffer_size_callback);
glEnable( GL_DEBUG_OUTPUT );
glEnable(GL_MULTISAMPLE);
glDebugMessageCallback( MessageCallback, 0 );
//to change things related to GL_POINT Primitive
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment