I ran your numbers through my dead simple approximator(code at bottom) and got a different result(image + source code is attached)
I am fairly sure that your result cannot be correct due to running it through the standard projectile motion equations.
Assuming no loss of energy, the ball will follow the equation: .5*Vy^2 = g * h.
(mgh = 1/2 * m * v^2)
Plugging this into wolfram alpha(
http://www.wolframalpha.com/input/?i=%28%2823+feet+per+second+in+meters+*+sin%2845+d egrees%29%29+**+2++*+.5+%29%2F9.8+meters+per+secon d+squared) ( using meters because I am more used to them) gets me 4.113 ft as the max possible height. Your graph shows the ball approaching 7 m.
(When I set the drag to 0 on my code the height reaches a max of about 4ft and change)
Oh, and the code attachment shows what I mean by trial and error. Look at findBestCurveWithin.
Code:
void calcY(double& x,double& y, double &xVel, double& yVel)
{
double oldxVel = xVel;
double oldyVel = yVel;
xVel += drag * xVel * xVel * timeIncrement;
yVel += (g + drag * yVel * yVel) * timeIncrement;
x += oldxVel * timeIncrement + .5 * timeIncrement * (xVel - oldxVel);
y += oldyVel * timeIncrement + .5 * timeIncrement * (yVel - oldyVel);
}
QVector<QPointF> findCurve(double velocity, double angle, double targetX)
{
QVector<QPointF> result;
double rads = angle * M_PI/180;
double xVel = velocity * cos(rads);
double yVel = velocity * sin(rads);
double x = 0;
double y = 0;
do
{
calcY(x,y,xVel,yVel);
result.push_back(QPointF(x,y));
}
while (fabs(x - targetX) > .01);
return result;
}