Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ellipse geometry #171

Open
bcvery1 opened this issue Mar 25, 2019 · 1 comment
Open

Ellipse geometry #171

bcvery1 opened this issue Mar 25, 2019 · 1 comment

Comments

@bcvery1
Copy link
Contributor

bcvery1 commented Mar 25, 2019

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

@faiface
Copy link
Owner

faiface commented Mar 26, 2019

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants