Assignment 1: Marching squares
DATE DUE: February 20, 2017
Points possible: 10 points
CS-116B: Computer Graphics Algorithms
Instructor: Robert Bruce

OVERVIEW

For this assignment, you will implement the Marching Squares algorithm on eight yellow circles which collide with each other randomly.

SPECIFICATIONS

This project involves eight circles that move around the screen randomly. Since you will be implementing the marching squares algorithm to approximate the shape of each sphere, when the spheres collide, they should appear to morph together into one blobby two-dimensional object. Note: the spheres in my code are equal in radius. I suggest trying different sizes for your marching squares. As you reduce the size of the square, the blobby object you create will be less aliased (stair-step effect). Experiment with different square sizes. I suggest a square size of 10 pixels by 10 pixels but you may use different pixel sizes if that that does not work well. You may use a higher screen resolution for the canvas size of your drawing screen if you wish as well. You do not need to use the same aspect ratio for your screen resolution as I have.

Please use my code called http://www.cs.sjsu.edu/~bruce/programs/spring_2017_cs116b/marching_squares/marching_squares.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_2017_cs116b/marching_squares/Makefile. Save the downloaded file as Makefile (not Makefile.txt)

An excellent reference for marching squares is Jamie Wong's website at: http://jamie-wong.com/2014/08/19/metaballs-and-marching-squares/ Please do NOT cut-and-paste any program from Jamie Wong's website. I want to see you implement this code yourself.

SUBMITTING YOUR PROGRAM

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)

3. Please include your name as a comment at the beginning of your program.

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.

GRADING

Points will be deducted for any program that does not meet the specification as outlined above.

LATE ASSIGNMENTS

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.