thermal mapping with openGL
I've read a few intro. tutorial on OpenGL, and understand the basics, and was wondering if anybody could shed some light on how to implement this problem with it:
If we have a pixel matrix, with each pixel representing a different "heat content" of a thermal map, then we could represent the matrix according to some "heat-coloring scheme":
01 = Violet (very cold)
02 = Blue (chilly)
03 = Yellow (mild)
04 = Orange (hot)
05 = Red (very hot)
And thus, a 1x9 (R x C) pixel matrix of (02 03 03 04 05 04 03 02 01) would represent a thermal map of pixels of colors (B Y Y O R O Y B V); just try to imagine these colors in a row sequence.
Essentially my program will output a large matrix of these types of integers, which will be converted to colors, thus producing a thermal map.
(1) Can OpenGL be used to display this map?
(2) If so, how? Else, why not?
Quote:Original post by plywood
(1) Can OpenGL be used to display this map?
Yes.
Quote:(2) If so, how?
Either convert your map into properly colored texture, and slap that onto a rectangle, or let your map pixels be vertices, assign colors to them, and connect them into a grid.
1) Yes.
2) There are a variety of options. The simplest way would probably be to simply convert the [n][n] matrix into a [n*n*3] matrix with the appropriate RGB values and load them into a texture with glTexImage2d. That texture can then be displayed on a surface, such as a quad covering the screen.
2) There are a variety of options. The simplest way would probably be to simply convert the [n][n] matrix into a [n*n*3] matrix with the appropriate RGB values and load them into a texture with glTexImage2d. That texture can then be displayed on a surface, such as a quad covering the screen.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement