Re: Earth texture mapping
- From: "Sakratif ibn Zamzam" <sakratif@xxxxxxxxx>
- Date: Sat, 31 Mar 2007 17:08:12 -0500
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:
sphere
Scott wrote:
NASA
Dan wrote:
Hi everybody!
I'm trying to execute a texture mapping of the earth with a
image, but i've got a problem. After I've created the
the[X,Y,Z]=sphere(50) and loaded the image with
img=imread('filename.ext'), i do the texture mapping with
Xcommand
warp(X,Y,Z,img), but the figure has wrong axes. I mean, the
andinverting
matlabthe
Y axes are rotated by 90 degrees clockwise with respect to
axes of the figure(that is the Greenwhich meridien has alongitude
of
90° E instead of 0°). I tried to solve the problem
theruins
becauseaxes
with the YDir and XDir command, but it has been useless
I
figurehave other data (the orbit) correctly plotted in the same
and
in the right axes of the figure, so inverting the axes
thematter
plot
of the orbit.
Any suggestion to solve this problem? I believe it's a
ofrotate
reference frame of the figure itself, so my idea is to
thesphere
direction,image with respect to the sphere along the longitude
butplane
iimrotate,
haven't the faintest idea on how to do this: the command
infact, rotates the image about an axis orthogonal to the
ofYou
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.
can just manipulate the img matrix prior to surfacing the
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
- Prev by Date: Re: Regarding Matrix computation
- Next by Date: Re: Which method is used for matrix inversion in MATLAB?
- Previous by thread: Which method is used for matrix inversion in MATLAB?
- Next by thread: Re: making embedded matlab run faster:
- Index(es):
Relevant Pages
|