Glad to have helped.
Math is quite predictable, so trial and error is not necessarily required
But yeah, if you need another shape you would have to adjust the math to approximate that shape. Also keep in mind that for other shapes you have to consider the objects rotation in addition to the location.
One additional advantage of method is that you can easily add other such as foam or waves near the sub in a more exact way then the common depth based methods would allow.