- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
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?
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is SETACTIVEQQ/GETACTIVEQQ what you're looking for?

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page