Bouncing Logo

HI! I'M STEVEN LU

FRESHMAN FROM UNIVERSITY OF CALIFORNIA, DAVIS

About These Projects

This collection represents some explorations at applied mathematics, starting from my early high school years. I made them into three categories:

A notable achievement across these projects is the 3D projection algorithm, which originated from a calculus project and has since evolved significantly. Even after Desmos introduced their official 3D graphing calculator, this algorithm continues to offer unique capabilities, particularly in specialized projections and interactive applications.

Scroll down to learn more about the projection algorithm!

Click the buttons to load/unload each graph:

Fisheye Lenses

An interactive demonstration of different fisheye lens projections, showcasing how various lens types distort 3D space.

Ray Diagram

A visualization of light ray behavior through different optical elements, helping understand principles of geometric optics.

About the Projection Algorithm

Before Desmos introduced their 3D graphing calculator, I had the idea to create an algorithm to visualize 3D objects in Desmos's 2D environment.

Originally designed for an end of year calculus project, it was quite verbose and only supported orthographic projection. More than a year later, I revisited the project and significantly improved it, condensing the entire projection process into a single elegant formula and adding support for perspective views:

The formula takes a point in 3D space \((x,y,z)\) and projects it onto a 2D plane. The viewing direction is controlled by two angles: \(\theta_p\) for horizontal orientation and \(\phi_p\) for vertical orientation. The perspective effect is controlled by a parameter \(P\) (where \(P \geq 0\)), with \(P = 0\) resulting in a parallel projection.

Continuing my exploration of computer visualization, I became fascinated by fisheye perspectives another day. Building upon the formula above, I developed a new formula that projects 3D coordinates in fisheye perspectives:

\(r\) in this equation represents the distance at the image plane measured from the lens's optical axis, which is a parameter that varies for different fisheye lenses: \(2f\tan(\theta/2)\) for stereographic, \(f\theta\) for equidistant, \(2f\sin(\theta/2)\) for equisolid angle, and \(f\sin(\theta)\) for orthographic, or simply \(f\tan(\theta)\) for rectilinear, where \(f\) is the focal length, and \(\theta\) is the angle of the point from the lens's optical axis (entrance angle, to be more precise). \(\theta\) also has a beautiful formula:

The elegance of these formulas lies in their versatility. By adjusting just a few parameters, the algorithm can switch between parallel projection, perspective view, and various fisheye distortions. What began as a calculus project has evolved into a comprehensive visualization system that can handle complex 3D transformations - all within the constraints of Desmos's 2D environment. Though I must admit, there's a certain irony in creating a 3D projection system while Desmos has their official 3D calculator. At least my algorithm still has the unique advantage of fisheye projections!

emoji