Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trig Calculation....
Message
De
17/12/2003 07:32:31
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
17/12/2003 03:50:02
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00859407
Message ID:
00859831
Vues:
19
>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)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform