Opened 11 years ago
Closed 11 years ago
#10368 closed enhancement (fixed)
spherical coordinates should allow specifying an 'elevation' angle as an alternative to the 'inclination' angle
Reported by: | jason | Owned by: | jason, was |
---|---|---|---|
Priority: | minor | Milestone: | sage-4.6.2 |
Component: | graphics | Keywords: | beginner |
Cc: | Merged in: | sage-4.6.2.alpha1 | |
Authors: | Benjamin Jones | Reviewers: | Jason Grout |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
Right now, the Spherical transform documented here:
http://www.sagemath.org/doc/reference/sage/plot/plot3d/plot3d.html#sage.plot.plot3d.plot3d.Spherical
only allows specifying an inclination angle. Some applications (like lattitude and longitude) deal with the elevation angle. It would be great if the spherical transform allowed one to either use 'inclination' or 'elevation' to represent the angle out of the xy plane. See http://en.wikipedia.org/wiki/Spherical_coordinate_system
Attachments (1)
Change History (5)
comment:1 Changed 11 years ago by
- Status changed from new to needs_review
comment:2 Changed 11 years ago by
- Reviewers set to Jason Grout
- Status changed from needs_review to positive_review
This looks great! I like your examples, and all tests pass on this file. Thanks for your contribution!
comment:3 Changed 11 years ago by
- Milestone changed from sage-4.6.1 to sage-4.6.2
comment:4 Changed 11 years ago by
- Merged in set to sage-4.6.2.alpha1
- Resolution set to fixed
- Status changed from positive_review to closed
Note: See
TracTickets for help on using
tickets.
n.b. this is my first contribution of new code to Sage
I've implemented the spherical coordinate system which uses elevation instead of inclination. This is a new class called
SphericalElevation?
. Initially, I wanted to simply change the
Spherical
class so that it would accept 'elevation' as a variable instead of 'inclination'. This didn't seem to be possible in the existing framework (as a base class of
_Coordinates
) since the constructor checks the variable names against the arguments specified in the transform method, so a separate transform method is needed in any case (?).
I've included similar examples to those under
Spherical
along with some new ones which illustrate the difference between
Sphereical Elevation
and
Spherical
. I made sure that the doctests pass and that all the examples included work as expected.
Comments & suggestions are appreciated.