gettingstarted
[Top] [All Lists]

Re: Trigonometry help

To: Getting Started <gettingstarted at lists dot realsoftware dot com>
Subject: Re: Trigonometry help
From: Eirik Karlsen <eikarlse at online dot no>
Date: Wed, 29 Dec 2004 22:12:13 +0100
Delivered-to: gettingstarted at lists dot realsoftware dot com
References: <149 dot 3bc46e8a dot 2f047605 at aol dot com>
Thanks for your prompt reply.
Your approach is apparently simpler than mine, I'll check it out immediately!

GAmoore at aol dot com wrote:

> > On a canvas, at location 150,150, are two filled concentric circles
> > (360deg ArcShapes),
> >
> Isn't drawoval better to use here?
>
> > the one on the bottom has a radius of 100 and the  one on the top has a
> > radius of 90.
> >
> (150,150) is the center for both, right?
>
> > The problem is to identify (set a flag) when the mouse is in the non
> > overlapping area...
> > that is; inside of the bigger circle AND outside of the smaller one.
> >
>
> - grab the mouse position : (xm, ym)
> - compute distance D from center to that point
>       distance( xm, ym)
>       compute sqrt( (xm-150)^2 + (ym-150)^2)
> - if D <= 90 then InSmallCir = true //set a boolean variable InSmallCir to
> indicate in the small circle
>    if D <= 100 then InBigCir = true
>  if InBigCir and Not(InSmallCir) then ... you're in the annulus (ring) of
> width 10
>
> I was hoping there would be some need for trig here.
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://www.realsoftware.com/support/listmanager/>
>
> Search the archives of this list here:
> <http://www.realsoftware.com/listarchives/lists.html>

--
*******************************************
VISIT MY HOME PAGE:
<http://home.online.no/~eikarlse/index.htm>
LAST UPDATED: 23/08/2003
*******************************************
Regards
Eirik Karlsen


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>