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

Generalize Angle class? #38

Closed
fryguybob opened this issue Aug 4, 2012 · 0 comments
Closed

Generalize Angle class? #38

fryguybob opened this issue Aug 4, 2012 · 0 comments

Comments

@fryguybob
Copy link
Member

(Imported from http://code.google.com/p/diagrams/issues/detail?id=84. Original issue from byor...@gmail.com on June 10, 2012, 06:29:18 PM UTC)

We could associate instances of the Angle class with
vector spaces, by also moving the 'direction' and 'e' functions into
the Angle class. That is, an angle is anything which can be obtained
from a vector, and converted back to a unit vector, subject to the
laws

(1) forall a, magnitude (e a) == 1

  (e always produces unit vectors)

(2) direction . e === id

  (converting from an angle to a vector and back is the identity)

(3) forall v,
exists k >= 0, v == k *^ (e . direction) v

  (converting from a vector to an angle and back results in a
  positive scalar multiple of the original vector)

Perhaps the class should be called Direction instead of Angle.

In any case, it's not clear to me whether this would be cool or whether it would just make things too complicated. It would be nice to be able to directly provide a vector when a direction is wanted, and to be able to talk about directions in dimensions other than two; but the downsides aren't (yet) clear to me.

The first step is probably just to do a thorough analysis of what would be affected by such a change, along with some examples of its utility.

@bergey bergey mentioned this issue May 23, 2014
@bergey bergey closed this as completed Aug 20, 2014
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

2 participants