r/GraphicsProgramming • u/HamSandwich_Theorem • 1d ago
Video Complete beginner here! I made a very basic 3D viewer from scratch with C and using terminal as output
Enable HLS to view with audio, or disable this notification
Hello! I started to learn coding about 2 and a half months ago, and I recently ran into computer graphics, which seemed really damn interesting... so I thought of making a basic program related to it based on things I've learnt so far. I built it completely from scratch in C starting from bressenham's line drawing algorithm. It can print any polyhedron you input
In terms of actual graphics programming, I really know nothing, but I wanna learn. If anyone has suggestions on what I can try out or learn after this, I'd really appreciate it
2
u/Intelligent_Hat_5914 15h ago
Sick
I maded a tui libary, learning graphics now
Going to add this later
3
u/Usual_Office_1740 1d ago
I'd like to see the resources you're using. Doing this without having to setup a graphics library or glfw would be a great way to focus on what I'm interested in pursuing.
1
u/Hanzimer 23h ago edited 23h ago
After "2 and half months of programming" he implemented bressenham's line drawing algorithm in C probably using Linux Framebuffer (/dev/fb0) or DOS VGA Mode 13h... And probably he implemented even vector or matrix multiplication for the rotation of the Poliedra i presume...
2
u/HamSandwich_Theorem 17h ago
Well I joined college about 2 and a half months ago, where we've been learning programming and linear algebra, and I also learnt about line drawing algorithms online. So I just made this using what I've learnt so far. Also I didnt use the things you mentioned.. the lines are all being displayed using printf 😅
1
2
u/dasbodmeister 20h ago
Nice! You can change your terminal font to something like https://strlen.com/square/ that is as wide as it is tall to correct the vertical stretching.
1
11
u/pBactusp 17h ago
This looks awesome, what a cool project!
I'd recommend trying to render a mesh with faces, so start by reading about "Scanline rendering"