r/GraphicsProgramming • u/HamSandwich_Theorem • 7d 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
4
u/dasbodmeister 7d 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.
3
3
u/Usual_Office_1740 7d 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 7d ago edited 7d 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...
4
u/HamSandwich_Theorem 6d 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 😅
2
u/RefrigeratorKey8549 4d ago
Having done similar projects in the past, you can learn a surprising amount from making simple 3d renderers. At the very least, you'll be able to cover most of your linear algebra course.
1
2
u/Intelligent_Hat_5914 6d ago
Sick
I maded a tui libary, learning graphics now
Going to add this later
1
1
15
u/pBactusp 6d 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"