DPlot Forum Index DPlot
http://www.dplot.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Draw/Borders in 2.1.0.5 Demo draws triangles instead of grid

 
Post new topic   Reply to topic    DPlot Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
RMF



Joined: 16 Feb 2007
Posts: 12

PostPosted: Wed Feb 21, 2007 4:38 am    Post subject: Draw/Borders in 2.1.0.5 Demo draws triangles instead of grid Reply with quote

I sort of think this is an issue, but they're may be a reason for it.

- Generate a Mesh from a simple 5x5x5 XYZ 3D regular surface plot.

- Select Draw/Borders and get a nice rectangular grid reflecting the 'meshed' intervals.

- Save the Meshed plot as a .csv file. Open the file in Excel and add a 4th column (Amplitude) to the data. (Careful to make at least one different Amplitude value.)

- Import the 4 columns of X,Y,Z,Amplitude into a File/New/4D Surface Plot

- Select Draw/Borders and DPlot draws triangles instead of the rectangular grid.

Is there a reason for that? (And as an aside also, is there a reason for the 'unequal amplitude' requirement?)

. . .
Back to top
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2310
Location: Vicksburg, Mississippi

PostPosted: Wed Feb 21, 2007 3:40 pm    Post subject: Reply with quote

Quote:
Is there a reason for that?


Yes, sort of. Older (much older) versions of DPlot worked only with Z values on a rectangular grid for surface plots. This data format didn't require triangulation since the layout was defined and for 3D views I didn't need to worry about any time-consuming hidden surface removal algorithm - it's trivial for that layout to figure out which corner is at the back, and work your way forward. And I'm digressing...

The surface you got with Generate Mesh only shows horizontal/vertical lines with Draw Borders because... well, those are the borders.

Later on I added support for randomly-placed 3D points. With random 3D (and now 4D) points, DPlot generates a mesh of triangles. It doesn't matter that the data in your CSV file isn't really random; DPlot sees it as random. Draw Borders draws the edges of those triangles.

Quote:
(And as an aside also, is there a reason for the 'unequal amplitude' requirement?)


That's a lazy way of avoiding divide by zero problems when figuring out colors to use. Actually I'm not sure this is a problem any more; will take a look at that.
_________________
Visualize Your Data
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
RMF



Joined: 16 Feb 2007
Posts: 12

PostPosted: Wed Feb 21, 2007 8:00 pm    Post subject: Reply with quote

DPlotAdmin wrote:
The surface you got with Generate Mesh only shows horizontal/vertical lines with Draw Borders because... well, those are the borders.


Let me see if I understand this . . . DPlot 'sees' the meshed 3D data as a regular grid, and draws a regular grid in Draw Borders, because DPlot has just 'generated' the mesh from the 3D plot?

It draws the regular grid because it just did the calculations to generate a regular grid. (Even if that isn't what's happening in the background, it is what happens on the display.)



DPlotAdmin wrote:
Later on I added support for randomly-placed 3D points. With random 3D (and now 4D) points, DPlot generates a mesh of triangles. It doesn't matter that the data in your CSV file isn't really random; DPlot sees it as random. Draw Borders draws the edges of those triangles.


DPlot sees the imported 'regular' data from the CSV file as random, ok.

For 3D surface plots, I found something that more or less functions as a workaround. If the imported 'seen-as-random' 'though-actually-regular' data from the CSV file is re-meshed, using the same number of intervals, then Draw Borders becomes a regular grid again.

But that doesn't work for 4D.

. . .


Last edited by RMF on Wed Feb 21, 2007 9:10 pm; edited 1 time in total
Back to top
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2310
Location: Vicksburg, Mississippi

PostPosted: Wed Feb 21, 2007 8:44 pm    Post subject: Reply with quote

Quote:
Let me see if I understand this . . .


Yes, you do.

Quote:
But that doesn't work for 4D.


There is no equivalent data organization for 4D. And I'll probably throw out 3D points on a rectangular grid to get rid of some confusion. Two reasons for keeping it are 1) waterfall plots are very straightforward and 2) smaller memory requirements (since only Z and the corner X and Y values are stored). But for 1), I've meant to work on a reasonably fast interpolation scheme to draw waterfall plots for random points for a while, just haven't gotten around to it, and for 2) although that is a real consideration, every user I know about that's plotting millions of points is doing so with random data. Once #1 is worked out I'll most likely eliminate that format, automatically replacing data from saved files with the equivalent random X,Y,Z points.
_________________
Visualize Your Data
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
RMF



Joined: 16 Feb 2007
Posts: 12

PostPosted: Thu Feb 22, 2007 12:00 am    Post subject: Reply with quote

DPlotAdmin wrote:
Quote:
But that doesn't work for 4D.


There is no equivalent data organization for 4D. And I'll probably throw out 3D points on a rectangular grid to get rid of some confusion. Two reasons for keeping it are 1) waterfall plots are very straightforward and 2) smaller memory requirements (since only Z and the corner X and Y values are stored). But for 1), I've meant to work on a reasonably fast interpolation scheme to draw waterfall plots for random points for a while, just haven't gotten around to it, and for 2) although that is a real consideration, every user I know about that's plotting millions of points is doing so with random data. Once #1 is worked out I'll most likely eliminate that format, automatically replacing data from saved files with the equivalent random X,Y,Z points.


Well At least I'm understanding some of it Very Happy

Let me see if I can get the next part you're giving me.

If a 4D plot were made from data collected at regular XY data intervals, then the 4th dimension, Amplitude, would be essentially another Z value at those same XY corners. (represented with color in a 4D plot)

And if both Z and Amplitude were regular, then the two values for Z and Amplitude could be meshed similar to how a 3D plot is meshed, only done twice as it were. The difference being that 2 meshing operations are needed. One using X,Y,Z, and the other using X,Y,Amplitude.

Am I getting that so far? I think I'm understanding some part of it because that was what I came up with to mesh a regular 4D plot.

You know, perform two 3D meshing operations in DPlot, one using the X,Y,Z columns, and the other using the X,Y,Amplitude columns.

Then 'assemble' those 4 'meshed' columns in Excel, using X, Y, Z, and Amplitude. (X and Y values are equal so either pair can be used.) And re-import the 4 data columns to File/New/4D Surface.



Though from what you are saying, apparently the example of regular XY data isn't the majority case?

. . .
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    DPlot Forum Index -> Bug Reports All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group