Exponential function symmetrical over y=x

Started by
2 comments, last by zacaj 12 years, 8 months ago
Im trying to find an exponential function that is symmetrical over the line y=x (2D). Preferably one where I can control how close the 'corner' is to the origin. Does anyone know of one?
Advertisement
There is no such exponential function; the only functions symmetrical in y = x are functions who's inverse is themself (an involution). for example f(x) = x, f(x) = 1/x
[font=arial, helvetica, tahoma, sans-serif][size=2]you can generate more involutions given any involution g, and an invertible f by taking f^-1 . g . f or f . g . f^-1[/font]
[font=arial, helvetica, tahoma, sans-serif][size=2]
[/font]
[font="arial, helvetica, tahoma, sans-serif"]for example take the involution g = 1/x and f = (e^x)-1, then you get f^-1 . g . f = ln(1/(-1+e^x)+1) which looks like: Graph[/font]
if you mirror y = e^x over y = x you get y = ln(x), or just it's inverse

if you want to control the distance to the origin you can divide x by a value, that I will call scaler) between 0 and 1. The line will cross the x axis at 1 / scaler.

this is the equation
y = ln(x / scaler)

Can I ask what this is for?
My current game project Platform RPG
@Luca, thanks, that looks like just what I need
@HappyCoder That function isnt actually symmetrical :( Im using this for a gradient in a graphical effect. (offline, so i didnt bother approximating it somehow)
misread the post.

This topic is closed to new replies.

Advertisement