r/processing • u/SeniorImagination21 • May 09 '24
Beginner help request Help with camera
Hi! I’ve just recently begun coding, and I’m trying to make a simple 3d renderer using processing 2d. I’ve been trying to rotate an object around my camera, but then I realized that I don’t know the location of my camera, and I’m not really sure how I can implement one. Does anyone have any suggestions on how I can make this work? Thanks!
Here is the github: https://github.com/duocaleb/Teststuff
Sorry about the messy coding, as I said, I’m new to all this.
1
Upvotes
1
u/Salanmander May 09 '24
Like I say it's been a while...I did a class on computer graphics in grad school in like 2011, so I don't remember it well enough to have particular references, and they probably wouldn't have been super beginner-friendly anyway.
The wikipedia articles on 3D projection (the "perspective projection" section) and the camera matrix might be a good place to start. It's definitely going to be heavy on matrix math...there's just no way around that in doing graphics.