A Rust-based computer graphics repository for course exercises, experiments, and project records.
This repository is used to store multiple computer graphics assignments and examples developed during the course.
The current project includes a Hello Triangle example, which opens a window and renders a triangle with RGB vertex color interpolation.
This program renders a triangle with three vertex colors:
- Red
- Green
- Blue
The color inside the triangle is smoothly interpolated between the three vertices, reproducing the classic Hello Triangle style commonly used in introductory computer graphics examples.
- Window creation in Rust
- Triangle rendering
- RGB vertex color interpolation
- Minimal and beginner-friendly graphics example
- Easy dependency management with Cargo
- Suitable for computer graphics coursework and practice
- OS: Windows 11
- Rust:
rustc 1.94.0 (4a4ef493e 2026-03-02) - Cargo:
cargo 1.94.0 (85eff7c80 2026-01-15)
Install Rust from the official website:
https://rustup.rs
After installation, verify the environment:
rustc --version
cargo --versiongit clone https://github.com/1abhax/computer-graphics-rust
cd rust-graphicscargo buildcargo runOr with optimizations:
cargo run --releaserust-graphics/
├── Cargo.toml
├── src/
│ └── main.rs
├── imgs/
│ └── triangle.png
└── README.md