Posts

Showing posts from April, 2020

HW1

Image
CSE 168 HW1, no doubt as mentioned in the email, is the hardest programing assignment I have ever done in UCSD. If I have not started during the spring break, I don't think I would be able to finish it. This is probably the most physics based assignment I have ever done. The part that took the longest for me is the acceleration structure. I will talk about the general implementation of my nxnxn grid. The x and y coordinate represents the array indices of the grid First of all, the grid itself is considered as a bounding box with a vec3 min and vec3 max. The min and max are determined by the min coordinate of all objects in the scene. In the 2D example above, I have triangle a and sphere b. They both have their bounding boxes. The bounding box of triangle is calculate using the minimum and maximum of three vertices coordinates.  The bounding box of sphere is required the the radius after transformation. For ellipsoid, however, the scaling factor