def get_unit(key)
    unless @x_y_assignments[key]
      @x_y_assignments[key] = @next_key_assignment
      if @next_key_assignment == :x
        @next_key_assignment = :y
      else
        @next_key_assignment = :x
      end
    end
    @counters[key] ||= 0
    @counters[key] += @interval
    if @x_y_assignments[key] == :x
      return calculate_x(@counters[key])
    else
      return calculate_y(@counters[key])
    end
  end
def get_unit(key)
    unless @x_y_assignments[key]
      @x_y_assignments[key] = @next_key_assignment
      if @next_key_assignment == :x
        @next_key_assignment = :y
      else
        @next_key_assignment = :x
      end
    end
    @counters[key] ||= 0
    @counters[key] += @interval
    if @x_y_assignments[key] == :x
      return calculate_x(@counters[key])
    else
      return calculate_y(@counters[key])
    end
  end
Takes a hash with all keys supported by Factory, plus these keys and defaults:
  :scale => 0.2
  :interval => 0.1
Assigns the given key to receive either X or Y values from the Lissajous curve, if it isn't already assigned.
Then returns the appropriate value for the key.