First Assignment

"Where am I ?"

When you are playing an orientation game/race, you have to recognise some characteristic, noticeable point (or a landmark or an identifiable feature : hill, tower, bridge ...). From those point you are able to check that your are in a given guessed point. More systematically, a GPS system will use triangulation based on satellite position to determine your "exact" coordinates.

In this assignment you will be asked to build a little software that will display on a map your computed position, taking into account the angle from which you see two or more noticeable points. You should refer to the Maths section of the lecture to get some idea about how to compute these guessed positions.

Here is a general idea of the interface of the software :

The assignment will mainly consist of a JFrame with 2 panels. One panel to display the map (and highlight the landmark and possible positions), and one panel to host a set of different sub panels (JTabbedPane), one for each different tools, accessible by the selection of the tabs.

3 default Tab

The general interface should be based on at least 3 default tabbed panes

Pane General information ("Map" ?)

This pane will display as much information as possible from the configuration file. It should display at least

If you think you could add more information, without losing visibility, you may think to add, within that pane, or in an associated popup frame (accessible trough a "more Info" button for instance)

Pane List of available landmarks ("What" ?)

This pane will display a list (JList + JScrollPane ?) of the available landmarks and their eventual selection (as being a point A, B, C, D of the measurement). On that pane, you should be able to select and highlight one landmark at a time : in the bottom part of the pane, you will display all what you know about the selected landmark : display of picture(s), description, coordinates, and a modifiable status (comboBox ?) amongst : "not used" or used as being a point "A", "B", "C" or "D". Note that if the user decide that a selected landmark should be the point A, and if another landmark A had been set previously, then the previously set landmark status return automatically to the "not used" type.

At the same time, when you select a landmark, it should be highlighted on the map, either by a pulsing circle, a cross, whatever suits your GUI design ... and its status should be set close to it (or by using a ToolTip ?). NB. Even without selecting them, there should be a discreet sign to locate them on the map as soon as you load the map.

The possible status should take into account the state of the "3 or 4" points option specified in the "Estimation" Pane (see next)

Pane Estimation of Position ("Where" ?)

This is the panel where the result are displayed !

First there is a option to select : will you use 3 or 4 landmarks (what "3" really means, is that B and C will be the same landmark)

Then, there is two way to select the landmarks, either by selecting them in the previous Pane, or by selecting them on the map, from that pane. The process is the following. You use a radio button to specify which of A, B, C or D you will select, then you click on, or close enough to a landmark to select it. If case of the "3" option, the C area is gray and can not be activated.

There will be two field that will allow you to specify the Angle you see from your position between A and B and then between C and D (4 points option) or between B and D (3 points option).

As soon as the application detect that 2 point and and the matching angle is specified, it should compute the possible set of position and display it, visually on the map (matching arc of circle) and on the pane (origin coordinates and radius).

When both 2 sets (points and angle) are set, one should get displayed both the final point on the map and the coordinate on the pane.
If you deselect any point, the matching information should of course be deleted from the map.

Ground Rules for all projects:

To submit a project ...

you should put altogether, in a directory called CG_A1_03_UstudentID...

(Where 'studentID' your student ID !... CG_A1_03 means the first assignment in Computer Graphics lecture of the year 2003)

Here is its README.html file template

Use the jar command to put your directory into a single jar file based on the same name and mail this file to

cd .. (go to the directory in which your CG_A1_03_UstudentID is located)
jar cvf CG_A1_03_UstudentID.jar CG_A1_03_UstudentID/

Mail the file (CG_A1_03_UstudentID.jar) as an attached document. Be sure that the title of your mail is 'CG_A1_03_UstudentID''

!!! Your jar file should not be more than 500 kB !!!

The minimum requirements

Your project should be composed of, or respect, at least, the following :

(1) 3 different well balanced main classes (there could be of course more, but there should not be more than 15 classes for this size of project). Explain in the README file what the role of the 3 classes are.

(2) One of the classes should be a public class, whose name will be "Assignment", and will contain the "main method" in such a way that, to test your project, I will only need to call 'java Assignment [command line arguments]' to run it. Because yours classes will be well documented, I should be able to write that "Assignment" class by myself without to much work.

(3) You will explain the use of the arguments in your README file but the main one (and the first) will be the name of  a map description file such as the one I will use to test your program  : canberraCenter.vot   ('.vot' like Virtual Orientation Table). Any map used by your program will be fully described by a similar text file, and its associated images (of the map itself and of some associated landmark). The full set of data that will be potentially used for this assignment is visible here, and downloadable here. You may find useful to have a look at the following tip.

N.B.: Don't cheat, your program should really read that file. For the marking I will use a very similar file, but with some different information and landmark points ...

E.g. : java Assignment canberraCenter.vot
will load the description file canberraCenter.vot and its associated images and display the map and related information on the first JPanel.

(4) By default, the opening window should be well positioned (you should see it entirely, but it should not use all the screen space, between half and 2/3rd of the space) whatever is the size of the screen.

(5) Remember that sometimes, users may be dumb and may not use the right number of arguments, or the good one. You should deal with that sort of situation.

(6) One peculiarity of these map displays is that the Frame should be resizable (whenever the size of the window is changed by the user, the map should always be at least partly visible and you should be able to move around my using sliders).

(7) The compile classes should be available at the root of your directory. During the marking process, I may :

(8) Some special case / situations you have to think about

(9) You should try to detect, as far as possible, when the user has made some measurement error (typically, if there is no intersection between the two circles !) and politely suggest to do the measurement again

(10) When you move your mouse close to a landmark point, a circle of a special colour surround it and if you click within that circle, you select that point (even if you are not exactly above it).

(11) A menu with t least two items will allow you :


(Not So) Optional Development:

You should do at least two of the following options to get the maximum mark

Penalties for late submission:

Late submission may be penalised at 10% per day late.

Bonus for early submission : 1 mark if the assignment is send at least one day before the due day (therefore before the 8th of september at 2359).

Additional Map :