Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calculating Curvature with an Array
Message
De
22/04/2008 17:08:38
Dave Nantais
Light speed database solutions
Ontario, Canada
 
 
À
19/04/2008 08:08:08
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01311849
Message ID:
01312505
Vues:
12
>There must be a way to calculate that using another value, like 100 for a circle (or >ellipse) and 0 for a square (or rectangle) and create the array used to create the >shape.


you can create as many (x,y) points on the graph as you like.

suppose you have a circle of radius r
given the x coordinate you can calculate the y coordinate in this way

y = (r^2 - x^2)^(1/2)

crank as many points as necessary.

this is just a rearrangement of ( x^2 + y^2 = r^2 ) the pythagorean theorem.

have fun!
Dave.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform