For this assignment, you will implement the Marching Cubes algorithm on two yellow spheres which collide with each other.
This project involves two spheres. The first sphere moves a limited horizontal distance while the second sphere remains at rest. The moving sphere will collide with the sphere at rest. Since you will be implementing the marching cubes algorithm to approximate the shape of each sphere, when the spheres collide, they should appear to morph together into one blobby volumentric object. Note: the spheres in my code are NOT equal in radius.
Please use my code called http://www.cs.sjsu.edu/~bruce/programs/spring_2016_cs116b/marching_cubes/marching_cubes_template.c as the basis for this assignment.
I've created a makefile to build the project as well. You may download the makefile for my code at http://www.cs.sjsu.edu/~bruce/programs/spring_2016_cs116b/marching_cubes/Makefile. Save the downloaded file as Makefile (not Makefile.txt)
To build my sample code, copy to a local directory on your computer. In the directory where the source code and makefile are located, type the following command in a shell or terminal window:
make
Example output when I invoke the makefile
rob@laptop ~/progs/cs-116B/marching_cubes_template $ make
gcc -c marching_cubes_template.c -o marching_cubes_template.o
gcc -o marching_cubes_template marching_cubes_template.o -lglut -lGL -lGLU -lX11 -lXmu -lXi -lm
You may reference and use code from Paul Bourke's example marching cubes implementation (marchingsource.cpp) for this assignment at http://paulbourke.net/geometry/polygonise/marchingsource.cpp. Mr. Bourke has posted a detailed writeup about his program on his website at: http://paulbourke.net/geometry/polygonise/
I have created a makefile to build marchingsource.cpp at http://www.cs.sjsu.edu/~bruce/programs/spring_2016_cs116b/marchingsource/Makefile
1. Please submit your program as a text file to the Canvas dropbox. I only need the source code. I will build the program myself.
2. Please name your program using the following naming convention:
Lastname_Firstname_assignment_1.c (for C programs)
Lastname_Firstname_assignment_1.cpp (for C++ programs)
Lastname_Firstname_assignment_1.java (for Java programs)
For example, my name is Rob Bruce. If I write my program in the C programming language, my assignment 1 should be named: Bruce_Rob_assignment_1.c
3. Please include your name as a comment at the beginning of your program like this:
/* Rob Bruce */
or this:
// Rob Bruce
4. I usually do not need a makefile to build your programs, regardless of language; however, in the unlikely event that I cannot build your project, I will send an email inquiry as appropriate.
5. I expect your program to build without syntax errors.
6. I expect your program to execute without run-time errors.
Points will be deducted for any program that does not meet the specification as outlined above.
Assignments submitted after the due date will be worth, at most, 5 points. Additional points will be deducted for programs not meeting the specification as outlined above.
Spring 2016, CS-116B:
Lectures
Assignments: