Quantcast
Channel: VBForums - Maths Forum
Viewing all articles
Browse latest Browse all 112

[RESOLVED] Invert/Reverse Formula

$
0
0
I'm getting too old. I just simply cannot see the solution.

Here is a formula I am using to determine reduction of a rectangle to ensure it is completely unclipped by a rounded corner outer rectangle.
Code:

CR=.357: S=128: D = CR * S
ADJ = S -  (D - SQR(D * D / 2))

CR is a a constant ratio, user-supplied, and is known, restricted range between 0.0 and 1.0 inclusively
S for this example, is the short side of the rectangle and is known
D is a diameter of the corner circles in the screenshot below and is calculated
ADJ is the deflateD value for the outer rectangle.

So using the formula above, ADJ = 114.616, the adjusted/deflated rectangle. However, I am having trouble trying to reverse my own formula, solving for S when ADJ is known. Any kind math-wizards out there care to share?

Name:  RC.jpg
Views: 31
Size:  6.0 KB

Note: Standard ellipse formulas do not apply. The shape of the rectangle after corners are applied are only guaranteed to be an ellipse (oval or circle) in just one case: when CR = 1.0

Edited. Maybe the equation can't be inverted & so be it.
Attached Images
 

Viewing all articles
Browse latest Browse all 112

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>