This program illustrates the progress of an algorithm I developed to compute Field of View (FOV) within a hexagonal grid. View is computed from the centre of a hexagon, and expands outward in discrete steps (by pressing the "Expand" button). The grid contains some obstacles (darkened hexagons) which block view through them.
At each stage you see the set of "arcs" defining the current view radius. There are initially 4 arcs corresponding to the four quadrants; each arc is shown by drawing its two "arms" (and note that these are only drawn from the centre point out to where the defining point for the arm is, and not always out to the current perimeter of visibility), and (if you're viewing it in colour) shading the area between the arms and the centre in green.
Visible hexes are shown by drawing a number in them (the centre hex is marked "C"). This number looks like "r.i", where r is the radius from the centre (in hexes), and i is the index of that hex in that radius, where hexes are numbered in counter-clockwise order starting from the hex at 3 o'clock, which is numbered both 0 and 6*r. This info isn't meant to be that useful, it's only there because something has to be displayed to show visibility, colour is starting to be over-used, and this info is already calculated and available.
A more complete description of the algorithm is in the works, but not yet available.
This code is by Clark Verbrugge. I can be contacted by email at: clump@cs.mcgill.ca