Drawing several 3D lines in one graphic?

In principle my problem seems easy to solve. I know how to create the 3D graph,and how to set the number of plots available on the graph. My question is how do I specify "These data is plot1, these plot2..."? Cos all the data I put into the graph is represented in plot1.
Thanks in advance.

The following example draws 2 different plots on the same 3D graph (you have to specify the 'plot number' input to the '3D Parametric Graph' VI).
http://zone.ni.com/devzone/explprog.nsf/6c163603265406328625682a006ed37d/96d968d612f01e8586256a9d007614bf?OpenDocument
Chris_Mitchell
Product Development Engineer
Certified LabVIEW Architect

Similar Messages

  • Is there a way to draw a straight line from one point to another?

    Is there a way of drawing a straight line from one point to another please?

    Yes.  First click on this icon:
    Now select the line drawing icon:
    Now press a shift key and drag your mouse on the image to draw a straight line.
    These instructions are for Windows system so you need to adapt the method for Macs.  I can't afford to by an Apple Mac!!!!!
    Good luck.

  • Any way to simulate a user drawing a straight line in Captivate 6?

    I'm trying to create a software simulation. While most of the user interaction with the software involves just clicking buttons and entering values in various fields, there is one place where the user has to draw a straight line from one point to another. Basically, I would like Captivate to dynamically display the line as it is being drawn (i.e., getting longer as the mouse moves away from the starting point).
    Is there any way this can be done in Captivate? Thanks.

    Hello,
    Welccome to Adobe Forums.
    Software Simulation (Automatic Recording) create slides on event based (Keyboard button press or Click on Mouse)
    When you draw something it will not show you the drawing at the time of recording, for that you can use Video Demo
    Thanks,
    Vikram

  • How to draw only straight line instead of angled one??

    Dear friends,
    I saw a very good code posted by guru here(I think is camickr),
    But I tried to change it and I hope to draw only straight line instead of angled one, can you help how to do it??
    Thanks so much.
    import java.util.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public class DrawingArea extends JPanel
         Vector angledLines;
         Point startPoint = null;
         Point endPoint = null;
         Graphics g;
         public DrawingArea()
              angledLines = new Vector();
              setPreferredSize(new Dimension(500,500));
              MyMouseListener ml = new MyMouseListener();
              addMouseListener(ml);
              addMouseMotionListener(ml);
              setBackground(Color.white);
         public void paintComponent(Graphics g)
              // automatically called when repaint
              super.paintComponent(g);
              g.setColor(Color.black);
              AngledLine line;
              if (startPoint != null && endPoint != null)
                   // draw the current dragged line
                   g.drawLine(startPoint.x, startPoint.y, endPoint.x,endPoint.y);
              for (Enumeration e = angledLines.elements(); e.hasMoreElements();)
                   // draw all the angled lines
                   line = (AngledLine)e.nextElement();
                   g.drawPolyline(line.xPoints, line.yPoints, line.n);
         class MyMouseListener extends MouseInputAdapter
              public void mousePressed(MouseEvent e)
                   if (SwingUtilities.isLeftMouseButton(e))
                        startPoint = e.getPoint();
              public void mouseReleased(MouseEvent e)
                   if (SwingUtilities.isLeftMouseButton(e))
                        if (startPoint != null)
                             AngledLine line = new AngledLine(startPoint, e.getPoint(), true);
                             angledLines.add(line);
                             startPoint = null;
                             repaint();
              public void mouseDragged(MouseEvent e)
                   if (SwingUtilities.isLeftMouseButton(e))
                        if (startPoint != null)
                             endPoint = e.getPoint();
                             repaint();
              public void mouseClicked( MouseEvent e )
                   if (g == null)
                        g = getGraphics();
                   g.drawRect(10,10,20,20);
         class AngledLine
              // inner class for angled lines
              public int[] xPoints, yPoints;
              public int n = 3;
              public AngledLine(Point startPoint, Point endPoint, boolean left)
                   xPoints = new int[n];
                   yPoints = new int[n];
                   xPoints[0] = startPoint.x;
                   xPoints[2] = endPoint.x;
                   yPoints[0] = startPoint.y;
                   yPoints[2] = endPoint.y;
                   if (left)
                        xPoints[1] = startPoint.x;
                        yPoints[1] = endPoint.y;
                   else
                        xPoints[1] = endPoint.x;
                        yPoints[1] = startPoint.y;
         public static void main(String[] args)
              JFrame frame = new JFrame("Test angled lines");
              frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
              DrawingArea d = new DrawingArea();
              frame.getContentPane().add( d );
              frame.pack();
              frame.setVisible(true);
    }

    Change the AngledLine class to store two points instead of 3 points (I would rename the class to be StraightLine). The code is much simpler because you just store the starting and ending points and you don't need to calculate the middle point.

  • How to see my code drawing a line from one point to another

    hi, im wondering if you could help me.
    i am working on my project which is to visualise travelling salesman heuristics.
    i have managed to make my first heuristic work, but my problem is that when i clicked the run button on my GUI,
    the output is already a complete tour with all the edges already drawn, but what i want is to see how it solves or draw the lines from one vertex to another just by clickin the run button once.
    would be great if you could advice me of what method or technique i need to use to see my application solving the tour or drawing the edges.
    below is my cofe for drawing the edges from one point to another
      void drawLineNNh(Graphics g){
             Graphics2D g2 = (Graphics2D) g;
             g2.setColor(Color.blue);
             int i = 0;
             if (P == null) return;
             else
                 for(i=0; i<P.getSize(); i++)
                 Line2D.Double drawLine = new Line2D.Double(P.x_coor[nnH.seen]+5, P.y_coor[nnH.seen[i]]+5, P.x_coor[nnH.seen[i+1]]+5,P.y_coor[nnH.seen[i+1]]+5);
    Line2D.Double drawLastEdge = new Line2D.Double(P.x_coor[nnH.seen[P.getSize()-1]]+5, P.y_coor[nnH.seen[P.getSize()-1]]+5, P.x_coor[0]+5,P.y_coor[0]+5);
    g2.drawString( " Total Distance : " + nnH.totalDistance , 10, 300);
    g2.draw(drawLine);
    g2.draw(drawLastEdge);
    public void setNNh(Points p)
    nnH = new NNheuristic(p);
    useNNh = true;
    public void paint(Graphics g)
    frame(g);
    drawpoints(g);
    if(useNNh)
    drawLineNNh(g);
    below is my code for calling the above method to draw edges, actionlistererun.addActionListener(new ActionListener()
    public void actionPerformed(ActionEvent e) {
    if (e.getActionCommand().equals("Run")) {
    if (chooseHeur.getSelectedItem()=="Nearest-Neighbour")
    System.out.println(chooseHeur.getSelectedItem());
    //points = new Points(toInt((String)chooseNum.getSelectedItem()));
    //PlotArea.set(points);
    PlotArea.setNNh(points);
    PlotArea.repaint();

    I AM USING SWING.
    HERE IS MY CODE, HOPEFULLY ENOUGH TO UNDERSTAND THE PROBLEM.
    class Plot extends Panel{
         public static int num;
         NNheuristic nnH;
         Closest_insertion CI;
         Points P;
         public static boolean useNNh= false;
         boolean useCI=false;
         boolean triangleDrawn = false;
         boolean CIupdate;
         void drawpoints (Graphics g)
             Graphics2D g2 = (Graphics2D) g;
             Graphics2D g3 = (Graphics2D) g;
             int i=1;
             g2.setColor(Color.red);
                    if (P==null) return;
                    else
                    while (i<P.getSize())
                         Ellipse2D.Double vertices = new Ellipse2D.Double(P.x_coor,P.y_coor[i],10,10);
    g2.fill(vertices);
    i++;
    g3.setColor(Color.MAGENTA);
    Ellipse2D.Double initial = new Ellipse2D.Double(P.x_coor[0],P.y_coor[0],10,10);
    g3.fill(initial);
    System.out.println("No. of Vertices: " + P.getSize());
    for(int k = 0; k < P.getSize(); k++)
    System.out.println("x coordinate: " + P.x_coor[k] + ", " + "y coordinate :" + P.y_coor[k] );
    // System.out.println("next:"+ P.x_coor[k+1]);
    triangleDrawn = false;
    void drawLineNNh(Graphics g){
    Graphics2D g2 = (Graphics2D) g;
    g2.setColor(Color.blue);
    int i = 0;
    if (P == null) return;
    else
    for(i=0; i<P.getSize(); i++)
    Line2D.Double drawLine = new Line2D.Double(P.x_coor[nnH.seen[i]]+5, P.y_coor[nnH.seen[i]]+5, P.x_coor[nnH.seen[i+1]]+5,P.y_coor[nnH.seen[i+1]]+5);
    Line2D.Double drawLastEdge = new Line2D.Double(P.x_coor[nnH.seen[P.getSize()-1]]+5, P.y_coor[nnH.seen[P.getSize()-1]]+5, P.x_coor[0]+5,P.y_coor[0]+5);
    g2.drawString( " Total Distance : " + nnH.totalDistance , 10, 300);
    g2.draw(drawLine);
    g2.draw(drawLastEdge);
    public void set (Points p)
    P=p;
    useNNh = false;
    useCI = false;
    public void setNNh(Points p)
    nnH = new NNheuristic(p);
    useNNh = true;
    void frame (Graphics g)
    g.setColor(Color.white);
              g.fillRect(0,0,size().width,size().height);
              g.setColor(Color.green);
              g.drawRect(0,0,579,280);
    public void paint(Graphics g)
    frame(g);
    drawpoints(g);
    if(useNNh)
    drawLineNNh(g);
    else if(useCI)
    if(!CIupdate)
    drawTriCI(g);
    else
    drawRestCI(g);
    // drawLineNNh(g);
    public void clear ()
         // remove the points and the graph.
    P=null;
    triangleDrawn = false;
    code of my GUIpublic class TSP extends JFrame{
    JButton run;
    ...................codes...........
    TSP() {
    ...............................codes...........
    run = new JButton ("Run");
    run.setPreferredSize(new Dimension(113,30));
    run.addActionListener(new ActionListener()
    public void actionPerformed(ActionEvent e) {
    if (e.getActionCommand().equals("Run")) {
    if (chooseHeur.getSelectedItem()=="Nearest-Neighbour")
    System.out.println(chooseHeur.getSelectedItem());
    //points = new Points(toInt((String)chooseNum.getSelectedItem()));
    //PlotArea.set(points);
    PlotArea.setNNh(points);
    PlotArea.repaint();
    else if(chooseHeur.getSelectedItem()=="Closest-Insertion")
    PlotArea.setC_I(points);
    PlotArea.repaint();
    pane2.add(run);

  • Several PR clubbed to one PO but with several Item lines?

    Hello SAP gurus
    Is it possible to merge several Purchase requisitions in APO into one Purchase Order but with several item lines in ECC?
    If I have 50 PR in APO and CIF them to ECC, I want them to show as one PO with 50 item lines in ECC.
    And I also need to know if it's possible to transfer PR from APO to ECC and set it to "blocked" before it is "approved" in ECC.
    Like an approval workflow would work in MRP.
    I would jump for joy for some answers.
    Christina

    Hi
    It is possible. Please try the below steps.
    1) Create the PO manually with the total qty of both PR.
    2) Go to the delivery schedule tab and there is button to split the delivery scedule, select and split with the required qty
    3) Assign the relevant PR to the respective schedule line.
    Also you can use the option suggested in the previous message.
    Now the PO will have 1 line item but 2 schedule lines
    Hope it helps.
    Thanks / Karthik

  • Drawing a line from one nested MC to another

    I'm using the Drawing API to draw a line from one MC nested
    within two levels of parent MCs to another similarly-nested MC. Can
    someone tell me how to get the X,Y coordinates of both points?

    Try this:
    var objPointA:Object = new Object()
    var objPointB:Object = new Object()
    objPointA.x = grandparentA_mc.parentA_mc.childA_mc._x;
    objPointA.y = grandparentA_mc.parentA_mc.childA_mc._y;
    objPointB.x = grandparentB_mc.parentB_mc.childB_mc._x;
    objPointB.y = grandparentB_mc.parentB_mc.childB_mc._y;
    grandparentA_mc.parentA_mc.localToGlobal(objPointA);
    grandparentB_mc.parentB_mc.localToGlobal(objPointB);
    var lineHolder = _root.createEmptyMovieClip("lineHolder", 1);
    lineHolder.lineStyle(1, clr, 100);
    lineHolder.moveTo(objPointA.x, objPointA.y);
    lineHolder.lineTo(objPointB.x, objPointB.y);
    Remove '_spamkiller_' to mail

  • Drawing a curved line

    Okay, so I feel like this is a really stupid question, but how in the world can you make a line curved? I've inserted a line as a shape and want to make it curved (similar to the curve in the Apple Demo with the moving airplane -- I'm trying to do something like that). I know how to make the objects move, but I want the path to show. An earlier post said to draw the path first and then create the path to match that. That's fine and doable, but I can't for the life of me figure out how to draw a curved line!

    You use the Pen tool, found at the bottom of the Shapes dropdown menu, to draw a curve. Select the pen, then click on the slide to put down the starting point of your curve. Next, click and hold where you want your curve to end, and drag away from the endpoint that is created. You should see two grey "handles" sprout from that endpoint, with your cursor at the end of one of them. The point you have created is a Bezier control point, and the handles control the angle and depth of the curve. Hit Escape to finish. (Your curve will likely be filled -- you can adjust this in the Graphic Inspector.)
    One Bezier point will produce a curve that only curves one direction. To create a more complex curve with multiple inflections, you will need to add more points. Select your curve, and in the Format menu, under the Shape flyout menu, choose "Make Editable". You should now see your two endpoints in red. If you hold down the Option key and click on the path, you will add another control point. Double-clicking on the point will toggle it from a corner point to a Bezier control point.
    Bezier curves can seem complicated at first, but this is an extremely powerful way of creating arbitrary shapes, including complex curves.
    (Note that the paths in the Motion Action are also Bezier curves.)

  • How to Draw a vertical line in flex

    I was just wondering the simplest way to draw a vertical line , preferably dashed.

    You could always just use the graphics class of your chart component.  Just access its graphics object, set the line style/thickness, move to the start point, and line to the end point.  Something like this,
    this.graphics.lineStyle(1, 0x000000);
    this.graphics.moveTo(startX, startY);
    this.graphics.lineTo(endX, endY);

  • Several purchase requsitions from one sales order

    Hi,
    I am using item category TAB to create a purchase requsition from a sales order, this works fine.
    What I really want to do is to create one purchase requsition for each condition type of a special kind from the TAB position in the sales order.
    Another possibility is to create several purchase orders from one purchase requsition, split on the earlier mentioned condition types. In any case, the end result should be several POs from one SO, split on condition types.
    Can this be done in config or do you have a suitable user-exit for me?
    Thanks in advance!
    Best Regards
    Viktor

    HI,
    The Cost Center Determination settings is in OVF3, the standard works only at the header level though, so it would not work if cost center is needed on the line item.
    For this case I suggest to try from CO view:
    A material is linked to a profit center. From this profit center you can determine a cost center using txn OKB9
    In combination with the material's account assignment field and account determination customizing, an alternate revenue account can be determined for this material. ("Normal" revenue accounts are to be used in combination with CO-PA).
    If this account is a cost element with category type "1" you need the entries in OKB9.
    Hope this help!
    Regards!

  • I want to know how to draw arrows & dashed lines in a picture control

    I have to draw arrows & dashed lines in a picture control. Just like we can do that in word or paint etc. I need to do the same using the mouse and drag the line/arrow till I realease the mouse. I am able to this for a normal line ( it works perfectly) but when I have to draw an arrow or a line I am stumped.

    Unfortunately, you have to code your own VIs to do these. It's not going to be too complicated if you manage the animation (while dragging the mouse) with a normal line and draw the dashed line/arrow at the end (when releasing the mouse button).
    In both cases, you'll know start/end line coordinates, thus having the line equation. For arrows, you need to calculate the angle in order to draw it properly.
    A simpler solution may be an activeX control with these features (Paint like) already integrated or to develop one in Visual Basic (at least it will be simpler to manage mouse events and drawing tasks).
    Let's hope somebody already did it and wants to share.

  • How can you draw a thicker line!

    Hi,
    Do you know how to draw a thicker line without
    using Graphics2D? I can not use setStroke because
    if I use graphics2d class, the user have to download
    JRE to run my applet.
    Thanks

    Use the end-points of your line to create a Polygon which provides a border round it, then use Graphics.fillPolygon.

  • Drawing TrendLines in Line Chart

    Hi,
    I am using a Line Chart in one of my projects.
    I use a HTTPService to fetch XML Data to feed the chart.
    <mx:HTTPService id="myServ" url="ChartData.xml" result="myResultHandler(event)"/>
    I draw two trend lines over the chart based on the max & min values for a specified node in the XML data
    <?xml version="1.0" encoding="utf-8"?>
    <nodes>
        <node month="Jan-10">
           <expenses>20</expenses>       
        </node>
        <node month="Feb-10">
           <expenses>30</expenses>       
        </node>
        <node month="Mar-10">
            <expenses>80</expenses>       
        </node>
        <node month="Mar-10">
            <expenses>20</expenses>       
        </node>
    </nodes>
    I use the expense node in determining the max & min value for the chart.
    I determine the max & min values & draw the lines in the result handler function:
    If i use result Format = "e4x", I am able to iterate the data as XML List Collection, but when I get the data as ActionScript objects, I am not able to iterate the XML data.
    public function drawLine(event:Event):void
         myChartCanvas.clear();
         myChartCanvas.lineStyle(2, 0x000000, 1);
         myChartCanvas.moveTo('Jan-10', 50);
         myChartCanvas.lineTo('Aug-10', 70);
    How can i iterate the nodes in AS3 object format to find the max & min nodes & draw the trend lines ?
    - Sen

    Cast the Objects. You know they are XML behind the scenes.

  • Multiple 3 D lines in one plot

    Hi!
    I want to rotate 3D lines in one picture.
    For this i want to draw about 1000 lines which i can rotate speratly.
    How can i draw sperate lines in one picture?
    For rotation I change the start end the end values from the lines.
    but how can i change the line from solid tho piont and backwards?
    or is there an other way`?
    thany you
    hannes

    I am wondering why you don´t use the 3D-Graph? The 3D Graph has a rotation-functionality built in, and you can plot multiple 3D-lines in it.
    Here you can find some examples:
    http://zone.ni.com/devzone/cda/epd/p/id/1028
    Hope this helps!

  • Drawing a straight line

    Hello,
    I haven't been able to draw a straight line in a JPanel as a separator. I mean, I have several other componentes in the JPanel and I would like to use straight lines as separators between some of the componentes. Besides drawing the line, how could I set its length?
    Thank you,
    Alfredo

    You could use a JPanel and set its border to a LineBorder (or whatever border you desire. Then set the preferred size of the panel and all that gets painted is the border.

Maybe you are looking for

  • Semitransparent Panel on fullscreened jPanel

    help me to make the AircraftCockpit a senitransparent jPanelimport java.awt.Color; import java.awt.Font; import java.awt.GraphicsEnvironment; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import javax.swing.JFrame; import java.aw

  • Labview Shared Variable configuration

    I need some help with my labview shared variable configuration. In my setup I have a PC running with my lvlib on it.  This PC is NOT my development PC.  The application deploys the lvlib.  My program is I can't see those variables on my PXI RT Contro

  • Changing Master Filename, v1.5

    Is the new option to change the master filename only available on import? I can't seem to find a command to do it once images are within Aperture (library or referenced). I usually import images from an assignment. Edit them and then batch rename so

  • Automatic Panning

    I am recording a software simulation in Captivate 7 and have set it to automatic panning because part of the demo scrolls down a menu. The result does not pan down the menu, and I can't figure out why. When I do the same thing in Captivate 5 it pans

  • 1.76 GB of "other" capacity?

    Hi, I have nothing but music on my iPod, but "other" is using up 1.76 GB. Does anyone know what this "other" might be? Thank you.