The position function for a falling object is -1/2at^2+Vit or -4.9t^2+Vit.
Since Vi is also a known constant (after you get better bullets) the velocity function for the falling object is -9.8t+Vi.
If you want to get the Y distance then you'll need to use this: -9.8t +Vi*Sin(theta)
Plug in whatever Vi you got and set the equation to 0 (for example say Vi=100 and let (theta)=30 degrees). It should look like:
-9.8t+100Sin(30) = 0 which simplifies to
-9.8t+100*1/2 = 0
-9.8t+50 = 0
9.8t = 50
t=50/9.8
So, if your cannon is pointed 30 degrees above the horizontal and is shot from the cannon at 100m/s, then it will take 50/9.8 seconds (decimal is ~5.1s) for it to reach it's highest point. Now lets go back to the position function!

-4.9t^2 + Vit or -4.9t^2 +100t
which, according to the time it took to get to the highest point (5.1s) is:
-4.9(5.1)^2 + 100(5.1)
= -127.4 + 510
= 382.6
So, your maximum height would be 382.6m
The equation for the maximum height achieved on a projectile curve again is:
y = 1/2*a*{[Vi*Sin(theta)]/a}^2 + (Vi*Sin(theta))*{[Vi*Sin(theta)]/a}=3(Sin(theta))^2 * Vi^2 / 2a
Wikipedia or some other internet site could maybe give you a method that requires less inputs.
How do you do that mechanically? I don't know. I do know that Conundrumer used a Sine generator which is basically the wood mechanics scene. Really though, it's probably going to be beyond most of us normal people to figure that out by mechanical means.