I'm trying to give shapes in my physics engine roundness/ curvature.
I am aware of various methods for mathematically defining curvature such as bezier-curves, ellipses, etc; but I'm not sure which methods are most appropriate for use in a physics engine. I must consider the speed, flexibility, and difficulty of constructing/joining the curves when choosing my approach. The ideal is a system where a user could easily construct and collide a large amount of curved, aesthetic polygon bodies together, yet I could still maintain a satisfactory framerate. However it's inevitable that ease-of-use and other attributes will suffer.
NOTE: my physics engine is continuous, which means I must pre-calculate the times at which polygons will collide. Keep in mind that the curve's route my not be linear.
For each suggestion please give the positives/negatives!
What techniques are there for mathematically defining a 2D curve?
Advantages/Disadvantages (speed, flexibility, ease of construction/use)?
Is the technique feasible for an engine where predictability of collisions is crucial?
If you can get your functions in the form of:
f(t)=... and
g(t) =...
and you want the intersection, all you have to do is use Desmos Graphs
You could also do something like f(t)-g(t) = 0 and the graph of the result will show the intersection as well.
After the graph is displayed, you can place the mouse on the graph to show the point of interest. It helps when you color the graphs.