Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #3382

Re: Programming question determining two circle's relation

From Roedy Green <see_website@mindprod.com.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: Programming question determining two circle's relation
Date 2011-04-30 11:49 -0700
Organization Canadian Mind Products
Message-ID <08mor6d59rnoq6hhd8s4q6lgpn8nrioovg@4ax.com> (permalink)
References <892252a0-e31d-426b-8f47-d37c0b2ec364@17g2000prr.googlegroups.com>

Show all headers | View raw


On Sat, 30 Apr 2011 01:33:34 -0700 (PDT), byhesed <byhesed@gmail.com>
wrote, quoted or indirectly quoted someone who said :

>What's wrong with contains and overlaps method in Circle2D class?
>It returns incorrect answers.

Usually inside/outside weirdness is caused by winding direction.  A
shape defined clockwise is not the same as a shape defined
anti-clockwise.

Whenever you define a shape, you really define two, the obvious one,
and the one containing everything but the obvious one.

It might help to draw some shapes and fill them with colours to make
sure you have them defined properly.
-- 
Roedy Green Canadian Mind Products
http://mindprod.com
Politicians complain that Kindles and iBooks are killing jobs by 
destroying the paper book industry.  I see it that they have create a way 
to produce books for less than a third the cost without destroying forests 
and emitting greenhouse gases in the process.  They have created wealth.  
They are encouraging literacy and cutting the costs of education.  

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Find similar


Thread

Programming question determining two circle's relation byhesed <byhesed@gmail.com> - 2011-04-30 01:33 -0700
  Re: Programming question determining two circle's relation byhesed <byhesed@gmail.com> - 2011-04-30 01:59 -0700
    Re: Programming question determining two circle's relation "Gavino" <invalid@invalid.invalid> - 2011-04-30 17:51 +0200
      Re: Programming question determining two circle's relation byhesed <byhesed@gmail.com> - 2011-04-30 09:01 -0700
        Re: Programming question determining two circle's relation "Gavino" <invalid@invalid.invalid> - 2011-04-30 18:33 +0200
    Re: Programming question determining two circle's relation byhesed <byhesed@gmail.com> - 2011-04-30 02:03 -0700
  Re: Programming question determining two circle's relation byhesed <byhesed@gmail.com> - 2011-04-30 02:50 -0700
    Re: Programming question determining two circle's relation byhesed <byhesed@gmail.com> - 2011-04-30 08:42 -0700
      Re: Programming question determining two circle's relation "Gavino" <invalid@invalid.invalid> - 2011-04-30 17:59 +0200
    Re: Programming question determining two circle's relation "John B. Matthews" <nospam@nospam.invalid> - 2011-04-30 17:25 -0400
      Re: Programming question determining two circle's relation Patricia Shanahan <pats@acm.org> - 2011-04-30 17:03 -0700
        Re: Programming question determining two circle's relation "John B. Matthews" <nospam@nospam.invalid> - 2011-05-01 03:10 -0400
  Re: Programming question determining two circle's relation Patricia Shanahan <pats@acm.org> - 2011-04-30 02:08 -0700
  Re: Programming question determining two circle's relation Roedy Green <see_website@mindprod.com.invalid> - 2011-04-30 11:49 -0700

csiph-web