learning from OpenGL for physical simulation

Dear all, i have a big problem in visualization for my simulation , which is related to physics. I don’t know where can i start learning from the OpenGL,
Actually, i just want to visualize the 2D-array and 3D-array and my array only content -1 or 1 , two numbers

Indeed, i just want to show the colors in OpenGL, but i don’t know which tutorial show i learn…:(:(:(:frowning:

For example ,if the array is {1,-1,1,-1} let Black for 1 and white for -1
i want the openGL can show 4 squares , just like the chess
and 2 black 2 white and also want to show the array dynamically, what i mean is that… the number in the array will change rapidly, from -1 --> 1 , or 1 --> -1
such that the graph can change too,

Anyone can help me or provide some suggestion… please need help

I am doubting that OpenGL is the best tool for this job, and I say that as a huge fan of OpenGL. If you want to learn OGL, I would recommend LearnOpenGL.com as a place to start.

But to merely visualize math problems you may be re-inventing the wheel and going about it in one of the most difficult ways possible.

I know when I was in college, many years ago, they were using programs like Mathematica to visualize math problems.

[QUOTE=dicktim;1286397]i have a big problem in visualization for my simulation , which is related to physics. I don’t know where can i start learning from the OpenGL,
Actually, i just want to visualize the 2D-array and 3D-array and my array only content -1 or 1 , two numbers

Indeed, i just want to show the colors in OpenGL[/QUOTE]

While you could do this, as BBeck1 says you may want to check out existing packages which already implement the visualization techniques you want to use on your 2D slice and 3D data.

Do you have a sense for what kinds of visualizations you’re interested in?

Just to get you started, you might want to take a look at some examples for an existing visualization library and toolset, VTK:

Take a look at the examples and screenshots for visualizing 3D and volume data to get some ideas.

thank you so much,
i start looking at the tutorial website, but i still cannot think how can i visualize my simulation.
Actually, my simulation is related to the physics, which is called the lattice model
you may assume the model is similar to the table below:
口口口口
口口口口
口口口口
口口口口
inside the table, there are 16 space, each space either is colored in white or black , which is represent +1 and -1 respectively.
And when the problem is running, the color will be changed, because of some physical reason,inside the array, some value will change from -1 -->+1, or +1 —> - 1, but the main point is to visualize the +1 and -1 in white and black color.
So that i can have i look and see the insight of physics

Something similar to this should be far enough for you.