Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the ability to calculate <Camera> element parameters from a <LookAt> element #27

Open
GoogleCodeExporter opened this issue Feb 11, 2016 · 1 comment

Comments

@GoogleCodeExporter
Copy link

Given a <LookAt> element, determine the location of the camera.  

Original issue reported on code.google.com by [email protected] on 30 Aug 2011 at 9:10

@GoogleCodeExporter
Copy link
Author

an initial attempt, which may be helpful to build from...

#def get_camera_location(lat1,lon1,altitude1,heading1,range1):
#    "Determines the Camera location given LookAt parameters"
#    
#    #ref: http://en.wikipedia.org/wiki/Mercator_projection
#    # N - Northing
#    # E - Easting
#    # lambda - longitude
#    # phi - latitude
#    # R - radius = 6378137m
#    
#    # TODO: implement
##    # spherical mercator equations
#     #E = R (lambda - lambda0)
#     #    N = R ln tan(pi / 4 + phi / 2)
##
##    # reverse spherical mercator
##    lambda = E / R + lambda0
##   phi - pi/2 - 2*arctan(exp(-N/R))
#    
#    return lat2,lon2,alt2

Original comment by [email protected] on 30 Aug 2011 at 9:10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant