# Assignment 1

Here are some additional details about the exercises :

**Implementation details:**

You are not restricted to use C++ or CGAL, but in case you use other tools, please specify how to run the given program, and preferably provide an executable file (for example, *.jar file in java).

### Exercise 1.1

**Input: **

The input for your program will be as follows:

- x, y and z Dimensions (in that order), Source and destination locations (in that order).
- 3 matrices representing the xy, yz and zx faces. 0 represents a free location and 1 represents a forbidden location.

Here is the input file for Oskar standard board: oskar_input.txt

**Output:**

The output is a series of commands that should bring Oskar from the source location to the destination location without passing through forbidden locations:

0 – move one unit along the x-axis in the positive direction

1 – move one unit along the x-axis in the negative direction

2 – move one unit along the y-axis in the positive direction

3 – move one unit along the y-axis in the negative direction

4 – move one unit along the z-axis in the positive direction

5 – move one unit along the z-axis in the negative direction

**Oskar applet:**

http://www.cs.tau.ac.il/~efif/applications/puzzles/

To use the applet you must install the required plug-in.

To move Oskar:

- Put the output of your program in the Sequence text box (there should be brackets as in the example there. Example: [4 4 5 1 2 3 4 0])
- Press the "Set Sequence" button.
- Press the yellow circle in the applet.

### Exercise 1.3

**Input format:**

Your program has to support input files of the following format:

m //number of vertices of P x1 y1 x2 y2 ... xm ym //vertices of P n //number of vertices of Q x1 y1 x2 y2 ... xn yn //vertices of Q

where xi yi are double numbers representing the i'th vertex of P or Q. n,m are integers.

The program has to return the result in the same format.

**
Submission:**

Send your source code to kirilsol@post.tau.ac.il with the mail title "ASSIGNMENT1". State your names, IDs and how to run the program.