Re: Earth texture mapping



Dan I had the same problem with
you
I used
[eX,eMap]=imread('myimage');
and then i tested the map with
warp(eX,eMap) and everything was inverted

It worked for me with
warp(fliplr(flipud(eX)),eMap)

Dan wrote:


Scott wrote:


Dan wrote:


Hi everybody!
I'm trying to execute a texture mapping of the earth with a
NASA
image, but i've got a problem. After I've created the
sphere
[X,Y,Z]=sphere(50) and loaded the image with
img=imread('filename.ext'), i do the texture mapping with
the
command
warp(X,Y,Z,img), but the figure has wrong axes. I mean, the
X
and
the
Y axes are rotated by 90 degrees clockwise with respect to
matlab
axes of the figure(that is the Greenwhich meridien has a
longitude
of
90° E instead of 0°). I tried to solve the problem
inverting
the
axes
with the YDir and XDir command, but it has been useless
because
I
have other data (the orbit) correctly plotted in the same
figure
and
in the right axes of the figure, so inverting the axes
ruins
the
plot
of the orbit.

Any suggestion to solve this problem? I believe it's a
matter
of
reference frame of the figure itself, so my idea is to
rotate
the
image with respect to the sphere along the longitude
direction,
but
i
haven't the faintest idea on how to do this: the command
imrotate,
infact, rotates the image about an axis orthogonal to the
plane
of
the figure and this is not the case.

Thank you all for any suggestion.

Dan,

I think the commands flipud and fliplr might be helpful to you.
You
can just manipulate the img matrix prior to surfacing the
sphere
so
your orbit stuff will remain unaltered.

hth,
Scott


Hi Scott
Thank you for your early replay. I've already tried the flipud and
fliplr commands, but they don't solve the problem, because they
have
a similar effect to imrotate: i've been just able to make the
northern hemisphere the southern one, and the western hemisphere
the
eastern one.
Now i'm trying to drift the image directly over the sphere or to
define a new origine for the image, but i've still no solution for
the problem.

Thank you very much for your help.

Dan
.



Relevant Pages

  • Re: Stalls and Thoughts
    ... Dan wrote: ... command" is that condition where induced drag is at its greatest, ... pitch only controls airspeed, ...
    (rec.aviation.piloting)
  • Re: a grab bag of customizations
    ... That means "user 'dan' on machine name 'dan-desktop', ... (The 'man' command displays the manual page for the command you ... You must not forget that GNU/Linux is a UNIX system, ...
    (comp.os.linux.misc)
  • Re: packages algorithm and tocbibind
    ... > Thanks Dan, it works for me (although I don't understand why the toc ... > Is this a bug in the algorithm or tocbibind package? ... list into the TOC. ... If that command is undefined it is silently ...
    (comp.text.tex)
  • Re: Problem setting a4paper option using dvips
    ... >>> Well, thank you Dan, that certainly did the trick. ... >> You should warn your users that if dvips seems to ignore the paper size ... >>> Should I submit this as a MikTeX bug? ... >> changed so that the second type of paper size command comes first. ...
    (comp.text.tex)
  • Re: default chunk size for wss in 2003 (sp1) command line variable
    ... Thanks so much Dan my man ... does nothing but gve a command line error - and I think the reason is the ... "Dan Orchard" wrote: ... > Seth at Sherwood wrote: ...
    (microsoft.public.sharepoint.windowsservices)