Hello everyone,(adsbygoogle = window.adsbygoogle || []).push({});

I need your help desparately!

I need to figure out a penalty function that computes the penalty w.r.t distance of a point from two boundaries. The function produces a high penalty value if the point is closer to any of the two boundary and the penalty value decreases as the distance from boundaries increases. Two boundary can be viewed as distance from two axis.

Formulation:

Let x be the distance from Y axis and y be the distance from X axis, I need a penalty function

P = f(x,y) having above property

Thanks in advance.

Jason

**Physics Forums | Science Articles, Homework Help, Discussion**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Distance function

**Physics Forums | Science Articles, Homework Help, Discussion**