code: function(type, pos, dim, canvas){
        var ctx = canvas.getCtx(), 
            pi5 = Math.PI / 5;
        ctx.save();
        ctx.translate(pos.x, pos.y);
        ctx.beginPath();
        ctx.moveTo(dim, 0);
        for (var i = 0; i < 9; i++) {
          ctx.rotate(pi5);
          if (i % 2 == 0) {
            ctx.lineTo((dim / 0.525731) * 0.200811, 0);
          } else {
            ctx.lineTo(dim, 0);
          }
        }
        ctx.closePath();
        ctx[type]();
        ctx.restore();
      }
docs: /*
  Method: render
  
  Renders a star into the canvas.
  
  Parameters:
  
  type - (string) Possible options are 'fill' or 'stroke'.
  pos - (object) An *x*, *y* object with the position of the center of the star.
  dim - (number) The dimension of the star.
  canvas - (object) A <Canvas> instance.
  
  Example:
  (start code js)
  NodeHelper.star.render('stroke', { x: 10, y: 30 }, 40, viz.canvas);
  (end code)