A basic 3D viewer written in Rust for rotating, zooming, and loading .obj
files.
- Rotate the 3D model.
- Zoom in and out.
- Load
.obj
files dynamically.
Key/Mouse | Action |
---|---|
Left Click + Drag | Rotate the model |
Space | Toggle auto-rotation |
B | Change background color |
M | Change object color |
Up / + | Zoom in |
Down / - | Zoom out |
L | Load a new .obj file |
Escape | Exit the program |
demo.mp4
The 3D point ((x, y, z)) is rotated using standard rotation matrices:
- X-axis Rotation:
- Perspective Projection: