PDA

View Full Version : Distorted Projection



Ekky Thump
11-15-2000, 06:40 AM
I want to project the globe onto a 2D projection (Mercator). This is no probs but the projection I require has the projected y value kind of stretched Northwards (above the equator) and southwards (below equator). The stretchiness is non uniform. How do I represent a projection like this in OpenGL? For your info, the y value modification formula is:

y' = log(tan(PI/4 + y/2))

mcraighead
11-15-2000, 01:50 PM
Any projection that can't be represented as a 1st-degree rational function of (x,y,z,w), you'll have to do yourself.

Load an identity projection and send down Vertex4f's. You can skip the w, but it'll cost you perspective correction. Though it's not totally clear what perspective correction means in this case...

- Matt

Ekky Thump
11-17-2000, 06:30 AM
I don't see how I can represent this projection at all in OpenGL - the projected y value is a function of y. Can't specify a matrix for this. Am I missing something simple?