commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilles (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GEOMETRY-7) Add Support for Polar and Spherical Coordinates
Date Tue, 10 Jul 2018 20:29:00 GMT

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

Gilles commented on GEOMETRY-7:
-------------------------------

As I've hinted before, because there are too many ways to get the API wrong, I think that
we should concentrate on the "Cartesian" side of things as that seems to drive the core functionality.

Anything that is not released cannot hurt; so better defer adding bells and whistles, especially
if you don't use them or/and are not sure how to test them.
Some of the functionality could also be released under a "o.a.c.geometry.experimental" package.

> Add Support for Polar and Spherical Coordinates
> -----------------------------------------------
>
>                 Key: GEOMETRY-7
>                 URL: https://issues.apache.org/jira/browse/GEOMETRY-7
>             Project: Apache Commons Geometry
>          Issue Type: New Feature
>            Reporter: Matt Juntunen
>            Priority: Major
>
> Add support for Polar coordinates in Euclidean 2D space and Spherical coordinates in
Eucllidean 3D space. The coordinate classes should follow VALJO guidelines ([http://blog.joda.org/2014/03/valjos-value-java-objects.html]) and
be directly convertible to and from the corresponding Point/Vector types. The API should look
something like this:
>  
> {code:java}
> Polar polar = Polar.of(1, Math.PI / 2);
> polar.getRadius(); // 1
> polar.getTheta(); // 2
> Vector2D vec = Vector2D.ofPolar(polar);
> // also possible: Vector2D.ofPolar(1, Math.PI / 2)
> // do stuff with vec
> Polar result = vec.getPolar();{code}
>  
> For the Spherical component, the functionality should be merged with the existing o.a.c.geometry.spherical.SphericalCoordinates
class.
>  



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

Mime
View raw message