mr_no wrote in Sat Aug 04, 2012 2:37 pm:How far is this from being able to create an instrument with a height map?
mr_no wrote in Sat Aug 04, 2012 6:24 pm:I don't actually need land class just the height.
So I was thinking of plotting (point by point) a very approximate height map, view from above like this.
Is this possible only through nasal TODAY?
mr_no wrote in Sat Aug 04, 2012 6:24 pm:So I was thinking of plotting (point by point) a very approximate height map, view from above like this.
var height_map = my_canvas.createGroup();
for(var x = 0; x < 64; x += 1)
for(var y = 0; y < 64; y += 1)
{
# create a 1x1 sized rectangle without a border
pixels[x][y] = height_map.createChild("path")
.moveTo(x,y)
.horiz(1)
.vert(1)
.horiz(-1)
.close()
.setStrokeLineWidth(0);
}
# ...
for(var x = 0; x < 64; x += 1)
for(var y = 0; y < 64; y += 1)
{
# Set color to whatever you want
pixels[x][y].setColorFill(x/64.0, y/64.0,1);
}
Hooray wrote in Sat Aug 04, 2012 8:07 pm:http://flightgear.org/forums/viewtopic.php?f=30&t=15355&hilit=wxradar]wxradar[/url]
So once you have a generic class, it doesn't matter if you are using a palette to visualize different terrain elevations or different cloud types.
Well, Thorsten mentioned that it would not be possible to use that method for wxradar for the current weather system...
bschack wrote:The code that comes closest to what you immediately need (creating map textures) is in TileMapper.cxx and the classes that it depends on, like Bucket.cxx and Subbucket.cxx (where the real drawing takes place).
Users browsing this forum: No registered users and 0 guests