Skip to content

Rohit8y/CG-subDivisionSplines

Repository files navigation

Assignment 1: - Subdivision curves

MA: Tessellated quadratic and cubic B-splines:

The logic of quadratic and cubic b-spline is implemented in Tessellation Evaluation Shader. To define if we have to run quadratic or cubic b-splines, manual changes are required in the TCS (output layout = n)and TES file(type = 4 or 5). The TCS and TES file has proper documentation about this.

The image given below has GPU tessellation with # of Isolines = 52 for Pentagon shape:

abc

The image given below has GPU tessellation with # of Isolines = 10 for Basis shape:

abc

And, the image given below has GPU tessellation with # of Isolines = 20 for G shape:

abc

MA: General curve subdivision on CPU:

The "CPU Subdivision" checkbox in the UI generates subdivison for the given shape. The "subdivision steps" value increase the subdivision steps, resulting in higher number of control points. The mask value can be changed from the UI option as well.

The image given below has has subdivision for mask 14641, with subdivision steps = 4 for shape Pentagon abc And, the image given below has has subdivision for mask 14641, with subdivision steps = 2 for shape Basis abc And, the image given below has has subdivision for mask 14641, with subdivision steps = 8 for shape G abc When we change the mask to 1331 for shape Basis with subdiv steps: 5 , we get abc

MA: Incorporate the geometry shader:

The curvature comb is implemented by creating a new Geometry shader program. The results for this for Pentagon and basis shape are given below: abc

abc

AF: Visualise control point influence:

To implement this additional feature I created a new renderer and while running this make sure that control net is not checked. When one of the control points is clicked, the influence of this point is highlighted with pink color. The results of this are given below:

abc abc

About

Computer Graphics: Splines Subdivision

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published