diff options
author | Krow Savcik <krow@savcik.xyz> | 2023-12-25 12:20:59 +0200 |
---|---|---|
committer | Krow Savcik <krow@savcik.xyz> | 2023-12-25 12:20:59 +0200 |
commit | fb26949fe3c1b6145f1c77af2198d999a856cd37 (patch) | |
tree | 4c73c35d0fa4d6083373a0369c47bd5a3be0d885 /README.md |
initial commit
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..0c5108a --- /dev/null +++ b/README.md @@ -0,0 +1,41 @@ +# 3D triangle renderer + +Short interactive C program for rendering 3D triangles. + +## Compiling + +The only requirement are the SDL2 devel files. + +```sh +make +``` + +## Controls + +- **W,A,S,D** for moving. +- **M** for toggling mouse-lock. +- **arrows** for rotating camera. +- **J,K** for moving vertically. +- **I** for object importing. +- **=/-** for increasing/decreasing speed. + +## Object files + +Object files are a modified/simplified version of standard .obj files. +Available potions are the following: + +1. **M** *factor* - multiply factor. Vertices added will have their coordinates multiplied. +2. **v** *x* *y* *z* - add vertex. +3. **f** *v1* *v2* *v3* - add triangle face with following vertices. +4. **F** *v1* *v2* *v3* *color* - add triangle face with color and following vertices. + +Lines that start with any other character will be ignored. + +## TO-DO List + +- use matrix math instead of trigonometric formulas. +- crop triangles close to screen. +- fix Z depth. +- faster drawing. +- config file with controls and defines. +- organize functions in files properly. |