Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trig Calculation....
Message
From
17/12/2003 07:32:31
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00859407
Message ID:
00859831
Views:
18
>I agree it's very simple in principle - sketch an example on a scrap of paper and you can easily work out the correct values. I'm just finding it difficult to come up with an (elegant) algorithm to get the program to do the same thing...

This looks like a maximum problem for me, which is usually solved with derivatives.

The basic approach is to calculate the area in terms of a single variable (several variables are possible, but more complicated). In this case, it could be a length.

Then, calculate the derivative of this function. The derivative is a second function that gives the slope of the first function.

This is relatively easy; the main problem, IMO, is the first part: get the expression for the area, in terms of some length.

First, you must define your restrictions (if any): for instance, whether the lines of the rectangle should be horizontal and vertical, or not.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform