sunclock
Contents: Description, Arguments, Usage, Examples, Images, Sub-Functions, Related Functions, Source Supported Under Version: > 1.13
Description Displays sunclock, an image/map that uses shading to indicate the day and night regions on a planet
Arguments and Return Values Parameters: One numeric array (byte format) that represents an image/map of the planet in question, and the coordinates Return Value: Displays sunclock image and returns corresponding byte array
Usage Syntax: sunclock(image, lat, lon) image should be a byte array representing a global image/map of the planet in equirectangular projection, centered (like most global maps) at 0 E and 0 N (intersection of prime meridian and equator) lat and lon are the coordinates of the subsolar point. They should be input as separate scalars. North latitude and east longitude are positive. Latitude of the subsolar point is also known as declination. This function simply assumes that the terminator (boundary between day and night sides) is five degrees wide, centered on the great circle ninety degrees from the subsolar point. This is just an educated guess, and it probably varies between planets. This function also assumes that the body in question is a perfect sphere, which isn't exactly right but is within 1% for most planets, including Earth and Mars. Given those assumptions, this function works for any planet or moon. It performs the same calculation for shading regardless of the input image. When sunclock() is entered without any arguments, it prints its description, as shown below.
Examples dv> sunclock() Given global image and coordinates of subsolar point, displays sunclock sunclock(image, lat, lon) image is byte array, assumed to be equirectangular map/view of planet image is assumed to be centered on 0 E, 0 N lon is longitude of subsolar point (east positive) lat is latitude of subsolar point (a.k.a. declination; north positive) This function assumes that the planet is a sphere, which isn't quite right but is a good approximation (within 1%) for most planets This function also assumes that the terminator is five degrees wide, centered along the great circle that is 90 degrees from the sub-solar point. Returns byte array used to generate image S.Marshall 11-13-2009 0 dv> sunclock(MarsVik, 6.0145, 111.3183) Writing /tmp/dv_10737/OIgvAb: 720x360x3 PNG file. 720x360x3 array of byte, bip format [777,600 bytes]
|
DavinciWiki Mini-Nav Bar Contents
Contact Developers
All other topics
Major Sub-Functions
Recent Library Changes Created On: 11-18-2009 |