projection

Download Projection

If you can't read please download the document

Upload: gangolas

Post on 12-Nov-2015

213 views

Category:

Documents


0 download

DESCRIPTION

FT3 Demo Projection

TRANSCRIPT

// projection definition file format//// simple text-based file.//// each projection is composed of a number of segments, each having// a number of associated exlusion triangles. Each of these segments// is evaluated in order during a scan. For best performance, the// segments should be listed in the scanning order of the software:// across the columns (increasing X) then down the columns (increasing Y).//// A segment defines a slice of a projection. It has the basic// projection parameters (cenlat, cenlon, ofsx, ofsy, zoom, lat0, lon0).// It also has the offset within the defined image space (image space is// defined as -1 to +1 in X and Y for the image; offset allows moving// segments from the 0,0 point of the world). To limit exclusion checks,// a segment has an area of effect (the edges of a lat/lon bounding box// on the sphere). All lat, lon values are defined in degrees.// Projection IDs must be defined between 64 and 191. Projection IDs// outside this range will be silently rejected by the system even// though the definition is valid. End users should define their// projections on 128 to 191 to avoid collisions with potential// future FT-programmer-defined releases.//// Associated with each projection segment are zero or more exclusion// triangles. These triangles are defined in image space. If a point// lands within an exclusion triangle it is no part of this segment.// Exclusion triangles allow for infinite-extent projections to be// bounded on the image plane (for example, an icosahedral projection// based on the stereographic projection would have 20 segments, each// bounded by 3 triangles to limit the area of extent). Note that the// triangles are defined on the whole plane, not just on the +/- 1 X/Y// image plane. The points should not be too large (maybe +/- 20), but// making them too closely-bounded to the plane will leave parts of// infinite projections exposed to the user's scrutiny.//// Projection ID, "Name"//// Extent l, t, r, b // screen-space extents for the projection.// Scale scalefactor // whole-screen scale factor for the projection//// Segment "ProjName", cenlat, cenlon, ofsx, ofsy, zoom, lat1, lat2// Rotate angle // rotation angle in (deg counterclockwise)// Scale xscale, yscale // scaling factor (deg)// Offset imgofsx, imgofsy // offset area// forward projection is computed as Rotate( angle, Forward(lat,lon) * scale)+offset// Effective leftlon, toplat, rightlon, botlat // area of interest// Exclude type, outside, [data]// // type == 0, triangle with data as pt1x, pt1y, pt2x, pt2y, pt3x, pt3y// // type == 1, circle with data as cenx, ceny, radius// // outside == 1 if data outside the specified zone should be excluded// // other EXCLUDE definitions go here// EndSegment // segment def//// // other segment definitions go here//// EndProjection//Projection 64, "6-way Interrupted Sinusoidal"Extent -3.14159265, 1.57079633, 3.14159265, -1.57079633Scale 1.57079633Description "Demonstration of an interrupted projection. No fancy features, just a basic definition."Segment "Sinusoidal", 0, -3*60+30, 0, 0, 1, 0, 0Offset -3*0.33333333, 0Effective -3*60, 90, -3*60+60, -90EndSegmentSegment "Sinusoidal", 0, -2*60+30, 0, 0, 1, 0, 0Offset -2*0.33333333, 0Effective -2*60, 90, -2*60+60, -90EndSegmentSegment "Sinusoidal", 0, -1*60+30, 0, 0, 1, 0, 0Offset -1*0.33333333, 0Effective -1*60, 90, -1*60+60, -90EndSegmentSegment "Sinusoidal", 0, 0*60+30, 0, 0, 1, 0, 0Offset 0*0.33333333, 0Effective 0*60, 90, 0*60+60, -90EndSegmentSegment "Sinusoidal", 0, 1*60+30, 0, 0, 1, 0, 0Offset 1*0.33333333, 0Effective 1*60, 90, 1*60+60, -90EndSegmentSegment "Sinusoidal", 0, 2*60+30, 0, 0, 1, 0, 0Offset 2*0.33333333, 0Effective 2*60, 90, 2*60+60, -90EndSegmentEndProjection//---------------------------------------------------------------------------Projection 65, "Rotation Demo"Extent -3.14159265, 1.57079633, 3.14159265, -1.57079633Scale 1.57079633Description "Demonstration of interrupted projection with rotations."Segment "Sinusoidal", 0, -180+45, 0, 0, 1, 0, 0Rotate -45Offset -0.35345, -0.35345Effective -180, 90, -90, -90EndSegmentSegment "Sinusoidal", 0, -45, 0, 0, 1, 0, 0Rotate 45Offset 0.35345, -0.35345Effective -90, 90, 0, -90EndSegmentSegment "Sinusoidal", 0, 45, 0, 0, 1, 0, 0Rotate 135Offset 0.35345, 0.35345Effective 0, 90, 90, -90EndSegmentSegment "Sinusoidal", 0, 180-45, 0, 0, 1, 0, 0Rotate -135Offset -0.35345, 0.35345Effective 90, 90, 180, -90EndSegmentEndProjection//---------------------------------------------------------------------------Projection 66, "Exclusion Test"//Extent -100, 100, 100, -100Scale 1.57079633Description "Demonstration of exclusion zones."Segment "Stereographic", 0, 0, 0, 0, 1, 0, 0scale 1, 1Offset 0.0, 0.0Effective -120, 60, 120, -60Rotate 0Exclude 0, 0, 0, 0, 0.5, 0.86602540378443864676372317075294, 1, 0Exclude 1, 0, -1, -1, 0.5EndSegmentEndProjection//---------------------------------------------------------------------------Projection 67, "18-way Stereographic Gores"Extent -3.15, 1.57079633, 3.15, -1.57079633Scale 1.57079633Effective -9*20, 90, -9*20+20, -90Segment "Stereographic", 0, -9*20+10, 0, 0, 1, 0, 0Offset -9*0.175, 0Effective -9*20, 90, -9*20+20, -90EndSegmentSegment "Stereographic", 0, -8*20+10, 0, 0, 1, 0, 0Offset -8*0.175, 0Effective -8*20, 90, -8*20+20, -90EndSegmentSegment "Stereographic", 0, -7*20+10, 0, 0, 1, 0, 0Offset -7*0.175, 0Effective -7*20, 90, -7*20+20, -90EndSegmentSegment "Stereographic", 0, -6*20+10, 0, 0, 1, 0, 0Offset -6*0.175, 0Effective -6*20, 90, -6*20+20, -90EndSegmentSegment "Stereographic", 0, -5*20+10, 0, 0, 1, 0, 0Offset -5*0.175, 0Effective -5*20, 90, -5*20+20, -90EndSegmentSegment "Stereographic", 0, -4*20+10, 0, 0, 1, 0, 0Offset -4*0.175, 0Effective -4*20, 90, -4*20+20, -90EndSegmentSegment "Stereographic", 0, -3*20+10, 0, 0, 1, 0, 0Offset -3*0.175, 0Effective -3*20, 90, -3*20+20, -90EndSegmentSegment "Stereographic", 0, -2*20+10, 0, 0, 1, 0, 0Offset -2*0.175, 0Effective -2*20, 90, -2*20+20, -90EndSegmentSegment "Stereographic", 0, -1*20+10, 0, 0, 1, 0, 0Offset -1*0.175, 0Effective -1*20, 90, -1*20+20, -90EndSegmentSegment "Stereographic", 0, 0*20+10, 0, 0, 1, 0, 0Offset 0*0.175, 0Effective 0*20, 90, 0*20+20, -90EndSegmentSegment "Stereographic", 0, 1*20+10, 0, 0, 1, 0, 0Offset 1*0.175, 0Effective 1*20, 90, 1*20+20, -90EndSegmentSegment "Stereographic", 0, 2*20+10, 0, 0, 1, 0, 0Offset 2*0.175, 0Effective 2*20, 90, 2*20+20, -90EndSegmentSegment "Stereographic", 0, 3*20+10, 0, 0, 1, 0, 0Offset 3*0.175, 0Effective 3*20, 90, 3*20+20, -90EndSegmentSegment "Stereographic", 0, 4*20+10, 0, 0, 1, 0, 0Offset 4*0.175, 0Effective 4*20, 90, 4*20+20, -90EndSegmentSegment "Stereographic", 0, 5*20+10, 0, 0, 1, 0, 0Offset 5*0.175, 0Effective 5*20, 90, 5*20+20, -90EndSegmentSegment "Stereographic", 0, 6*20+10, 0, 0, 1, 0, 0Offset 6*0.175, 0Effective 6*20, 90, 6*20+20, -90EndSegmentSegment "Stereographic", 0, 7*20+10, 0, 0, 1, 0, 0Offset 7*0.175, 0Effective 7*20, 90, 7*20+20, -90EndSegmentSegment "Stereographic", 0, 8*20+10, 0, 0, 1, 0, 0Offset 8*0.175, 0Effective 8*20, 90, 8*20+20, -90EndSegmentEndProjection//---------------------------------------------------------------------------