<commit_before>
class Maze::Formatter::Image::Polar < Maze::Formatter::Image
  
  def render_background
  end
  
  def render_grid
    canvas.stroke_antialias true
    canvas.stroke_linecap 'square'
    canvas.stroke 'gray90'
    canvas.stroke_width 1
    canvas.fill 'none'

    grid.each_cell do |cell|
      next if cell.row == 0
      ax, ay, bx, by, cx, cy, dx, dy, radius, ccw, cw = coord cell
  
      canvas.ellipse image_center, image_center, radius, radius, ccw, cw
      canvas.line cx, cy, dx, dy
    end
  end
  
  def render_wall
    canvas.stroke_antialias true
    canvas.stroke_linecap 'square'
    canvas.stroke wall_color
    canvas.stroke_width wall_width
    canvas.fill 'none'

    grid.each_cell do |cell|
      next if cell.row == 0
      ax, ay, bx, by, cx, cy, dx, dy, radius, ccw, cw = coord cell
      
      canvas.ellipse image_center, image_center, radius, radius, ccw, cw unless cell.linked_to?(:inward)
      canvas.line cx, cy, dx, dy unless cell.linked_to?(:cw)
    end
    
    canvas.ellipse(image_center, image_center, grid.rows * cell_width, grid.rows * cell_width, 0, 360)
  end
  
  def render_path<commit_msg>. fix grid on polar<commit_after>
class Maze::Formatter::Image::Polar < Maze::Formatter::Image
  
  def render_background
  end
  
  def render_grid
    canvas.stroke_antialias true
    canvas.stroke_linecap 'square'
    canvas.stroke 'gray90'
    canvas.stroke_width 1
    canvas.fill 'none'

    grid.each_cell do |cell|
      next if cell.row == 0
      ax, ay, bx, by, cx, cy, dx, dy, radius, ccw, cw = coord cell
  
      canvas.ellipse image_center, image_center, radius, radius, ccw, cw
      canvas.line cx, cy, dx, dy
    end
    canvas.ellipse(image_center, image_center, grid.rows * cell_width, grid.rows * cell_width, 0, 360)
  end
  
  def render_wall
    canvas.stroke_antialias true
    canvas.stroke_linecap 'square'
    canvas.stroke wall_color
    canvas.stroke_width wall_width
    canvas.fill 'none'

    grid.each_cell do |cell|
      next if cell.row == 0
      ax, ay, bx, by, cx, cy, dx, dy, radius, ccw, cw = coord cell
      
      canvas.ellipse image_center, image_center, radius, radius, ccw, cw unless cell.linked_to?(:inward)
      canvas.line cx, cy, dx, dy unless cell.linked_to?(:cw)
    end
    
    canvas.ellipse(image_center, image_center, grid.rows * cell_width, grid.rows * cell_width, 0, 360)
  end
  
  def render_path
{'fraction_non_alphanumeric': 0.0966403981750311, 'fraction_numerical': 0.009124844462878473, 'mean_word_length': 2.960591133004926, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5304132', 'n_tokens_mistral': 864, 'n_tokens_neox': 839, 'n_words': 237}