Graphical display of mathematic function



Hello,

I'm trying to put two graphical displays on a gtk window genrated by
Glade.
The first one would be a mathematic function with as X-axis a number
between 0 and 1000000(maybe it should be easier to have scrollable
display) and as Y-axis a float value between -1 and +1. In the first, i
thought to use the gtk curve but i don't know if this is correct and how
it works and I didn't find any explainations in the GTK tutorial.

The second disply should be a big square divided in small squares, each
of this small squares should have two colors because it is based on a
variable that can have two int values +1 and -1. The maximum size for
each side should be 100 small squares. In order to do that, I've put a
drawing area with size 400*400 pixels, assuming that small squares could
have the size 4*4. If I use less than 100*100 small squares, I thought
to leave the remaining for the drawing area with the background color.

Could someone explain how to do this ? It's the first I use C and
GTK/Glade so I begin to learn basic commands but it is always easy.

Thanks a lot 

Valery Avaux




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]