Help me complete this mathematical model for motion during a collision (for game engine physics)











up vote
2
down vote

favorite












(Because calculus is better than the "just reduce your timestep" strategy.)



I want to simulate the motion of two circular or spherical colliders as they bump into each other. I'm adding their radii together to simplify the problem into the motion of a single point particle as it passes through a circular medium that pushes it away from the centre.



I came up with this function that maps the particle's trajectory through $[x,y]$ space, it gives $y$ with respect to $x$. For readability and to make it easier for me to figure it out, I broke it down into defined variables for reoccurring terms.



Here is a graph of it.



The function and its variables are as follows:



$c$ is the radius of the circle.
This is the big red circle in the graph.
$$
c = [input]
$$



$i$ is the initial energy and velocity of the particle ($mathrm{mass} = 1$) at the start point $[0,0]$.
$$
i = [input]
$$



$s$ is the strength or hardness of the material of the colliders. This multiplies with the depth of the particle from the surface of the circle to give the force exerted on the particle.
$$
s = [input]
$$



$d$ is the hypothetical maximum depth that the particle would penetrate into the surface if it were moving directly into the surface and the force applied to it were directly opposite its initial direction of movement. This is based on a simpler model I came up with already that shows the particle's movement in one spacial dimension by mapping it to a sine wave.
This is represented on the graph by the green X point, which moves when you adjust the $i$ and $s$ input sliders.
$$
d = frac{i}{s}
$$



$k$ is the angle (in radians in the graph) of entry of the particle into the circle, where $0$ means it's moving directly into the circle.
This is the angle between the red line that goes from the entry point $[0,0]$ to the centre of the circle and the orange line that indicates the initial direction of the particle.
$$
k = [input]
$$



$h$ is the relationship between $d$ and the depth at which the particle would be half way through the circle going in its initial direction.
$$
h = frac{d}{cos(k)*c}
$$



$u$ is $h$ compressed from the range $0$ to $∞$ to the range $0$ to $1$.
This is the 2nd of 2 or 4 roots given by the function, which is given by the vertical green line on the graph. When adjusting inputs in the graph, $u$ must be manually set to the $x$ value of the green line.
$$
0 = u*((tan(arcsin(u))*sin(k))+1)-h
$$

Formatted as a standard polynomial:
$$
0 = -left(sin(k)^2+1right)x^4 + (2h)x^3 − left(h^2-1right)x^2 − (2h)x + left(h^2right) {0le xle h}
$$



$j$ determines the curve of the trajectory. If $j = 1$, there is no curve, the particle moves in a straight line and turns sharply at the apex. If $j = 0$, the trajectory is a basic sine wave.
$$
j = sinleft(u*frac{pi}{2}right)
$$



$f$ is the distance in the particle's initial direction from the start point $[0,0]$ to the line of symmetry of the trajectory. This is where the apex of the trajectory would be if $j = 1$.
This is represented on the graph by the blue O point.
$$
f = j*(cos(k)*c)
$$



$g$ is the angle around the circle from the entry point to the apex of the trajectory.
This is the angle of the red line, where $0$ is vertical.
$$
g = arctanleft(frac{sin(k)*f}{c-(cos(k)*f)}right)
$$



$m$ is the $x$ axis distance from the entry point to the apex of the trajectory.
$$
m = c*sin(g)
$$



$n$ is the $y$ axis distance from the entry point to the centre of the circle.
$$
n = c*cos(g)
$$



This is the final function $Yleft(xright)$ that shows the trajectory of the particle.



This is the blue wave that starts at $[0,0]$
$$
y = left(frac{frac{arcsinleft(sinleft(frac{x*frac{pi}{2}}{m}right)*jright)}{j}}{frac{pi}{2}}right)*left(sinleft(frac{pi}{2}-(g+k)right)*fright)
$$



Acceleration functions:



Using the distance of the particle from the surface I got a function for the absolute acceleration:
$$
left(c-sqrt{(X-m)^2+(Y-n)^2}right)*s
$$



Combining that with the direction from the centre of the circle to the particle I got acceleration on the $x$ axis:
$$
left(left(c-sqrt{(X-m)^2+(Y-n)^2}right)*left(frac{X-m}{sqrt{(X-m)^2+left(Y-nright)^2}}right)right)*s
$$



And acceleration on the $y$ axis:
$$
left(left(c-sqrt{(X-m)^2+(Y-n)^2}right)*left(frac{Y-n}{sqrt{(X-m)^2+left(Y-nright)^2}}right)right)*s
$$



Plugging in $Y(x)$ and simplifying I got $x$ acceleration with respect to $x$, $A_x(x)$.
This is the second-last function on the graph, in purple:
$$
left(left(frac{c}{sqrt{(x-m)^2+left(left(left(frac{frac{arcsinleft(sinleft(frac{x*frac{pi}{2}}{m}right)*jright)}{j}}{frac{pi}{2}}right)*(cos(g+k)*f)right)-nright)^2}}right)-1right)*(x-m)*s
$$



And $y$ acceleration with respect to $x$, $A_yleft(xright)$.
This is the last function on the graph, also in purple:
$$
left(left(frac{c}{sqrt{(x-m)^2+left(left(left(frac{frac{arcsinleft(sinleft(frac{x*frac{pi}{2}}{m}right)*jright)}{j}}{frac{pi}{2}}right)*(cos(g+k)*f)right)-nright)^2}}right)-1right)*left(left(left(frac{frac{arcsinleft(sinleft(frac{x*frac{pi}{2}}{m}right)*jright)}{j}}{frac{pi}{2}}right)*(cos(g+k)*f)right)-nright)*s
$$



To use this system for my simulation I need functions for $x$ and $y$ with respect to time, $X(t)$, $Y(t)$, and for velocity with respect to time, $V_x(t)$, $V_y(t)$. I think I found a method online to get the functions I want from the second order differential equation $A_x(x)$, but it involves getting an antiderivative of $A_x(x)$, and I haven't been able to do that. I've been using integral-calculator.com which is a very handy crutch for me but it turns up nothing for $A_x(x)$. However $A_x(x)$ is continuous so it should have an antiderivative. Can anyone here solve that?



Another strategy I've looked at is to take the second derivative of $Y(x)$, $Y''(x)$ which is the acceleration on the $y$ dimension if the $x$ dimension is considered as time, then I tried relating $Y''(x)$ to $A_y(x)$ to get what may be the relationship between $x$ and time, the $x$ velocity, $V_x(x)$, but I haven't been able to prove the validity of this function. I could prove or disprove it if I had $X(t)$ and $V_x(t)$.



Other than that, are there any other methods anyone can come up with to get the functions I need?



I hope this will stimulate some scientific curiosity.










share|cite|improve this question




















  • 1




    Keep in mind that, just because the equation is continuous and therefore integrable, does not mean that the integral can be expressed using elementary functions. You might be better off with a Taylor approximation.
    – Ispil
    yesterday










  • @Ispil for my purposes, the function is only relevant within the range $0$ to $2m$, so that may be workable. So where would I start with finding that? The derivative of $A_x(x)$ is only the next step toward the solution $X(t)$
    – Byron
    yesterday










  • I was going to try this with the integral of $A_x(x)$
    – Byron
    yesterday












  • For what it's worth, collision physics in games usually does not involve anything nearly as complicated as this.
    – Rahul
    yesterday















up vote
2
down vote

favorite












(Because calculus is better than the "just reduce your timestep" strategy.)



I want to simulate the motion of two circular or spherical colliders as they bump into each other. I'm adding their radii together to simplify the problem into the motion of a single point particle as it passes through a circular medium that pushes it away from the centre.



I came up with this function that maps the particle's trajectory through $[x,y]$ space, it gives $y$ with respect to $x$. For readability and to make it easier for me to figure it out, I broke it down into defined variables for reoccurring terms.



Here is a graph of it.



The function and its variables are as follows:



$c$ is the radius of the circle.
This is the big red circle in the graph.
$$
c = [input]
$$



$i$ is the initial energy and velocity of the particle ($mathrm{mass} = 1$) at the start point $[0,0]$.
$$
i = [input]
$$



$s$ is the strength or hardness of the material of the colliders. This multiplies with the depth of the particle from the surface of the circle to give the force exerted on the particle.
$$
s = [input]
$$



$d$ is the hypothetical maximum depth that the particle would penetrate into the surface if it were moving directly into the surface and the force applied to it were directly opposite its initial direction of movement. This is based on a simpler model I came up with already that shows the particle's movement in one spacial dimension by mapping it to a sine wave.
This is represented on the graph by the green X point, which moves when you adjust the $i$ and $s$ input sliders.
$$
d = frac{i}{s}
$$



$k$ is the angle (in radians in the graph) of entry of the particle into the circle, where $0$ means it's moving directly into the circle.
This is the angle between the red line that goes from the entry point $[0,0]$ to the centre of the circle and the orange line that indicates the initial direction of the particle.
$$
k = [input]
$$



$h$ is the relationship between $d$ and the depth at which the particle would be half way through the circle going in its initial direction.
$$
h = frac{d}{cos(k)*c}
$$



$u$ is $h$ compressed from the range $0$ to $∞$ to the range $0$ to $1$.
This is the 2nd of 2 or 4 roots given by the function, which is given by the vertical green line on the graph. When adjusting inputs in the graph, $u$ must be manually set to the $x$ value of the green line.
$$
0 = u*((tan(arcsin(u))*sin(k))+1)-h
$$

Formatted as a standard polynomial:
$$
0 = -left(sin(k)^2+1right)x^4 + (2h)x^3 − left(h^2-1right)x^2 − (2h)x + left(h^2right) {0le xle h}
$$



$j$ determines the curve of the trajectory. If $j = 1$, there is no curve, the particle moves in a straight line and turns sharply at the apex. If $j = 0$, the trajectory is a basic sine wave.
$$
j = sinleft(u*frac{pi}{2}right)
$$



$f$ is the distance in the particle's initial direction from the start point $[0,0]$ to the line of symmetry of the trajectory. This is where the apex of the trajectory would be if $j = 1$.
This is represented on the graph by the blue O point.
$$
f = j*(cos(k)*c)
$$



$g$ is the angle around the circle from the entry point to the apex of the trajectory.
This is the angle of the red line, where $0$ is vertical.
$$
g = arctanleft(frac{sin(k)*f}{c-(cos(k)*f)}right)
$$



$m$ is the $x$ axis distance from the entry point to the apex of the trajectory.
$$
m = c*sin(g)
$$



$n$ is the $y$ axis distance from the entry point to the centre of the circle.
$$
n = c*cos(g)
$$



This is the final function $Yleft(xright)$ that shows the trajectory of the particle.



This is the blue wave that starts at $[0,0]$
$$
y = left(frac{frac{arcsinleft(sinleft(frac{x*frac{pi}{2}}{m}right)*jright)}{j}}{frac{pi}{2}}right)*left(sinleft(frac{pi}{2}-(g+k)right)*fright)
$$



Acceleration functions:



Using the distance of the particle from the surface I got a function for the absolute acceleration:
$$
left(c-sqrt{(X-m)^2+(Y-n)^2}right)*s
$$



Combining that with the direction from the centre of the circle to the particle I got acceleration on the $x$ axis:
$$
left(left(c-sqrt{(X-m)^2+(Y-n)^2}right)*left(frac{X-m}{sqrt{(X-m)^2+left(Y-nright)^2}}right)right)*s
$$



And acceleration on the $y$ axis:
$$
left(left(c-sqrt{(X-m)^2+(Y-n)^2}right)*left(frac{Y-n}{sqrt{(X-m)^2+left(Y-nright)^2}}right)right)*s
$$



Plugging in $Y(x)$ and simplifying I got $x$ acceleration with respect to $x$, $A_x(x)$.
This is the second-last function on the graph, in purple:
$$
left(left(frac{c}{sqrt{(x-m)^2+left(left(left(frac{frac{arcsinleft(sinleft(frac{x*frac{pi}{2}}{m}right)*jright)}{j}}{frac{pi}{2}}right)*(cos(g+k)*f)right)-nright)^2}}right)-1right)*(x-m)*s
$$



And $y$ acceleration with respect to $x$, $A_yleft(xright)$.
This is the last function on the graph, also in purple:
$$
left(left(frac{c}{sqrt{(x-m)^2+left(left(left(frac{frac{arcsinleft(sinleft(frac{x*frac{pi}{2}}{m}right)*jright)}{j}}{frac{pi}{2}}right)*(cos(g+k)*f)right)-nright)^2}}right)-1right)*left(left(left(frac{frac{arcsinleft(sinleft(frac{x*frac{pi}{2}}{m}right)*jright)}{j}}{frac{pi}{2}}right)*(cos(g+k)*f)right)-nright)*s
$$



To use this system for my simulation I need functions for $x$ and $y$ with respect to time, $X(t)$, $Y(t)$, and for velocity with respect to time, $V_x(t)$, $V_y(t)$. I think I found a method online to get the functions I want from the second order differential equation $A_x(x)$, but it involves getting an antiderivative of $A_x(x)$, and I haven't been able to do that. I've been using integral-calculator.com which is a very handy crutch for me but it turns up nothing for $A_x(x)$. However $A_x(x)$ is continuous so it should have an antiderivative. Can anyone here solve that?



Another strategy I've looked at is to take the second derivative of $Y(x)$, $Y''(x)$ which is the acceleration on the $y$ dimension if the $x$ dimension is considered as time, then I tried relating $Y''(x)$ to $A_y(x)$ to get what may be the relationship between $x$ and time, the $x$ velocity, $V_x(x)$, but I haven't been able to prove the validity of this function. I could prove or disprove it if I had $X(t)$ and $V_x(t)$.



Other than that, are there any other methods anyone can come up with to get the functions I need?



I hope this will stimulate some scientific curiosity.










share|cite|improve this question




















  • 1




    Keep in mind that, just because the equation is continuous and therefore integrable, does not mean that the integral can be expressed using elementary functions. You might be better off with a Taylor approximation.
    – Ispil
    yesterday










  • @Ispil for my purposes, the function is only relevant within the range $0$ to $2m$, so that may be workable. So where would I start with finding that? The derivative of $A_x(x)$ is only the next step toward the solution $X(t)$
    – Byron
    yesterday










  • I was going to try this with the integral of $A_x(x)$
    – Byron
    yesterday












  • For what it's worth, collision physics in games usually does not involve anything nearly as complicated as this.
    – Rahul
    yesterday













up vote
2
down vote

favorite









up vote
2
down vote

favorite











(Because calculus is better than the "just reduce your timestep" strategy.)



I want to simulate the motion of two circular or spherical colliders as they bump into each other. I'm adding their radii together to simplify the problem into the motion of a single point particle as it passes through a circular medium that pushes it away from the centre.



I came up with this function that maps the particle's trajectory through $[x,y]$ space, it gives $y$ with respect to $x$. For readability and to make it easier for me to figure it out, I broke it down into defined variables for reoccurring terms.



Here is a graph of it.



The function and its variables are as follows:



$c$ is the radius of the circle.
This is the big red circle in the graph.
$$
c = [input]
$$



$i$ is the initial energy and velocity of the particle ($mathrm{mass} = 1$) at the start point $[0,0]$.
$$
i = [input]
$$



$s$ is the strength or hardness of the material of the colliders. This multiplies with the depth of the particle from the surface of the circle to give the force exerted on the particle.
$$
s = [input]
$$



$d$ is the hypothetical maximum depth that the particle would penetrate into the surface if it were moving directly into the surface and the force applied to it were directly opposite its initial direction of movement. This is based on a simpler model I came up with already that shows the particle's movement in one spacial dimension by mapping it to a sine wave.
This is represented on the graph by the green X point, which moves when you adjust the $i$ and $s$ input sliders.
$$
d = frac{i}{s}
$$



$k$ is the angle (in radians in the graph) of entry of the particle into the circle, where $0$ means it's moving directly into the circle.
This is the angle between the red line that goes from the entry point $[0,0]$ to the centre of the circle and the orange line that indicates the initial direction of the particle.
$$
k = [input]
$$



$h$ is the relationship between $d$ and the depth at which the particle would be half way through the circle going in its initial direction.
$$
h = frac{d}{cos(k)*c}
$$



$u$ is $h$ compressed from the range $0$ to $∞$ to the range $0$ to $1$.
This is the 2nd of 2 or 4 roots given by the function, which is given by the vertical green line on the graph. When adjusting inputs in the graph, $u$ must be manually set to the $x$ value of the green line.
$$
0 = u*((tan(arcsin(u))*sin(k))+1)-h
$$

Formatted as a standard polynomial:
$$
0 = -left(sin(k)^2+1right)x^4 + (2h)x^3 − left(h^2-1right)x^2 − (2h)x + left(h^2right) {0le xle h}
$$



$j$ determines the curve of the trajectory. If $j = 1$, there is no curve, the particle moves in a straight line and turns sharply at the apex. If $j = 0$, the trajectory is a basic sine wave.
$$
j = sinleft(u*frac{pi}{2}right)
$$



$f$ is the distance in the particle's initial direction from the start point $[0,0]$ to the line of symmetry of the trajectory. This is where the apex of the trajectory would be if $j = 1$.
This is represented on the graph by the blue O point.
$$
f = j*(cos(k)*c)
$$



$g$ is the angle around the circle from the entry point to the apex of the trajectory.
This is the angle of the red line, where $0$ is vertical.
$$
g = arctanleft(frac{sin(k)*f}{c-(cos(k)*f)}right)
$$



$m$ is the $x$ axis distance from the entry point to the apex of the trajectory.
$$
m = c*sin(g)
$$



$n$ is the $y$ axis distance from the entry point to the centre of the circle.
$$
n = c*cos(g)
$$



This is the final function $Yleft(xright)$ that shows the trajectory of the particle.



This is the blue wave that starts at $[0,0]$
$$
y = left(frac{frac{arcsinleft(sinleft(frac{x*frac{pi}{2}}{m}right)*jright)}{j}}{frac{pi}{2}}right)*left(sinleft(frac{pi}{2}-(g+k)right)*fright)
$$



Acceleration functions:



Using the distance of the particle from the surface I got a function for the absolute acceleration:
$$
left(c-sqrt{(X-m)^2+(Y-n)^2}right)*s
$$



Combining that with the direction from the centre of the circle to the particle I got acceleration on the $x$ axis:
$$
left(left(c-sqrt{(X-m)^2+(Y-n)^2}right)*left(frac{X-m}{sqrt{(X-m)^2+left(Y-nright)^2}}right)right)*s
$$



And acceleration on the $y$ axis:
$$
left(left(c-sqrt{(X-m)^2+(Y-n)^2}right)*left(frac{Y-n}{sqrt{(X-m)^2+left(Y-nright)^2}}right)right)*s
$$



Plugging in $Y(x)$ and simplifying I got $x$ acceleration with respect to $x$, $A_x(x)$.
This is the second-last function on the graph, in purple:
$$
left(left(frac{c}{sqrt{(x-m)^2+left(left(left(frac{frac{arcsinleft(sinleft(frac{x*frac{pi}{2}}{m}right)*jright)}{j}}{frac{pi}{2}}right)*(cos(g+k)*f)right)-nright)^2}}right)-1right)*(x-m)*s
$$



And $y$ acceleration with respect to $x$, $A_yleft(xright)$.
This is the last function on the graph, also in purple:
$$
left(left(frac{c}{sqrt{(x-m)^2+left(left(left(frac{frac{arcsinleft(sinleft(frac{x*frac{pi}{2}}{m}right)*jright)}{j}}{frac{pi}{2}}right)*(cos(g+k)*f)right)-nright)^2}}right)-1right)*left(left(left(frac{frac{arcsinleft(sinleft(frac{x*frac{pi}{2}}{m}right)*jright)}{j}}{frac{pi}{2}}right)*(cos(g+k)*f)right)-nright)*s
$$



To use this system for my simulation I need functions for $x$ and $y$ with respect to time, $X(t)$, $Y(t)$, and for velocity with respect to time, $V_x(t)$, $V_y(t)$. I think I found a method online to get the functions I want from the second order differential equation $A_x(x)$, but it involves getting an antiderivative of $A_x(x)$, and I haven't been able to do that. I've been using integral-calculator.com which is a very handy crutch for me but it turns up nothing for $A_x(x)$. However $A_x(x)$ is continuous so it should have an antiderivative. Can anyone here solve that?



Another strategy I've looked at is to take the second derivative of $Y(x)$, $Y''(x)$ which is the acceleration on the $y$ dimension if the $x$ dimension is considered as time, then I tried relating $Y''(x)$ to $A_y(x)$ to get what may be the relationship between $x$ and time, the $x$ velocity, $V_x(x)$, but I haven't been able to prove the validity of this function. I could prove or disprove it if I had $X(t)$ and $V_x(t)$.



Other than that, are there any other methods anyone can come up with to get the functions I need?



I hope this will stimulate some scientific curiosity.










share|cite|improve this question















(Because calculus is better than the "just reduce your timestep" strategy.)



I want to simulate the motion of two circular or spherical colliders as they bump into each other. I'm adding their radii together to simplify the problem into the motion of a single point particle as it passes through a circular medium that pushes it away from the centre.



I came up with this function that maps the particle's trajectory through $[x,y]$ space, it gives $y$ with respect to $x$. For readability and to make it easier for me to figure it out, I broke it down into defined variables for reoccurring terms.



Here is a graph of it.



The function and its variables are as follows:



$c$ is the radius of the circle.
This is the big red circle in the graph.
$$
c = [input]
$$



$i$ is the initial energy and velocity of the particle ($mathrm{mass} = 1$) at the start point $[0,0]$.
$$
i = [input]
$$



$s$ is the strength or hardness of the material of the colliders. This multiplies with the depth of the particle from the surface of the circle to give the force exerted on the particle.
$$
s = [input]
$$



$d$ is the hypothetical maximum depth that the particle would penetrate into the surface if it were moving directly into the surface and the force applied to it were directly opposite its initial direction of movement. This is based on a simpler model I came up with already that shows the particle's movement in one spacial dimension by mapping it to a sine wave.
This is represented on the graph by the green X point, which moves when you adjust the $i$ and $s$ input sliders.
$$
d = frac{i}{s}
$$



$k$ is the angle (in radians in the graph) of entry of the particle into the circle, where $0$ means it's moving directly into the circle.
This is the angle between the red line that goes from the entry point $[0,0]$ to the centre of the circle and the orange line that indicates the initial direction of the particle.
$$
k = [input]
$$



$h$ is the relationship between $d$ and the depth at which the particle would be half way through the circle going in its initial direction.
$$
h = frac{d}{cos(k)*c}
$$



$u$ is $h$ compressed from the range $0$ to $∞$ to the range $0$ to $1$.
This is the 2nd of 2 or 4 roots given by the function, which is given by the vertical green line on the graph. When adjusting inputs in the graph, $u$ must be manually set to the $x$ value of the green line.
$$
0 = u*((tan(arcsin(u))*sin(k))+1)-h
$$

Formatted as a standard polynomial:
$$
0 = -left(sin(k)^2+1right)x^4 + (2h)x^3 − left(h^2-1right)x^2 − (2h)x + left(h^2right) {0le xle h}
$$



$j$ determines the curve of the trajectory. If $j = 1$, there is no curve, the particle moves in a straight line and turns sharply at the apex. If $j = 0$, the trajectory is a basic sine wave.
$$
j = sinleft(u*frac{pi}{2}right)
$$



$f$ is the distance in the particle's initial direction from the start point $[0,0]$ to the line of symmetry of the trajectory. This is where the apex of the trajectory would be if $j = 1$.
This is represented on the graph by the blue O point.
$$
f = j*(cos(k)*c)
$$



$g$ is the angle around the circle from the entry point to the apex of the trajectory.
This is the angle of the red line, where $0$ is vertical.
$$
g = arctanleft(frac{sin(k)*f}{c-(cos(k)*f)}right)
$$



$m$ is the $x$ axis distance from the entry point to the apex of the trajectory.
$$
m = c*sin(g)
$$



$n$ is the $y$ axis distance from the entry point to the centre of the circle.
$$
n = c*cos(g)
$$



This is the final function $Yleft(xright)$ that shows the trajectory of the particle.



This is the blue wave that starts at $[0,0]$
$$
y = left(frac{frac{arcsinleft(sinleft(frac{x*frac{pi}{2}}{m}right)*jright)}{j}}{frac{pi}{2}}right)*left(sinleft(frac{pi}{2}-(g+k)right)*fright)
$$



Acceleration functions:



Using the distance of the particle from the surface I got a function for the absolute acceleration:
$$
left(c-sqrt{(X-m)^2+(Y-n)^2}right)*s
$$



Combining that with the direction from the centre of the circle to the particle I got acceleration on the $x$ axis:
$$
left(left(c-sqrt{(X-m)^2+(Y-n)^2}right)*left(frac{X-m}{sqrt{(X-m)^2+left(Y-nright)^2}}right)right)*s
$$



And acceleration on the $y$ axis:
$$
left(left(c-sqrt{(X-m)^2+(Y-n)^2}right)*left(frac{Y-n}{sqrt{(X-m)^2+left(Y-nright)^2}}right)right)*s
$$



Plugging in $Y(x)$ and simplifying I got $x$ acceleration with respect to $x$, $A_x(x)$.
This is the second-last function on the graph, in purple:
$$
left(left(frac{c}{sqrt{(x-m)^2+left(left(left(frac{frac{arcsinleft(sinleft(frac{x*frac{pi}{2}}{m}right)*jright)}{j}}{frac{pi}{2}}right)*(cos(g+k)*f)right)-nright)^2}}right)-1right)*(x-m)*s
$$



And $y$ acceleration with respect to $x$, $A_yleft(xright)$.
This is the last function on the graph, also in purple:
$$
left(left(frac{c}{sqrt{(x-m)^2+left(left(left(frac{frac{arcsinleft(sinleft(frac{x*frac{pi}{2}}{m}right)*jright)}{j}}{frac{pi}{2}}right)*(cos(g+k)*f)right)-nright)^2}}right)-1right)*left(left(left(frac{frac{arcsinleft(sinleft(frac{x*frac{pi}{2}}{m}right)*jright)}{j}}{frac{pi}{2}}right)*(cos(g+k)*f)right)-nright)*s
$$



To use this system for my simulation I need functions for $x$ and $y$ with respect to time, $X(t)$, $Y(t)$, and for velocity with respect to time, $V_x(t)$, $V_y(t)$. I think I found a method online to get the functions I want from the second order differential equation $A_x(x)$, but it involves getting an antiderivative of $A_x(x)$, and I haven't been able to do that. I've been using integral-calculator.com which is a very handy crutch for me but it turns up nothing for $A_x(x)$. However $A_x(x)$ is continuous so it should have an antiderivative. Can anyone here solve that?



Another strategy I've looked at is to take the second derivative of $Y(x)$, $Y''(x)$ which is the acceleration on the $y$ dimension if the $x$ dimension is considered as time, then I tried relating $Y''(x)$ to $A_y(x)$ to get what may be the relationship between $x$ and time, the $x$ velocity, $V_x(x)$, but I haven't been able to prove the validity of this function. I could prove or disprove it if I had $X(t)$ and $V_x(t)$.



Other than that, are there any other methods anyone can come up with to get the functions I need?



I hope this will stimulate some scientific curiosity.







integration systems-of-equations physics mathematical-modeling simulation






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited yesterday









Robert Howard

1,545622




1,545622










asked yesterday









Byron

338




338








  • 1




    Keep in mind that, just because the equation is continuous and therefore integrable, does not mean that the integral can be expressed using elementary functions. You might be better off with a Taylor approximation.
    – Ispil
    yesterday










  • @Ispil for my purposes, the function is only relevant within the range $0$ to $2m$, so that may be workable. So where would I start with finding that? The derivative of $A_x(x)$ is only the next step toward the solution $X(t)$
    – Byron
    yesterday










  • I was going to try this with the integral of $A_x(x)$
    – Byron
    yesterday












  • For what it's worth, collision physics in games usually does not involve anything nearly as complicated as this.
    – Rahul
    yesterday














  • 1




    Keep in mind that, just because the equation is continuous and therefore integrable, does not mean that the integral can be expressed using elementary functions. You might be better off with a Taylor approximation.
    – Ispil
    yesterday










  • @Ispil for my purposes, the function is only relevant within the range $0$ to $2m$, so that may be workable. So where would I start with finding that? The derivative of $A_x(x)$ is only the next step toward the solution $X(t)$
    – Byron
    yesterday










  • I was going to try this with the integral of $A_x(x)$
    – Byron
    yesterday












  • For what it's worth, collision physics in games usually does not involve anything nearly as complicated as this.
    – Rahul
    yesterday








1




1




Keep in mind that, just because the equation is continuous and therefore integrable, does not mean that the integral can be expressed using elementary functions. You might be better off with a Taylor approximation.
– Ispil
yesterday




Keep in mind that, just because the equation is continuous and therefore integrable, does not mean that the integral can be expressed using elementary functions. You might be better off with a Taylor approximation.
– Ispil
yesterday












@Ispil for my purposes, the function is only relevant within the range $0$ to $2m$, so that may be workable. So where would I start with finding that? The derivative of $A_x(x)$ is only the next step toward the solution $X(t)$
– Byron
yesterday




@Ispil for my purposes, the function is only relevant within the range $0$ to $2m$, so that may be workable. So where would I start with finding that? The derivative of $A_x(x)$ is only the next step toward the solution $X(t)$
– Byron
yesterday












I was going to try this with the integral of $A_x(x)$
– Byron
yesterday






I was going to try this with the integral of $A_x(x)$
– Byron
yesterday














For what it's worth, collision physics in games usually does not involve anything nearly as complicated as this.
– Rahul
yesterday




For what it's worth, collision physics in games usually does not involve anything nearly as complicated as this.
– Rahul
yesterday















active

oldest

votes











Your Answer





StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2996241%2fhelp-me-complete-this-mathematical-model-for-motion-during-a-collision-for-game%23new-answer', 'question_page');
}
);

Post as a guest





































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2996241%2fhelp-me-complete-this-mathematical-model-for-motion-during-a-collision-for-game%23new-answer', 'question_page');
}
);

Post as a guest




















































































Popular posts from this blog

Aardman Animations

Are they similar matrix

“minimization” problem in Euclidean space related to orthonormal basis