CSC352 Homework 2 2013

From dftwiki3
Revision as of 17:23, 20 September 2013 by Thiebaut (talk | contribs) (Time to Play!)
Jump to: navigation, search

--D. Thiebaut (talk) 17:10, 20 September 2013 (EDT)


Page under construction!
UnderConstruction.jpg

Multithreaded Packing

The idea for this homework is simple. You get a Processing application that is highly serial and that packs rectangles into a rectangular applet, and you make it parallel by adding a thread that generates packed rectangles, i.e. rectangles that are positioned in the area of the applet in such a way that they touch each other but do not overlap, and at the same time minimize the wasted area.


First, Get the Code


Two different versions of the initial code is available to you. One to run in the native Processing IDE, the other to run with Eclipse (which you are highly encourage to use--Eclipse is a bit tough to setup to run with Processing apps, but one you are done, you benefit from the great features of Eclipse).

The two different versions are available below (but only accessible from Smith campus computers. If you are off-campus, please email me).


This section is only visible to computers located at Smith College

If you go with the native Processing app, just download the *IDE.tgz file and unpack it in a Terminal window on your Mac:

  tar xzvf nameOfTheTgzFile

You will get a new directory called PackingHw2. That's your sketch. Open it with the Processing IDE, and run PackingHw2. You should get a blank applet opened in front of you.

If you go with the Eclipse version (good on you!), then download it and unpack it similarly. You can then import it as File System into your workspace. The main application is PackingHw2. Just run it and you should have a blank applet in front of you.


Time to Play!


Once you have the appet opened in front of you, press the ENTER key a few times. You should see some pink rectangles appear on the screen.

CSC352Homework2 2013 Packing1.png