04-28-2009 06:44 PM
So I know that similar questions to this have been asked a few times, but I figured it'd be more helpful if I posted my specific goal since I'm still a bit new to this:
I have a program that collects a set of data, degree position and surface height, for a circular object that rotates through 360 degrees. The object itself has 5 probes evenly spaced from it's center to it's outer edge, which collect this data. Each probe collects 3600 data points (0 to 360 degrees, .1 degree intervals).
Anyway, what I'd like to do is graphically represent this surface via a 2D contour plot, and possibly through a 3D plot as well. I want to know what would be the best approach to do this. The plots will be displayed through an executable distribution of my program.
2-D Contour Plot (looking for something similar to matlab contour plots):
Is the conensus that the scatter plot would be the best option for this purpose (looked through the contour vi)?
Will I have to convert degrees to x and y coordinates and then just create my own custom degree scale (maybe just an image) for the drawing?
How are the contour rings (in my case 5, representing the data from each evenly spaced probe) put together?
3-D Plot
If I want a 3-dimensional image of the surface based on the data, what would be the best method/ plot type to use?
Are there any 3-D plot types that offer the ability to rotate the object?
Any comments would be appreciated, thanks.
04-28-2009 07:43 PM
04-29-2009 09:00 AM
This thread shows what we can do with real data.
THe following image appears in that thread along with many posts explain how I did it with all of the source code included.
Does that help?
Ben
04-29-2009 10:32 AM - edited 04-29-2009 10:33 AM
unclebump,
attached is some sample data. Notice there are 3600 rows of data (each one corresponds to .1 degree increment all the way up to 360). Each of the 5 columns form the rings of the contour, with the first column being the inner ring, and the 5th column being the outer ring.
04-29-2009 10:50 AM - edited 04-29-2009 10:53 AM
Hey Ben,
That's sort of close to what I wanted, except in the contour case I need the color coding to be affected by the value at each coordinate, not what ring is being drawn.
I'm coding in Labview 8.5 for this one.
the 3-D plot aspect of this one is fairly close to what I'm looking for, except I'd like all the data sets to appear as one color in that case (since I'm assuming surface continuity between the rings).
04-29-2009 11:04 AM - edited 04-29-2009 11:05 AM
jonvanjam wrote:Hey Ben,
That's sort of close to what I wanted, except in the contour case I need the color coding to be affected by the value at each coordinate, not what ring is being drawn.
I'm coding in Labview 8.5 for this one.
the 3-D plot aspect of this one is fairly close to what I'm looking for, except I'd like all the data sets to appear as one color in that case (since I'm assuming surface continuity between the rings).
Message Edited by jonvanjam on 04-29-2009 10:53 AM
Cool!
If you get stuck adapting that example to your use, post up your code* and someone may be able to give you the extra nudge you need to get over the hump. Please post an image (or example) showing your results with a little mention of what physical phenomenon we are looking at.
Have fun!
Ben
* make sure you include all data and sub-VIs so that they can help.
04-29-2009 03:11 PM
So I've run into a few problems attempting to create a 2-D contour plot using the intensity graph solution.
As it turns out, since the intensity graph uses an array to specify the position of each point, I had to do a bit of coercing of my data (consisting of 3600 points). Basically I wanted each data point to correspond to a different index of the 2-d Array, but there isn't enough memory available to create arrays of the size I would need (around 10,000 x 10,000 to have a unique index per data point intensity). Is there away around this, or should I just ignore this and assume the effect on my contour plot will be negligible?
Second: Is there a property/method I can use to make the nonzero points of my intensity plot thicker?
Third and most importantly: The partial solution I have so far only draws the first ring (for first column of data). I need to draw four more rings (other four columns of data), each successive ring inscribed at the inner edge of the previous ring. What would be the best method to go about doing this (case structures, state machine architecture, nested for loops)?
Ideally, the contour plot would look very closely to the one I've attached in the gif.
04-29-2009 07:57 PM
Here's an updated version I created. In this one you can specify the "thickness" of each ring by redrawing it circumscribed any # of times within itself. I'm still not convinced this is the best way of creating 2-D contour plots in Labview. Anyone know of a better method or of a way to improve upon mine?