Interpolate points of an Heightmap

3 views (last 30 days)
Carmine Buonagura
Carmine Buonagura on 1 Oct 2020
Good evening, I'm constructing an heightmap from a 3D model. For this reason I've passed from cartesian coordinates to spherical ones. It works great, and the generated heightmap is in the following image. The problem arieses at longitudes equal to 180° and -180°, as there are not points in that positions, and I need to guarantee the continuity between the right and left side of the image (e.g. the point with longitude = 180° and latitude = 90° must have the same altitude of the point with longitude= -180° and latitude = 90°).
The matrix of points is structured in this way: P = [longitude_coord, latitude_coord, elevation_coord]
P = [longitude_coord, latitude_coord, elevation_coord];
where longitude_coord, latitude_coord and elevation_coord are coloumn vectors.
I' ve defined the bounday points in this way:
n = 10;
boundary_right = [pi*ones(n,1),linspace(-pi/2,pi/2,n)'];
boundary_left = [-pi*ones(n,1),linspace(-pi/2,pi/2,n)'];
The problem is that I don't have the elevation of these points (each row of the two matrices will have the same elevation) that must be obtained (I hope) interpolating in some way the adjacent points. The same thing has to be done with the bottom and top points.
Do you have any suggestion?

Answers (0)

Categories

Find more on Interpolation in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!