 var t2 = (k + 0.99) / grid_size;
                    var x1 = polynomial_in_x(Px, t1, 4);
                    var y1 = polynomial_in_x(Py, t1, 4);
                    var x2 = polynomial_in_x(Px, t2, 4);
                    var y2 = polynomial_in_x(Py, t2, 4);
                    context.moveTo(x1, y1);
                    context.lineTo(x2, y2);
                }
                if(do_colors)
                    if((i / grid_size + j / grid_size) % 2 == 0)
                        context.strokeStyle="#AA3