Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Determining ellipse intersects
Message
De
26/01/2006 19:03:01
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01090687
Message ID:
01090773
Vues:
9
>I want to be able to determine where two ellipses intersect when they are over layed.
>
>Each ellipse is the same size - same leght - same widths. The are over-layed such that their long axis bisect and are perpendicular.
>
>For "minor" widths greater than zero, the ellipses would intersect at 4 points. If the points were connected, the would form a square.
>
>If both ellipses were zero width they would look like a '+' sign and would all intersect at the origin (0).
>
>I know the width and lenght and origin of the concentric ellipses.
>
>How can I determine the intersect points? A radian lenght (distance from origin) would be okay - or a cartesian plot would also be good (either would derive the other, right?)

The resulting equation would be of fourth order, and would have four solutions. But, since you have a simplified case, i.e. your ellipses are parallel to the origin of the coordinate system, you can simply substitute one variable for x**2 and another for y**2, then solve this as a set of two linear equations.
Then substitute back - taking all four combinations (++, +-, -+, --) of values of the square roots of your solutions.

If your ellipses don't have their axes parallel to the coordinate axes, or their centers aren't in (0,0), then do some rotation and/or translation first to get them there, and in the end do the inverse translation and/or rotation of the result. But since you mention that they are at the center, and that they would make a "+" in the trivial case, then you have this simple case.

Actually, it may be even simpler - if they are identical, just one rotated by 90 degrees over the other, then you can calculate this in a really simple manner: your x=y (or x=-y), so you can substitute y for x in the equation of either of them, solve it for y and that's it.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform