Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project!

## [Mesa3d-users] Few Conceptual Problems in a 2D graph App.

 [Mesa3d-users] Few Conceptual Problems in a 2D graph App. From: Helix Genomics Tech. Team - 2004-04-23 19:06:25 ```Dear Mesa users, I have been trying to create a 2D Graph using MesaGL. The following are few problems which I am facing and request some body to give pointers/references/suggestions for the same: a) Regarding Font: I am using glutStrokeCharacter() for displaying the 'x' and 'y' data range at regular intervals. The problem is, the size of the font is changing and look of graph becomes ugly on changing the (x,y). How to make the Font display independent of the viewport and also independent of glOrtho,gluOrtho2D ? b) Regarding Plotting Area based on the (x,y) Data: I am finding x-min, x-max , y-min and y-max values from the data. These values I am passing to gluOrtho2D as parameters. Is this an efficient way of calculating the plotting Area of the graph being displayed or any thing better ? Thank you in anticipation. Prasad. "Fill the Other with Your Self or Fill the other within Yourself"... Shiva. ---> Path to Acquire Knowledge. ```

 [Mesa3d-users] Few Conceptual Problems in a 2D graph App. From: Helix Genomics Tech. Team - 2004-04-23 19:06:25 ```Dear Mesa users, I have been trying to create a 2D Graph using MesaGL. The following are few problems which I am facing and request some body to give pointers/references/suggestions for the same: a) Regarding Font: I am using glutStrokeCharacter() for displaying the 'x' and 'y' data range at regular intervals. The problem is, the size of the font is changing and look of graph becomes ugly on changing the (x,y). How to make the Font display independent of the viewport and also independent of glOrtho,gluOrtho2D ? b) Regarding Plotting Area based on the (x,y) Data: I am finding x-min, x-max , y-min and y-max values from the data. These values I am passing to gluOrtho2D as parameters. Is this an efficient way of calculating the plotting Area of the graph being displayed or any thing better ? Thank you in anticipation. Prasad. "Fill the Other with Your Self or Fill the other within Yourself"... Shiva. ---> Path to Acquire Knowledge. ```
 Re: [Mesa3d-users] Few Conceptual Problems in a 2D graph App. From: Brian Paul - 2004-04-23 23:18:03 ```Helix Genomics Tech. Team wrote: > Dear Mesa users, > > I have been trying to create a 2D Graph using MesaGL. > The following are few problems which I am facing and request some body > to give pointers/references/suggestions for the same: These aren't Mesa-specific questions, so you might try asking in the beginner's OpenGL forum on http://www.opengl.org. > a) Regarding Font: > I am using glutStrokeCharacter() for displaying the 'x' and > 'y' data range at regular intervals. The problem is, the size > of the font is changing and look of graph becomes ugly on > changing the (x,y). > > How to make the Font display independent of the viewport > and also independent of glOrtho,gluOrtho2D ? Stroked characters are transformed like any other geometry. You could issue special transformations just for the text to keep it a fixed size. It's just an arithmetic problem. > b) Regarding Plotting Area based on the (x,y) Data: > > I am finding x-min, x-max , y-min and y-max values from the data. > These values I am passing to gluOrtho2D as parameters. > > Is this an efficient way of calculating the plotting Area of the > graph being displayed or any thing better ? I don't know how you're finding your min/max values so I can't say if it's an efficient method or not. gluOrtho2D() is a fine way of setting the projection extents though. -Brian ```