Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trig Calculation....
Message
From
18/12/2003 12:56:29
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00859407
Message ID:
00860420
Views:
24
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform