Results 1 to 10 of 10

Thread: free SW for Transverse Mercator projections?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4

    Post

    Based on your other post, I think what you want is to go from an image like this (equirectangular):

    Click image for larger version. 

Name:	remappingtest.png 
Views:	196 
Size:	210.1 KB 
ID:	9997

    to this:

    Click image for larger version. 

Name:	remappingtest_sin.png 
Views:	618 
Size:	249.0 KB 
ID:	9998

    I did this using Gimp, with the mathmap plugin, using the following mathmap script I wrote:
    Code:
    unit filter sinusoidal (unit stretched image in)
        divs = 9;
        py = 2;
        counter = 0;
        while (counter <= divs) do
          px = if (x>1-(2*counter/divs)-1/divs && x<=1-(2*counter/divs)+1/divs) 
               then (x-(1-(2*counter/divs)))/cos(y*pi)+1-(2*counter/divs)
               end;
          py = if (x>1-(2*counter/divs)-1/divs && x<=1-(2*counter/divs)+1/divs &&
                   px<=1-(2*counter/divs)+1/divs  && px>=1-(2*counter/divs)-1/divs)
               then y
               else py
               end;
          counter = counter + 1;
        end;
        in(xy:[px,py])
    end
    Change the divs=9 to however many "petals" you want.

    edit: Another thing tha might make this easier to assemble is what i did in the next one. I offset bottom half of the image by 1/2 the petal width (in this case 60 px), ran the filter, then offset the bottom half back (-60px), with wrap on, of course.:

    Click image for larger version. 

Name:	remappingtest_sin2.png 
Views:	235 
Size:	249.3 KB 
ID:	9999

    -Rob A>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •