How ronaldo-dck/render3d works
Render3D is a Pygame application for drawing 2D polylines and revolving them into editable 3D models. The main workflow is user input in the 2D scene, scene switching in the application loop, then mesh creation and 3D rendering. Separate components cover camera/projection, clipping, lighting, and matrix transforms. The shown excerpts establish the core scene, geometry, and math relationships; some 3D integrations are only visible as imports or in omitted code, so those links are not asserted.
Main entry points: Cena3D.py 3D scene · init.py Scene controller · Objeto3d.py Revolved mesh · Cena2D.py Polyline drawing
Components 12
Scene workflow
- Scene controller
init.py - Polyline drawing
Cena2D.py
3D rendering
- 3D scene
Cena3D.py - Rasterization and buffers
Cena3D.py
Geometry and transforms
- Revolved mesh
Objeto3d.py - Face visibility
Objeto3d.py - Matrix operations
matrix_functions.py
View and clipping
- Camera controls
camera.py - Projection
camera.py - Polygon clipping
recorte2d.py
Lighting
- Phong lighting
luz.py
Other components
- User
Connections 13
- User → Scene controller: starts
README.md - Scene controller → Polyline drawing: runs
init.py - Polyline drawing → Scene controller: returns polylines
Cena2D.py - Scene controller → 3D scene: creates with polylines
init.py - Scene controller → 3D scene: runs scene
init.py - 3D scene → Revolved mesh: creates meshes
Cena3D.py - 3D scene → Rasterization and buffers: rasterizes faces
Cena3D.py - 3D scene → Phong lighting: calculates shading
Cena3D.py - 3D scene → Camera controls
Cena3D.py - 3D scene → Polygon clipping
Cena3D.py - Revolved mesh → Face visibility: builds faces
Objeto3d.py - Revolved mesh → Matrix operations: transforms vertices
Objeto3d.py - Camera controls → Matrix operations: normalizes vectors
camera.py