These are some basics of the camera obscura on wiki…..
This is the physics behind light forming an image and the math associated with aperture…
A camera obscura is a step away from a pinhole camera….just add film. Here’s another diagram and some more directions on the pinhole camera…..
extra credit for trying this one as a camera obscura…..
And finally – this article has some exceptional state-of-the-experimental-art of pinhole photos.
And here is the largest!