You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Matt Juntunen (JIRA)" <ji...@apache.org> on 2018/07/21 03:46:00 UTC

[jira] [Updated] (GEOMETRY-7) Add Support for Polar and Spherical Coordinates

     [ https://issues.apache.org/jira/browse/GEOMETRY-7?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matt Juntunen updated GEOMETRY-7:
---------------------------------
    Description: 
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.

 

Pull request: https://github.com/apache/commons-geometry/pull/7

 

  was:
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.

 


> 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.
>  
> Pull request: https://github.com/apache/commons-geometry/pull/7
>  



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