3D surface plots with intensity value to overlay at each point?

i have a data set with XYZ points and an 8 bit intensity value (0-255) which i would like to overlay on the 3D plot. Is this possible with the 3D surface graph in LabVIEW?

You have an interesting question. There is no built in functionality for plotting a "4d" plot on LabVIEW's 3d plot. You can make the existing tools work though. What you need to do is create 256 plots on a 3d parametric plot. Each plot will show just one color and each has been modified to show just the data points. Provided you have enough data, you can make a surface appear solid. Please see the attached VI.

Similar Messages

  • 3d Surface Plot advice

    I'm completely newbie to 3D in Java. I've installed the 3D JDK, and could do with some pointers of where to start - i've seen a lot of different classes used to do similar things, and am unsure where to start.
    I have a double[][] array, and would like to plot this data as a surface map, with the values in the array being the magnitude (X Axis).
    What classes should I use, and is there anything I should be aware of.
    What about deployment - is this a big issue?
    Thanks in advance.

    Ok, this is a method that creates a surface along the x and z axis, amp is in the y axis, using QuadArray. Then simply use the Shape3D.setGeometry(QuadArray) to set it as the geometry of the Shape3D object.
    private QuadArray createThicknessStrip(int zones, int dist, float width, float length){
    Point3f[][] thicknessPoints = new Point3f[zones][dist];
    QuadArray thicknessGeom = new QuadArray(4*zones*dist, GeometryArray.COORDINATES | GeometryArray.NORMALS | GeometryArray.COLOR_3);
    float[][] thicknessValues = new float[zones][dist]; // Initiate with the height at each vertexpoint.
    //Build 3D points from the values.
    for(int i=0;i<zones;i++){
    for(int j=0;j<dist;j++){
    thicknessPoints[i][j] = new Point3f(length/(dist-1)*j, thicknessValues[i][j], width/(zones-1)*i);
    int counter = 0;
    for(int i=0;i<zones-1;i++) {
    for(int j=0;j<dist-1;j++) {
    thicknessGeom.setCoordinate(counter++,thicknessPoints[i][j]);
    thicknessGeom.setCoordinate(counter++,thicknessPoints[i+1][j]);
    thicknessGeom.setCoordinate(counter++,thicknessPoints[i+1][j+1]);
    thicknessGeom.setCoordinate(counter++,thicknessPoints[i][j+1]);     
    return thicknessGeom;     
    Then set the attributes that you would like:
    Shape3D thicknessStrip;
    Appearance thicknessApp = new Appearance();
    TransparencyAttributes thicknessTA = new TransparencyAttributes();
    ColoringAttributes thicknessColor = new ColoringAttributes();
    PolygonAttributes thicknessPoly = new PolygonAttributes();
    thicknessPoly.setPolygonMode(thicknessPoly.POLYGON_FILL); //POLYGON_LINE if you would like a grid;
    thicknessPoly.setCullFace(thicknessPoly.CULL_NONE);
    thicknessApp.setCapability(thicknessApp.ALLOW_TRANSPARENCY_ATTRIBUTES_WRITE);
    thicknessApp.setCapability(thicknessApp.ALLOW_POLYGON_ATTRIBUTES_WRITE);
    thicknessColor.setColor(0.5f, 1.0f, 0.5f);
    thicknessApp.setColoringAttributes(thicknessColor);
    thicknessApp.setPolygonAttributes(thicknessPoly);
    thicknessApp.setTransparencyAttributes(thicknessTA);
    thicknessStrip = createThicknessStrip(bla bla bla bla);
    thicknessStrip.setAppearance(thicknessApp);

  • Apex 3.2 SVG Chart - How to plot Stacked Bar With Negative Values ?

    Currently Apex 3.2 Flash Chart (AnyChart 3.x) does not support Stacked bars with negative values.
    I try with SVG Stacked bars with positive values only, chart ploting works fine. When I add a new series with negative values (i.e -1) and I get a blank Chart region with no error.
    Based on this statement from Apex's documentation:
    *"AxisLine Indicates zero on charts that have negative values."*
    I appreciate your help on how to translate this statement into action ?
    (i.e how to override .Axisline class in CSS section ?)
    Thank you very much for your time.

    User614143,
    try to add the minumm negative value (but positive) to the parameter for the axis.
    e.g. show value+3000 (assuming -3000 is the minimum value)
    If you don't have a limitation for the negative values, it doesn't work. (or try to calculate first the most negative value in a before header process)
    hope this helps.
    Leo

  • Legend for a 3D Surface Plot

    How can I create a legend for a 3D surface plot? I'm doing a xy-projection and the view direction is directly towards this plane. The plot style is a surface contour plot. I want to display next to the plot the legend in a separate bar where the different colours with each value are displayed. The value for each contour line shall be displayed in the legend.
    Patrick

    OK,
    I remember that thread now. That was the one were you did not want to use interpolate colors and I did. Well I still  like to interpolate colors but that presents another challenge when trying to produce a proper color ramp. Without resorting to using the picture control
    http://forums.ni.com/ni/board/message?board.id=BreakPoint&message.id=14&jump=true
    I decided to play with some of the built in objects.
    All of the round objects like knobs and guages include a color ramp. This gave me a ramp but is not quite up to what you get with an intensity graph.
    Since I could not get a ramp on any of the straight indicators like sliders etc, I hid most of an intensity graph and just use the Z-scale. It turns out that the same data structure can be used in the intesity graph as the guage.
    Can anyone think of other ays of producing a proper color scale when intepolation is turned on?
    Ben
    Message Edited by Ben on 12-24-2005 08:03 AM
    Message Edited by Ben on 12-24-2005 08:03 AM
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction
    Attachments:
    Scale.vi ‏81 KB
    Scale.JPG ‏111 KB

  • Maximum matrix size for surface plot?

    Morning,
    I've streamed data from an experiment to TDMS, and would like to display it in DIAdem. I have M channels of N data points and would like to display them in a surface plot.
    Usually, I'd expect to do the following:
    - Build a X axis (Generate Numeric Channel - N points at dX interval)
    - Build a Y axis (Generate Numeric Channel - M points at dY interval)
    - Build a Z matrix (Convert Matrix from X axis, Y axis and the M channels of N data points)
    I can then plot the X Y Z triplets to a surface plot.
    Alternatively, I can build the X and Y arrays and plot X Y Z in matrix mode. This has the added benefit of not forcing interpolation, which *always* crashes
    Now the kicker. For my dataset, M = 192, N = 290 000 and I'm unable to plot more than the first 20% of the data in X. I suspect that Diadem's limited to displaying 2^16 in surface plots, but no error is returned. Does anyone know if this is the case?
    I can decimate my data to fit the limit, but it's never nice to have to throw away data!
    (For clarification, the data is a raster scan of a sensor over a surface. I could drop the sampling rate and/or increase the speed over the surface, but that's a secondary concern)
    CLD

    Actually, it's the creation of an intensity plot that I'm more interested in, for two reasons. I can split my data into smaller segments and then compare measured data against my CAD model, but it's also handy having the global intensity plot available for human overview. Amusingly, almost any way I try to split the data besides decimating means that the split between datasets will be in some region of interest, which makes it awkward for non programmatic review  Meanwhile, the problem with decimation is that I have four channels of data for each of those slices: channels 1 and 2 are analogue signals and averaged to give one plot, channel three is another analogue voltage that is plotted in another, but channel four is a digital waveform with some pretty short pulse widths. Decimate too much and you'll barely see any meaningful data when plotted on an intensity plot for this.
    My instinct before starting was that DIAdem would handle the large dataset better than LabVIEW, which it did if I only wanted to plot YT data. However, after changing tack and heading back to LabVIEW I found that it was able to churn through things a bit better.
    I'm happy to send an email to describe what I'm doing in a bit more detail, as well as provide some of the resulting plots, as it's a sensitive project. Understandably, even if I could upload the data for someone else to work on, I'm not sure how much use 1.7 Gb of TDMS is to anyone else!
    CLD

  • 3D surface plot

    Hi,
    I have a set of 3 vectors X, Y and Z, and I plotted them in a surface plot. There is a minimum in the surface plot, and i know this minimum, i just take the minimum of the Z-values. I would like to mark this point on the surface plot and also mark the coordinates with lines of this point. Also the lower regions of the plot are in black, because of the color spectrum, i'd like to change that aswell, so smurking up the plot a bit . I attached the vi and the data set. Also, could there be a better way to make a surface plot? If you put the z-range from 0 to 1000, you can see the minimum, but it's not very nice, not continuous.
    Thanks,
    KF_
    Attachments:
    plot.vi ‏329 KB
    test.txt ‏397 KB

    I posted a semi-worse-case 3d example in this thread. This is a preview of the code I used...
    Starting at post #7 in that thread, you will find a tutorial that discusses how to work with the 3d graph.
    Ben
    Message Edited by Ben on 11-16-2009 08:29 AM
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Converting parametric to a surface plot?

    I had previously generated a 3D plot, with the 4D being intensity.
    This was done using a parametric plot.
    How can i convert the parametric plot to a surface plot.
    Attachments:
    4D plot.vi ‏61 KB

    Fred,
        I took a look at the VI you had attached an noticed that your Z matrix only had 1 dimension of data therefore your data will only be points, which it is. Is there any particular reason you are only sending 1D of data to the z matrix?? Second thing I noticed was just the inherent difference between parametric plots and 3D surface plots. The big difference here is that you input relations to surfaces for x,y,and z for the parametric while the 3D surface really only uses z for relative surfaces and the y and x array as skews for the plot. Basically I think you need to figure out the difference in what the plot shows and not try to directly transfer one to the other. The math behind it can be confusing and while looking at a parametric plot it might seem simple to make a surface plot out of it, it is arithmetically hard to do. Look into the issue a little more and let us know what you find, I would be interested to know, given that I am a math nut, but not in 4D space.
    Tyler Heikes
    Applications Engineer
    National Instruments

  • 2d contour plot with variable x,y spacing

    Hi
    How do I create a 2d contour plot with the the x-y values spaced at irregular intervals? Intensity plots appear to require equally spaced data.
    Any ideas
    Thanks
    Willem

    Hi Willem,
    You are correct in saying that intensity plots require regularly spaced data.
    The easiest way to get round this is by padding out your data so that it is regular.
    Does your data have a common multiple, if so you can simpley scale it by that factor to make your data regular.
    Emma R
    NIUK & Ireland

  • Autoadjust scale limit on plot, with offset

    Hi,
    I have a plot and the y scale is set to be scaled automatically. This
    is what I want. However, the space between the current highest value of
    the graph being plotted and the current highest value on the y scale is
    too small. Is there away to give it an offset?
    For example, if a constant value of 17.8 is being plotted, the highest
    value shown on the y scale will be 18. Could I force it to be, say,
    20?  that would be 20 - 17.8 = 2.2
    So for example, can I set a permanent offset of 2.2 for this separation?
    I hope this is not too confusing... Thanks!

    Sure. First, check to see if Loose Fit is checked for the Y axis (right click on graph, Y Scale>Loose Fit). With this checked, it might be enough for your needs. Otherwise, you can use a property node to autoscale the Y axis once, then get the YScale.Maximum, add your offset, and write it to YScale.Maximum.
    Message Edited by Dennis Knutson on 03-30-200609:23 AM
    Attachments:
    Set Y Max.JPG ‏19 KB

  • 3D Surface Plot Cursor Error

    I can't seem to get the cursor(s) to function on the 3D Surface Plot. I right-click on the front panel plot, go to properties, and select cursor - but then I get an error and LabVIEW crashes. Has anybody had any sucess with this? I've tried it in both LabVIEW 6.1 and 7.1

    Hi,
    I have used the cursors in the 3D graph a couple of times with no problem. There are a couple of advices that I can give. Place the 3D graph strait form the pallet, do not create an ActiveX container and add the 3D graph. Open one of the 3D examples and see if you can add the cursors to a graph that was previously created. You can also try to unregister and reregister the ActiveX control for the 3D graph to make sure that the OS registers the control correctly. You can find the ActiveX control in the system32 folder (cw3dGraph.ocx) and here is a document on how to register the control.
    I'm also including here an example that uses cur
    sors, see if you can open it and run it. The second attachment is a style file for that 3D graph that includes a cursor. You can load this file by right-clicking on the graph and select "Import Style..". Hopefully you'll be able to load the style and start to work from there.
    I hope this helps.
    Let me know if you have any further questions.
    Regards,
    Juan Carlos
    N.I.
    Attachments:
    Torus_with_3D_Cursor.vi ‏312 KB
    3DGraphStyle.cwx ‏3 KB

  • Color shifting with intensity

    We have written a CVI routine which converts the bayer color pattern encoded image from a camera to color. It works fairly well; after we do a white balance the RED, BLUE and GREEN LEDs on our instrument cluster we are testing look fine and consistant.
    However, there are some LEDs which are yellow-orange. On the screen they look more greenish-yellow. This would not be so much of a problem, however the color seems to shift with intensity and/or time. As we monitor the LEDs for a while they start to shift from greenish-yellow to yellow. As a result, the matching of color test does not work very well as the values change with time. I'm assuming that the LED light output shifts as it heats up.
    We also noticed that the brightest spots on
    the green leds look yellow. My guess is that the algorithum does not handle intensity differences well and shifts the color.
    Any ideas? Anyone else have this problem?

    Hello Cabbage,
    I'm not 100% certain what's happening here, but I'll make a few guesses for what it's worth. The color shifting over time is probably real. LEDs will change color if the temperature changes. Diode lasers will sometimes have a spec on the datasheet that gives this shift in nm/degC or %/degC. I'm not sure if this is true for LEDs too.
    The problem with yellow-orange LEDs looking greenish may be due to the color gains being off. Your Red, Green, and Blue LEDs and the phosphors on monitor are basically monochromatic. The color filter components on the CCD are to a lesser degree. It seems that there might be little coupling beteen the colors when looking at R, G, B LEDs. Even if the color gains are off, red will still look red, green look green,
    and blue look blue, however LEDs with a component in multiple bands might not look right.
    Most color CCD cameras will provide spectral respose curves in the manual for each color filter and LEDs datasheets should give similar info on their output. It may be helpful to compare the spectra of the LEDs you're measuring with the response of your CCD to see where they fall.
    Regards,
    Brent R.
    Applications Engineer
    National Instruments

  • Polar plot with legend points

    I can put one Polar Plot with legend in points?
    Case:
    I have magnitude and phase arrays for build polar plot and i want put rotation legend in each point of measurement. Then we have 3 arrays (magnitude, phase and rotation), but rotation need stay like legend for each point.
    Somebody already do it?
    thx for tip.
    Leonardo de S. Cavadas
    Maintenance Engineer and Inspection - Bureau Veritas do Brasil
    Engineer Metallurgist with emphasis in Advanced Materials
    Technologist in Computer Science

    Unclebump,
     i do one simple modification to be possible add rotation value to image, isn't better solution but i think that i'm near to solution way. Look these VIs, Re-link is necessary.
    Leonardo de S. Cavadas
    Maintenance Engineer and Inspection - Bureau Veritas do Brasil
    Engineer Metallurgist with emphasis in Advanced Materials
    Technologist in Computer Science
    Attachments:
    Plot Polar Data with Legend.vi ‏74 KB
    OtherPolarPlot.vi ‏67 KB
    Polar Plot with Legend.vi ‏75 KB

  • How to print a plot with two colors Without using two plots

    Hello everybody,
    Escuse my English (poor Frenchies....)
    I'm working with VB6 and I will need to print a plot with two colors (Some values greater than a trigger for example, ...)
    I was looking for some help to discover if that thing is possible without using another plot, this is what I'm already doing, and it do not satisfy me (and my boss....)..
    Thank for your Help.
    Julien

    Hi Julien,
    I have found on the different link to make that you want.
    This first link is on National Instrument site, the first is general, and second provided information about : How Can I Programmatically Print Out a ComponentWorks Graph Object?.
    http://digital.ni.com/public.nsf/websearch/81D87CB2A5BF6C11862569E4008240FE?OpenDocument
    http://digital.ni.com/public.nsf/websearch/dc3430165bc916c586256317006f8cc9
    Links below are on the web, and explain how do you can print a graph on Visual Basic. (the first is French link  )
    http://khany.developpez.com/tutoriel/mschart/
    http://www.programmersheaven.com/zone1/cat378/18546.htm
    Regards,
    Message Edité par Christophe S. le 12-27-2005 01:51 PM
    Christophe S.
    FSE East of France І Certified LabVIEW Associate Developer І National Instruments France

  • Missing data in 3D surface plot.

    Got an easy one for someone to solve.  I've created a 3D plot, but the plot doesn't show all of the data.
    I'm reading data from a set of .txt files and trying to visualize the results via the 3D plot.  Each txt file contains a set of 401 data pairs (y location, measurement).  A scalar (x location) is assigned to each file set, then added to an array containing data from previously read files.  The resulting array is parsed, rearranged, etc. before going to the 3D Surface Plot control.  Looks goofy because this .vi was originally used to combine data from multiple .txt files into a single file.
    As you can see from the screen shot, the 3D plot only shows data from 400 to 445 (input data goes to 800).  I checked the plot input arrays/matrices to ensure all of the data was read from the .txt files (it's all in there).  What am I missing?
    The .vi is attached along with a sample .txt file.
    Attachments:
    incomplete 3d plot.vi ‏23 KB
    OE1_CHANNEL1_20100106_141010_58.txt ‏10 KB

    You might want to transpose the z array so the dimension better match the x and y array sizes. Also eliminate the zero at the end of the y array.
    Delete the first column from the z-matrix, it seems to duplicate the y array.
    Your data and array gymnastics are incomprehensible and way too complicated. Can you tell how you want to read the input file in some simple words?
    LabVIEW Champion . Do more with less code and in less time .

  • Create graphs with properties values

    Hello!
    I want to create a Bar Graph or a normal graph with properties contained in ChannelGroup level. Is there any easy solution to this?, so far is seems that the only option is to create a channel with this values, but I don't want to duplicate the information since I have a considerable number of channels in each Channel Group.
    Thanks in advance for the support!

    hello!
    I know that you can get even the values or whathever property live values, name, etc. with the expresion form "@@ @@". However I want to plot, for example a bar graph that contains a numeric property of the group. Let's say that I have 3 Datasets all with a property "TotalFuel" and different values in each group, So what I will like to do is to plot this values in a 2DAxis object.  But it seems that all the plots or graphs are meant to be only channel oriented.
    Do you understand my issue? Please let me know if not to clarified better this.
    Thanks!

Maybe you are looking for