
                        context.strokeStyle="#33AA66";
                else
                    context.strokeStyle="#AA3366";
                context.lineWidth=3;
                context.stroke();
                context.closePath();
            }
            if(do_vertical) {
                context.beginPath();
                var ds = pixel_in(j - 0.5 * grid_size, i + 0.5 * grid_size) < pixel_in(j + 0.5 * grid_size, i + 0.5 * grid_size) ? -1.0 : 1.0;
                var p1x = j + gsx(j, i);
           