# Difference between revisions of "Talk:Parabolic Shot"

## Asking for "Inverse" convert type

I'm trying to implement the equations for a parabolic show with small damping forces (the ones that exists when the projectile is shot in the air)

The equations are those:

$\displaystyle X(t) = X_0 + \frac {V_{0x}} {b} \left(1- e^{-bt} \right)$

$\displaystyle Y(t) = Y_0 + \frac {1} {b} \left( \frac {G} {b} + V_{0y} \right) \left( 1-e^{-bt}\right) - \frac {G} {b} t$

Where:

t = the current equation time

b = c/m

c = the damping coefficient

m = the projectile mass

G = the gravity acceleration

and $\displaystyle V_{0x}$ , $\displaystyle V_{0y}$ , $\displaystyle X_0$ and $\displaystyle Y_0$ are the initial conditions for velocity and position.

If c=0 (no damping forces) the original differential equations are different and its integration gives other equations:

$\displaystyle X(t)=X_0 + V_{0x}\cdot t$

$\displaystyle Y(t)=Y_0-\frac{1}{2}\cdot G \cdot t^2 + V_{0y}\cdot t$

Implement in synfig one or other equation is quite easy using the Switch convert type. Other thing is implement the first group of equations.

As well as the parameter b is dividing and multiplying at the same time there are only one possible solutions to implement that with the current synfig convert types possibilities: That the user enter the value of b and the value of 1/b into two separated parameters.

To avoid that I'm asking for a "Inverse" convert type. It should have following sub - parameters:

• Real "Zero"
• Real "Infinite"

Where:

Link is the parameter to be inverted: It can be a Real number only.

Infinite is a very big value that represent a division by a small number smaller or equal to Zero.

Zero is the smaller value that can be inverted. If abs(Link)<=Zero then it returns Infinite. Zero is not allowed to be 0.0. The convert type should limit it to a small value given internally by the code.

Would it be possible to implement the "Inverse" convert type? --Genete 10:17, 27 December 2007 (EST)

• Real "Epsilon"
• Real "Infinite"

with this logic:

   if (abs(link) < epsilon)