Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Overlapping Shapes  RSS feed

 
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So I've got this problem where I have shape (say a pie-shaped arc) and another shape (say an ellipse), and I want to find out if they overlap. However, not only so I need to find out if they overlap, I need to see if the area that the overlap occurs is more than a third shape (say another pie-shaped arc) and the ellipse.
Anyone have any ideas on how I'd go about implementing this?
 
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You will find 2D geometry goodies in the java.awt and related packages. Take a look at the Shape interface.

Bill
 
What could go wrong in a swell place like "The Evil Eye"? Or with this tiny ad?
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!