# 3D Renderer, in Rust This is an experiment of self-learning to achieve the following objectives: - [X] Render a list of 2D vertices - [X] Connect vertices by lines to render wireframe drawing - [X] Use proper shape definitions (faces, translations, rotations) - [ ] Implement a shader to fill in face pixels - [ ] Read in a standard 3D file format (.obj?) - [ ] Anaglyph rendering - [ ] Read input events via stdin ## Purpose I'd like to know how to use Rust constructs more creatively, and get to know the language better. I would also like to figure out how to write a 3D renderer from scratch; I have no prior experience with 3D graphics, except for a small Fez game map that I wrote in JavaScript a few years prior. ## Design This renderer will follow the traditional Unix philosophy of doing one thing well: rendering a 3D scene. Input events will be handled over stdin, and output will be sent to stdout. In its current state, the renderer generates raw bitmap pictures for each frame. These are sent to stdout, where a separate application (like `ffplay`) should be used to process those images. ## Running The renderer produces a bitmap image in the RGB byte format. Each color component is 8 bits long (0-255). The author prefers to use `ffplay` because he is comforatble with it. It is important to run an optimized binary, because many loops will run slowly without proper optimization from the compiler. All operations are CPU-bound. `cargo run --release --quiet | ffplay -f rawvideo -video_size 320x240 -pixel_format rgb24 -framerate 60 -` ## License 3D Renderer Copyright © 2017 Davis Remmel This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see .