lyc's avatar
yeah i do simulate a sort of idealised (thin lens) camera, which has a circular aperture causing the depth of field blurring and blooming (very bright lights some distance away bloom into beautiful circles).

about learning to do this stuff, you need to start with the basic monte carlo theory. you can easily teach yourself, and once you have applying it to really nasty and complex integrals is relatively simple; as a first exercise, implement the algorithm proposed by paul bourke to approximate the area of intersecting circles described here: [link]

after that, do some measurements: compute a super accurate area (a reference value), then see how the error decreases as a function of the number of samples you took. now that you have that error measuring in place, implement stratified/jittered sampling, and see how its error graph works. once you've got these methods down pat, i'll show you the most powerful method of all (importance sampling), and then we can get you started on a 2d ray tracer - that's a lot of fun and will teach you basically everything.
chaos5's avatar
:w00t:
This is exactly what I needed. A starting point! Thanks so much for a nudge in the right direction. I'll start with the algorithm by Bourke. I don’t know how long it will take, I haven’t read it yet. I'm just excited about actually having something tangible to work on.

Thanks again!!
lyc's avatar
no problem, both that article by bourke (read his whole website) and writing a 2d tracer are extremely low hanging fruit.

who knows, one day i may also induct you to my Church of Monte Carlo Methodists ;)