I guess you could add them together and solve for the radius. I am not sure if that is what you need or want.
Let R=radius, C=constant, r=range, and w=weight
I'll start off with a little introduction for some context to my problem. I am a video game designer working on a game set on a fortress island being attacked by enemy warships. The players (it's a multiplayer game) must provide some input to aim a cannon which then fires an explosive shell.
An important note: none of the game physics are realistic. They are deliberately unrealistic for reasons of gameplay.
The problem I am trying to figure out is an equation for the explosion radius. The two variables which affect it are the range, and the weight of gunpowder in the shell.
The range should have linear, decreasing effect on the explosion radius. I.E. at a greater range, the shell will make a smaller explosion. Again, this is for gameplay reasons and has nothing to do with reality.
radius = constant - range
The weight has a curved, decelerating effect on the explosion radius. I.E. with a heavier weight the shell will make a bigger explosion radius, but everytime the weight is increased, the radius increase is smaller.
radius = sqrt(weight)
The square root curve is not exactly what I need, it should taper off more towards the end.
Now, the question is, how do I combine these two equations into one, in the form 'radius = ...' so that I can program the effect?
any and all help is appreciated,