[ 
https://issues.apache.org/jira/browse/GEOMETRY-23?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16664894#comment-16664894
 ] 

Gilles commented on GEOMETRY-23:
--------------------------------

bq. while there are indeed multiple representations possible for vectors (eg, 
Cartesian, polar, barycentric, etc), they are not equally useful from a 
computational perspective.

Sure (although some computations are easier in polar coordinates...), but this 
does not mean that we can make as if the other coordinate system do not exists, 
especially as the library references them.

bq. Cartesian coordinates function as something of a lowest common denominator 
for analytic geometry.

This compounds "implementation" and "definition": [simpler does not mean more 
fundamental|http://mathworld.wolfram.com/CoordinateSystem.html].

bq. This is witnessed by your dot product example above where the spherical 
coordinates had to be converted to Cartesian and back again.

No! The "steps" meant to show that the dot product does not depend on the 
coordinate system (only the implementation does!).  E.g.:
{noformat}
dot(a, b) = |r_a| |r_b| cos(theta_a - theta_b)
{noformat}
where the polar coordinates of vectors a and b are, respectively
{noformat}
(r_a, theta_a)
(r_b, theta_b)
{noformat}

bq. makes sense to me to have our primary vector/point class use this system 
and provide an API for easy conversion between other coordinate systems. This 
is what we have now.

Implementation-wise, yes, but the API is wrong, because a vector is not a set 
of Cartesian coordinates (the reverse is true).

bq.  post the issue to the dev ML for some outside feedback?

Sure!

> Remove Euclidean Point Classes
> ------------------------------
>
>                 Key: GEOMETRY-23
>                 URL: https://issues.apache.org/jira/browse/GEOMETRY-23
>             Project: Apache Commons Geometry
>          Issue Type: Improvement
>            Reporter: Matt Juntunen
>            Priority: Major
>              Labels: pull-request-available
>
> Based on discussion of the current Point/Vector API in GEOMETRY-14 and 
> research into other geometric libraries, I think we should remove the 
> Euclidean Point?D classes and make Vector?D also implement Point. This will 
> end up being similar to the previous commons-math design but avoids the issue 
> raised in MATH-1284 since the Point and Vector interfaces are not related. 
> They just happen to be implemented by the same class, which we're calling 
> Vector?D since a vector can be used to indicate a point (by adding it to the 
> origin).
> In the course of trying this out this design, I ended up removing 7 classes 
> and simplifying several methods. I think that's a good indicator that this is 
> a good design choice.
>  
> Pull request: https://github.com/apache/commons-geometry/pull/15



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to