# Equation with two variables?

1. Mar 28, 2013

### wopp

Hi there,

I have a table with two variables that relates to a 2d dose distribution and need to determine a formula that will solve for any point on that surface. Similar to determining the equation of a straight line with a few points (y = mx +c) to then be able to calculate any point on the line.

For example, what i need to calculate: The dose at a specific angle and distance from a point is...
(each parameter is in relation to a single point).

It will save me a LOT of time and effort looking up values and interpolating between them in work, so any help would be appreciated! Even to point me to a resource that explains the method.

2. Mar 28, 2013

### Staff: Mentor

How does that distribution look like? You can use a linear interpolation there as well: z=mx+ny+c.
Other functions might be better, and this Wikipedia article could be interesting.

3. Mar 28, 2013

### wopp

Thank you for the quick reply, its much appreciated!

The distribution represents a dose distribution around a radioactive source so its similar to an exponential fall-off. The wiki link you sent me has distributions similar to what Im looking at actually!

Would a type of polynomial fit work for something of that nature?

4. Mar 28, 2013

### Staff: Mentor

If the grid is fine enough, polynomials will always fit to any reasonable distribution.
You could try to include your physics model (exponential, 1/r^2-law, ...) in the functions to get more accuracy even with less grid cells.