Jump to content
  • Advertisement
Sign in to follow this  
plywood

thermal mapping with openGL

This topic is 3680 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!