pixel icon indicating copy to clipboard operation
pixel copied to clipboard

Ellipse geometry

Open bcvery1 opened this issue 5 years ago • 1 comments

The geometry code covers:

  • Points/Vectors
  • Rectangles
  • Circles
  • Matrices

Lines (pairs of vectors) are covered by #167

Would it be useful to extend the circle code to instead be ellipses? I.E. a circular shape where the horizontal radius is potentially different to the vertical radius. I imagine the collision detection would be more complex than the other shapes.

I note that imdraw supports ellipse

bcvery1 avatar Mar 25 '19 10:03 bcvery1

Hmm, possibly, although questions come up. How about rotated ellipses? Only supporting non-rotated ellipses won't be very useful I guess. But then, we only support non-rotated rectangles. Should we add support for rotated ones? And the last question: is it useful?

Also, this makes me think whether it wouldn't be better to make a separate package/sub-package just for collision detection and handling. If so, we could probably move all the circle and line code over there too (vector and rectangle code needs to stay because those are used by the rest of Pixel).

faiface avatar Mar 26 '19 00:03 faiface