Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29285 Discussions

How do I manage simultaneous graphics windows?

WSinc
New Contributor I
660 Views
I want to draw a graphics object with 3 separate views on the same screen.
For example Y vs X, Z vs X, and Z vs Y. I have a file with (X,Y,Z) coordinates
in a predetermined order.

Nowas I read in an X, Y and Z for each point, how do I switch between the three
separate windows?

I tried doing a SETWINDOW and SETVIEWPORT for each point, but it doesn't like that.

I would like to avoid having to cycle thru the data three times, in other words draw the object in the three
windows as I go along point by point.

Is there a way to accomplish this?
0 Kudos
2 Replies
Paul_Curtis
Valued Contributor I
660 Views
I do something fairly similar, at least to the extent of having multiple sets of axes, which I refer to as plotboxes, drawn within a single window, and then plotting separate datasets simultaneously. This is facilitated by a "plotbox" udt which contains a collection of physical (ie, pixel extents), Win32 (ie, hwnd and hdc) and scaling constants (Xmin, Xmax, etc.) for each box, with an array of pb() objects, one for each plotbox, so that selecting the plotbox index immediately affects the mapping functions for data display, which are cast in terms of the index of the current plotbox where the data is being drawn, only a single scaling function is needed, and each plotbox can have its own scaling extents in user units.

So you could envision an outer loop on data points, with an inner loop over the 3 plotboxes, adding one point from each x,y,z datum to each of the plots; this would certainly work, but it would also be very slow.

A better strategy is to note that connect-the-dots Windows plotting is most efficent when driven by an array of T_POINTs preloaded from your actual data arrays, which then permits using PolyLine() to plot the points in a single operation, instant-fast. Thus your program would have an outer loop over plotboxes, with an inner loop to allocate and populate T_POINT arrays for each x,y, x,z, y,z data subset, Polyline() the plot, deallocate, etc. Unless you are talking many many thousands of points, the plots would all appear to be created simultaneously.
0 Kudos
Jugoslav_Dujic
Valued Contributor II
660 Views
Is SETACTIVEQQ/GETACTIVEQQ what you're looking for?
0 Kudos
Reply