COS 426, Spring 2011
Nader Al-Naji, nbal



List of Implemented Features

I believe that I have implemented the following features, which are worth a total of 22 points:

Demonstration of Implemented Features

Per-Vertex Normals


Cube

Cheetah
Normals calculated by traversing half-edges for each vertex. To view these
uncomment the call to UpdateNormal() in the UpdateVertexNormals() function.


Gaussian Curvatures


Firefly-Human

Moo
Curvatures calculated by traversing half-edges for each vertex.
First the area associated with each vertex was calculated, then the
angle of deflection. The resulting value was then simply the area
over the angle of deflection. Black vertices indicate concavity (c > 0)
and blue vertices indicate convexity (c < 0). To view these, uncomment
the call to UpdateCurvature() in the UpdateVertexCurvatures() function.


Random Noise

meshpro input/meshname.off output/meshname_randomnoise_factor.off -noise factor

Input

0.4

0.8
Each vertex moved by a random amount determined by the
average length of its adjacent edges.


Inflate

meshpro input/meshname_in.off output/meshname_out.off -inflate factor

Input

0.5

1

3
Each vertex moved outward along its normal by a factor
determined by its average length and a user-specified value.


Fun (Swirl Warp)

meshpro input/meshname_in.off output/meshname_out.off -fun

Input

Swirled
Each vertex is rotated in space by an angle determined by
how far away it is from a central axis.


Smooth

meshpro input/meshname_in.off output/meshname_out.off -smooth 

Input

-smooth -smooth

-smooth -smooth -smooth -smooth
Each vertex is moved to a position determined by a linear
combination of itself and its adjacent vertices.


Sharpen

meshpro input/meshname_in.off output/meshname_out.off -sharpen factor

Input

-sharpen -sharpen

-sharpen -sharpen -sharpen -sharpen
This is similar to smoothing except that the metric used to move vertices is reversed.


Truncate

meshpro input/meshname_in.off output/meshname_out.off -truncate factor

Cube

Truncate .5

Surface of Revolution
(made with -revolution)

Truncate .3
For each vertex, create a set of new vertices a distance t (given by user)
along its outgoing edges. Remove the original vertex and add a face connecting
the new vertices created together. Here this is shown on a cube and a surface
of revolution.


Split Faces

meshpro input/meshname_in.off output/meshname_out.off -split 

Input
(inside a cube)

-split

-split -split

-split -split -split
Create V+1 faces for each face in the original mesh by splitting the edges of each
face and connecting the newly created vertices together. Shown here is the
result of applying this process multiple times on a cube. The face is being
shown from the inside to avoid overlapping lines from the camera's perspective.


Loop Subdivision

meshpro input/meshname_in.off output/meshname_out.off -loop

Input

-loop

-loop -loop

-loop -loop -loop
Split the faces of the mesh and then move vertices by an amount determined
by predefined weights.


Surface of Revolution

meshpro input/meshname_in.off output/meshname_out.off -revolution        

Semi-Circle

Wine-Glass Profile

Wine-Glass Profile
(after -truncate .5)
Create a surface by rotating a profile curve along an axis using a given angle
step size. Here the wine-glass is then truncated to show that the rotation
preserves the integrity of the half-edge data structure used.

Note: this output was much easier to generate by hardcoding the arguments-- that is by putting a
call to the method in the code and running it. If you'd like to produce the same
output as seen here, rather than runing it using the command, simply uncomment the
portion of ReadOff marked UNCOMMENT FOR SURFACE OF REVOLUTION
and give it a profile as a mesh.


Surface Sweep

meshpro input/meshname_in.off output/meshname_out.off -sweep factor

Semi-Circle Along Perpendicular Semi-Circle

Semi-Circle Along Parallel Semi-Circle
Sweep a profile curve along another profile curve to produce a mesh.

Note: this output, as above, was easier to generate by circumventing
the command-line and hard-coding in the arguments. If you'd like to
produce the same image, simply uncomment the UNCOMMENT FOR SURFACESWEEP
portion of ReadOff and give it two profile curves.


Art Contest Submission


This swirl reminds me of an episode of the twilight-zone so I'm making
it my art contest submission.


Feedback

How long did you spend on this assignment?
I could have spent longer.
 
Was it too hard, too easy, or just right?
It was perfect.
 
What was the best part of the assignment?
I really liked Truncate and Loop Subdivision.
 
What was the worst part of the assignment?
Bug-hunting.
 
How could it be improved for next year?
Whatever you do, don't give them the half-edge data
structure. Figuring that out was arguably the most
enriching part of the assignment.