Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trig Calculation....
Message
De
18/12/2003 12:56:29
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
18/12/2003 05:14:43
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00859407
Message ID:
00860420
Vues:
23
>Hi Dragan,
>
>>>
>
>if between(90, angle1, angle2)
>   top=radius + centerY
>else
>   top=max(point1y, point2y)
>endif
>
>Now for other four sides, just rotate the whole logic by a right angle. There may be a little consideration over the right side - whether we have negative angles or we have angles of more then 360. IOW, what's the format of the given data.
>>>
>
>In this case the angle increases counterclockwise but the arc is drawn in a clockwise direction. So 'between(90,angle1,angle2)' won't work in many cases - e.g an arc with a start angle of 20 and an end angle of 40 would pass through the 90 degree axis but the expression would return .F.
>
>See my post to Gregory for my current attempt - which I don't particularly like...

That one's as good as it can be - short of repeating my code four times and handling a special case for the right edge. As for the direction of drawing the arc, I'd rather switch the places for the angles, and have them drawn in the standard mathematical direction (i.e. counterclockwise, aka positive direction), simply because that's the way of trigonometry.

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