Developed a program that implements the Marching Cubes algorithm to generate isosurfaces from 3D scalar field data. The system reads a binary 3D array of floating-point values and produces a polygonal mesh (PolySet) representing surfaces within the dataset that meet a user-specified threshold.
The program supports configurable input parameters, including a threshold value for surface extraction and an optional surface normal generation flag to enhance rendering and lighting effects. Data input is read in plane-major, row-major order, with full support for little-endian binary float files, allowing the program to efficiently process volumetric datasets of varying resolutions.
The algorithm iterates through the dataset voxel by voxel, determining how each voxel’s vertices relate to the threshold. Using a table-driven approach, the program maps voxel configurations to their corresponding triangle topologies, dynamically constructing the surface mesh. The implementation supports the 102 core voxel cases necessary for accurately rendering spherical and curved surfaces.
Key implementation features include:
Efficient voxel traversal and pattern matching for generating isosurface geometry.
Edge interpolation functions to calculate threshold crossing points along voxel edges.
Gradient and normal computation for smooth surface shading.
Modular functions for vertex management, triangle generation, and surface construction.
This project demonstrates proficiency in 3D graphics programming, computational geometry, and data visualization, as well as strong skills in algorithmic problem-solving, data structure management, and low-level data handling in binary file formats.
Visual representation of each case to be implemented in the marching cubes algorithm.
Progress picture with partial case implementation.
Progress picture of debugging the holes from incorrect vortex mapping.
Finalized implementation of the algorithm.
Developed and integrated Bezier curve and surface rendering capabilities into the rd_view rendering engine, expanding its ability to visualize smooth parametric geometry in 3D scenes. The project implemented the De Casteljau subdivision algorithm to generate smooth curves and surfaces through recursive interpolation of control points, using dynamic resolution controlled by the n_divisions global parameter.
The program introduces two core rendering routines — render_bezier_curve() and render_bezier_patch() — which are automatically invoked by the renderer to construct Bezier curves and patches from control points. Each routine utilizes the system’s meta-attribute architecture (meta_attribute, data_m_attr, render_m_attr) to correctly manage vertex data such as position, color, and shading attributes within the renderer’s internal structures.
For Bezier curves, the program subdivides the control polygon into fine linear segments, sending each interpolated point to the rendering pipeline using the line_pipeline() function to produce smooth, high-fidelity curves.
For Bezier patches, the implementation generates a grid of surface points over the parameter domain, interpolates their 3D positions, and forms polygons passed to the poly_pipeline() for shaded rendering. The patch renderer computes both per-polygon normals (poly_normal) and per-vertex normals (via render_m_attr.normal) to enable smooth shading and lighting across surfaces.
Additional features include:
Dynamic control over curve and patch smoothness through OptionReal "Divisions".
Support for interpolated shading and normal vector computation for realistic surface lighting.
Optional rendering of control polygons and built-in ray tracing compatibility with the RD rendering engine.
Integration within the render_direct namespace for modular linkage with the existing libcs630.a graphics library.
This project demonstrates advanced skills in computer graphics programming, mathematical modeling of curves and surfaces, rendering pipeline integration, and 3D visualization techniques, while reinforcing understanding of parametric geometry, interpolation, and normal vector computation.
Bezier patches with normals disabled.
Bezier patches with normals enabled, giving the surfaces a smooth finish.
My artistic use of Bezier Surfaces, a 3D model of my teeth. Began by creating each individual gum, created a tooth to match that was then slid inside the gum, then mirrored the gum-tooth pair across the y-axis. Scared many library occupants while working on this project.
Developed multiple 3D graphics rendering components to demonstrate dynamic simulation, geometric modeling, and surface parameterization techniques within a real-time rendering environment. The project consisted of three major parts: a dynamic particle system, a static particle system, and the implementation of superquadric primitives (spheres and tori) within the rd_view rendering engine.
The dynamic particle system simulated time-based behaviors such as fountains, explosions, or smoke, featuring more than 200 particles that evolved in position, color, or velocity over time. Each particle’s transformation was governed by mathematical models for motion, gravity, and randomness, producing smooth, continuous animation of natural phenomena. Unfortunately, did not record photos or videos of this portion of the project, but my implementation was of snow rushing past as if the viewer was looking up while riding a bike through a storm in the middle of winter.
The static particle system generated complex geometric objects like grass or hair, where the particle trajectories were recorded and used to define the structure of a static model. This system emphasized vertex control, path tracing, and the conversion of particle movement into permanent mesh geometry, resulting in realistic, non-animated objects composed of 200+ vertices.
In addition, implemented superquadric primitives — superquadric spheres and superquadric tori — by extending standard parametric equations of spheres and tori with north (n) and east (e) exponents to control curvature and shape. These equations were evaluated across parameter ranges to generate vertex grids, which were then passed to the rendering engine via the poly_pipeline() for shaded polygonal rendering. Each superquadric included polygon normal calculations (poly_normal) for accurate lighting effects.
Both superquadrics were implemented through the functions REDirect::rd_sqsphere() and REDirect::rd_sqtorus(), with support for adjustable parameters such as radii, curvature exponents, and subdivision levels (n_divisions). Integration with the meta_attribute system ensured that geometry, normal, and shading data were correctly mapped for rendering consistency.
This project demonstrates proficiency in computer graphics programming, geometric modeling, and real-time rendering, as well as hands-on experience with parametric surface equations, particle dynamics, 3D transformations, and shading pipeline integration.
Visual showing superquadratic implementation in the form of donuts. The creator must have been hungry...
Static particle system meant to simulate moss growth. Spheres of varying shapes and colors were distributed in 20 clusters on the screen with a variable chance of flowers (who also ranged in size). Clusters, shapes, and colors were normally distributed in the space.
Developed a program to generate and visualize 3D fractal terrain models using the midpoint displacement and perturbation algorithm, outputting the final terrain as a PolySet for rendering within the RD visualization framework. The program procedurally creates natural-looking landscapes based on user-defined mathematical and randomization parameters, demonstrating both algorithmic design and geometric modeling proficiency.
The program accepts user inputs for:
n – the grid resolution, generating a mesh of size (2ⁿ + 1) × (2ⁿ + 1);
D – the fractal dimension (between 2.0 and 3.0), controlling terrain roughness;
s – the random seed for reproducible generation;
σ (sigma) – the initial standard deviation, controlling the magnitude of height perturbations.
Using these parameters, the algorithm recursively subdivides a square terrain region, applying random Gaussian perturbations to the midpoints and edges at each level. The variance of displacement decreases according to the relation
varianceₖ = varianceₖ₋₁ × (0.5)^(0.5 × H), where H = 3 – D,
ensuring realistic self-similar fractal patterns as the terrain refines.
The resulting grid spans 100 world units across both the x and y directions, independent of the subdivision depth, and produces smoothly interpolated height fields that exhibit varying degrees of roughness and realism depending on the fractal dimension.
To enhance realism, the program utilizes the “PC” vertex type in the PolySet, assigning color gradients based on vertex height — e.g., green for low elevations and white for peaks — allowing visual distinction of topographic variation when rendered.
This project showcases strong skills in procedural generation, fractal geometry, mathematical modeling, and 3D graphics programming, as well as practical experience in random number generation, numerical stability, and recursive algorithms for visual computing applications.