Delphi LogN and Power - SuperEllipse functions - algorithm
How can I isolate the 'slope' parameter in the super ellipse function given by:
MyY := (1.0- (power(1.0-power(x, 2.0/Slope), Slope*0.5))开发者_如何学Python)
when I know 'x' and 'MyY' ? (the function is always used in the range of 0 to 1).
No easy way. This equation cannot be solved algebraically. You need to use numerical methods to find the solution (e.g. Newton's method).
I don't need to solve it, to be more precise when i call the function 'MyY :=...', 'x' and 'Slope' are known.
I just need to express it in function of Slope. Instead of MyY := ... I need Slope := ... and I know 'x' and 'MyY'. I just need to express the transfert function in another way, the problem is when using logN I get someting like: (x is always 0.5 , y varies but is know)
Slope/2 = LogN(power(1.0-power(0.5, 2.0/Slope)) (whatever the '1 -', this is not what's stucking me)
from this I cannot move or clear '2.0/slope' from the right part of the equation. On the software way it's used to keep a correlation between a control point and the cursor mouse.
It's just like this: (by analogy) MyY := power(x,slope) // MyY := (1.0- (power(1.0-power(x, 2.0/Slope), Slope*0.5))) slope := Logn(x,MyY) // slope := ?
I just need to express it in another way.
精彩评论