https://github.com/amir-kedis/c-3dcube
3D cube rotating in 3D in C lang made as a from of escapism of my final exams
https://github.com/amir-kedis/c-3dcube
Last synced: 5 months ago
JSON representation
3D cube rotating in 3D in C lang made as a from of escapism of my final exams
- Host: GitHub
- URL: https://github.com/amir-kedis/c-3dcube
- Owner: amir-kedis
- Created: 2024-05-28T17:13:02.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-29T05:22:55.000Z (about 1 year ago)
- Last Synced: 2025-01-08T07:44:35.059Z (6 months ago)
- Language: C
- Size: 3.91 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 3D cube rotating in space written in C with raylib
> [!IMPORTANT]
> This project and other similar ones are made as a form of escapism from my final exams in college **Series now includes: Conway game of life, 3D cube**### first try
https://github.com/amir-kedis/C-3dCube/assets/88613195/712bb6a3-8217-4692-8524-5a219ebec97e- here I tried to control the object's rotation by changing the Carizian coordinates which didn't give me the results I wanted for rotation.
### second try
https://github.com/amir-kedis/C-3dCube/assets/88613195/2a312801-45dc-4a2f-bb76-9bb8c01c8f2c- after that, I made a coordinate transformation using spherical coordination, which worked better.
- ## Controls
- `D` and `A` -> change theta -> rotate around the y-axis (left-right)
- `W` and `S` -> change phi -> rotate around the x-axis (up-down)
- `Q` and `E` -> change r -> change the magnitude (zoom)