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:

Status badges


Right now, the Spherical transform documented here:

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

Attachments (1)

trac_10368_SphericalElevation.patch (4.5 KB) - added by benjaminfjones 11 years ago.
adds class SphericalElevation?

Download all attachments as: .zip

Change History (5)

comment:1 Changed 11 years ago by benjaminfjones

  • Authors set to Benjamin Jones
  • Status changed from new to needs_review

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.

Changed 11 years ago by benjaminfjones

adds class SphericalElevation?

comment:2 Changed 11 years ago by jason

  • 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 jdemeyer

  • Milestone changed from sage-4.6.1 to sage-4.6.2

comment:4 Changed 11 years ago by jdemeyer

  • 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.