From bfe58ed89fc2e458013a0016fc836250bb5c4571 Mon Sep 17 00:00:00 2001 From: Kevin Jerebica Date: Tue, 17 Sep 2024 19:05:48 +0200 Subject: [PATCH] Update docs --- README | 36 ++++++++++++++++++++++++++++++++++++ README.md | 42 ------------------------------------------ gravity.c | 5 ----- 3 files changed, 36 insertions(+), 47 deletions(-) create mode 100644 README delete mode 100644 README.md diff --git a/README b/README new file mode 100644 index 0000000..a818820 --- /dev/null +++ b/README @@ -0,0 +1,36 @@ ++-------------+ +| Gravity | ++-------------+ + + C+OpenGL simulator of mass objects in + space - according to Newton. + +FEATURES + + [DONE] Object tracing + [DONE] Toggle object tracing + [DONE] Scaling up/down objects + [DONE] Locking camera view to an object + [TODO] File format for importing scenes + [TODO] Collision + +INSTALL + + Build automation system is cmake. Thus, one + can compile this project much like any other + cmake project. + + mkdir build + + cd build + + cmake .. + + make all + + ./gravity + +LICENSE + + Gravity is licensed under the GPL-3.0 license. + See the `LICENSE` file for more information. diff --git a/README.md b/README.md deleted file mode 100644 index f65ff4c..0000000 --- a/README.md +++ /dev/null @@ -1,42 +0,0 @@ - -

- -

- -# Gravity - ---- - -Pet project simulator for interactions between matter built off of OpenGL and C. - -Goals and features: -- [x] Law of gravitation -- [x] Object tracing - - [x] Toggle object tracing -- [ ] Grid - - [ ] Toggle Grid -- [x] Scaling up/down objects -- [x] Locking camera view to an object -- [ ] File format for importing scenes -- [ ] Collision -- [ ] Soft-bodies and structures - -## Installation - -Gravity uses CMake as its build automation system. To download and run gravity, please follow these steps: -- Clone the repository `git clone https://github.com/0xdeadbeer/gravity` -- Create a build directory `mkdir build` -- Go into the build directory `cd build` -- Generate build files `cmake ..` -- Compile project `make all` -- Run `./gravity` -- Enjoy - -## Contributions - -We highly encourage playing around with the software and contributing to the project. -Before opening a pull request, the contributor is expected to open an issue in which they thoroughly describe the issue (or feature) they're solving (or implementing). - -## License - -Gravity is licensed under the GPL-3.0 license. See the `LICENSE` file for more information. diff --git a/gravity.c b/gravity.c index fd24bdf..f475d69 100644 --- a/gravity.c +++ b/gravity.c @@ -445,7 +445,6 @@ int main(int argc, char **argv) { struct object *a = create_object(100000000.0f, sphere_model); struct object *b = create_object(100000.0f, sphere_model); - struct object *c = create_object(10000000.0f, sphere_model); float distance = -500.0f; vec4 a_pos = {0.0f, 0.0f, distance, 0.0f}; @@ -458,15 +457,11 @@ int main(int argc, char **argv) { // vec4 b_pos = {0.0f, -75.0f, -150.0f, 0.0f}; // glm_vec4_add(b->position, b_pos, b->position); - vec4 c_pos = {-100.0f, -400.0f, distance, 0.0f}; - glm_vec4_add(c->position, c_pos, c->position); - float n = 0.05f; vec3 b_boost = {-70*n, 0.0f, 0.0f}; glm_vec3_add(b->translation_force, b_boost , b->translation_force); - glm_vec3_add(c->translation_force, b_boost , c->translation_force); // b->scale = 2.0f; a->scale = 5.0f;