Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: nzurb on March 31, 2009, 02:56:05 pm

Title: Visualized matrix for cellular automata?
Post by: nzurb on March 31, 2009, 02:56:05 pm
Dear all,

I'm new to Code::Blocks, and tried to find some info here but couldn't find what I need.
Is there any library or something one could download to get graphical output for cellular automaton based models?
i.e. I would need for example a 100x100 grid with 7-9 different levels shown in colours.
I will probably work with wxSmith to get the forms and buttons etc, but is there anything more specific to what I need?

Thanks for any comments or help.
Title: Re: Visualized matrix for cellular automata?
Post by: Alexis on March 31, 2009, 05:39:53 pm
Hello nzurb,

When using wxSmith, look in "Advanced" thumb. There is a control called wxGrid that could suit you needs :
http://www.wxwidgets.org/images/screens/grid_x11.gif
Title: Re: Visualized matrix for cellular automata?
Post by: nzurb on April 02, 2009, 04:04:22 pm
Thank you. I had a look at your picture, but I'm not sure if that's what I need. I did not install anything yet on my computer because I'm not sure which product to use.
Can anybody else maybe give me more ideas? I'm looking for a grid- or pixel-like graphical output for a cellular automaton model. As far as I understood the above picture, that is more for output of numbers, text, etc in a matrix. (Am I right?)

Thanks for any further hints  :)
Title: Re: Visualized matrix for cellular automata?
Post by: Ceniza on April 03, 2009, 10:57:40 pm
You could place a wxPanel and handle the OnPaint method yourself, so you use the Panel as a canvas. If you need it to be 100x100, that is something that you can easily do with wxSmith. For more information, please refer to wxWidget's documentation and forums.