public MapStencilDisplay(MapStencil mapStencil) : this() { ShowStencil(mapStencil); }
private static void PunchParabola(double windAngle, double windMagnitude, double vx0, double x0, double vy0, double y0, MapStencil mapStencil) { double windVx = Math.Cos(windAngle) * windMagnitude; double windVy = -Math.Sin(windAngle) * windMagnitude; double g = 25; for (var t = 0.0; t < 10; t += 0.01) { // var x = 150 + 20 * t; // var y = 20 * t * t - t * 100 + 150; var x = 0.5 * windVx * t * t + vx0 * t + x0; var y = 0.5 * (windVy + g) * t * t + vy0 * t + y0; mapStencil.PunchEllipse((int)x, (int)y, 2, 2, val => !val); if (y > 150 && t > 2) { break; } } }