Draw by mouse the edges of an XY graph to calculate the perimeter and the area of it

I have signals taken from a stabilometer ... I have plot X in terms of y in an XY graph and I want to know how I can plot by mouse a cricle that join most of the points which is the graph of X in terms of Y and calculate the area of it plus the perimeter. I have attached my labview program with two file X and Y 
Solved!
Go to Solution.
Attachments:
xB.txt ‏341 KB
yB.txt ‏305 KB
read data.vi ‏344 KB

Try this. I create a circle, center where you click on the XY plot. Change the radius accordingly.
CLD Certified 2014
Attachments:
read data.vi ‏157 KB

Similar Messages

  • Drawing directly in the document window

    Can anybody provide sample code showing the basics of drawing directly in the document window? I'm thinking of something along the lines of the measure tool (pardon the pun).
    It looks like I'm supposed to use either the Annotator Suite or the Document View Suite to "invalidate" a rectangle in the document, followed by doing the actual drawing with the ADMDrawer Suite. But the documentation in this area is pretty sparse (for example GetDocumentViewInvalidRect and SetDocumentViewInvalidRect refer to a "fudged" invalid rect without explaining what that is) and I don't see anything in the Sample Code folder that explains this feature.
    Are the little text annotations ("path" "anchor") that pop up when using Smart Guides done using this method?
    Thanks,
    John

    (Sound of crickets chirping...)
    Boy, this forum is awfully dead in comparison to the InDesign SDK forum. Is no one writing Illustrator plug-ins anymore?
    But hey, I'll keep posting, if only for my own amusement, about my saga of writing a plug-in.
    I figured out some of the annotation stuff, but I'm still puzzled by some things.
    I started by simply trying to create a tool which would carry a 100x100 box around with it when moved on the screen -- no clicking or dragging yet -- much as the symbol sprayer, for example, has a nice circle (albeit of varying size) around it. I created the tool and added it as an annotator. When it receives a kSelectorAITrackToolCursor message, it simply captures the cursor location in a global and sets the PlatformCursor. When the tool receives a kCallerAIAnnotation message, I have this code:
    extern AIErr toolAnnotate( AIAnnotatorMessage *message ) {
        AIErr error = kNoErr;
        error = sView->ArtworkPointToViewPoint( message->view, &g->cursorPoint, &g->cursorPointScreen );
        g->annoBoundsScreen.top = g->cursorPointScreen.v - 50;
        g->annoBoundsScreen.bottom = g->cursorPointScreen.v + 50;
        g->annoBoundsScreen.left = g->cursorPointScreen.h - 50;
        g->annoBoundsScreen.right = g->cursorPointScreen.h + 50;
        ADMDrawerRef dr = sADMDrawer->Create(message->port, &g->annoBoundsScreen, kADMPaletteFont);
        ASRect myRect;
        myRect.top = 0;
        myRect.bottom = 100;
        myRect.left = 0;
        myRect.right = 100;
        sADMDrawer->SetDrawMode( dr, kADMXORMode );
        sADMDrawer->SetADMColor( dr, kADMBlackColor );
        sADMDrawer->DrawRect( dr, &myRect );
        sADMDrawer->Destroy( dr );
        sAnnotator->InvalAnnotationRect ( message->view, &g->annoBoundsScreen );
    This (should) convert the cursor location (in artwork coordinates) to screen coordinates, set the annotation boundaries based on this location, create the drawer reference, and draw the 100x100 rectangle within this reference. Finally, it invalidates this rectangle as per the Annotation suite documentation.
    I fired up the tool in Illy 10 and saw a single box created down at the 0, 0 point on the page. No box followed the cursor. Hmm. I added an sADMBasic->Beep() to the annotation code and realized what was happening -- my tool was getting an annotation message when first selected, but none when it was merely moved around the screen.
    After some futzing around I discovered that if I added a call to sView->SetDocumentViewInvalidDocumentRect in the TrackToolCursor code, I got an annotate message every time the mouse was moved! I captured the previous cursor position and invalidated the rectangle 50 points on all sides from it. and tried again. Success -- partially.
    At this point, the cursor could be moved around with the box following it. It suffers, however, from the following bugs:
    1) The SetDocumentViewInvalidDocumentRect is in artwork coordinates and so only works at 100% or greater. If I zoom out, my little box leaves trails all over the screen. In addition, if I zoom in, the cursor stutters noticeably -- I assume because Illustrator is forcing a redraw on large portions of the document. I think I can fix both these bugs by recalculating the SetDocumentViewInvalidDocumentRect into screen coordinates. However I note that the circle of the symbol sprayer can be made huge -- as large as the screen -- and it still moves smoothly. So maybe calling sView->SetDocumentViewInvalidDocumentRect is not the way to force annotations. But I haven't been able to discover another way.
    2) When the mouse moves into a palette, the square remains "hung up" at the last position where the cursor was in the document window. I think I can fix this by utilizing the Suspend and Resume notifiers and doing one last InvalAnnotationRect when I get the Suspend notification.
    3) For fun I tried clicking and dragging. Bad news. If I do this, thereafter the entire Illustrator window only redraws iself in the small rectangle that was set when I created the drawer port. By chance I found that if I use another tool that annotates such as the pencil *before* I use my tool, then everything is fine (although of course the box doesn't follow the cursor around anymore because my toolMouseDrag code is empty). How is using a previous tool "fixing" my code? I don't understand this one at all.
    Anyway, I suppose I could fork over a wad of cash and join the ADN and purchase a support case -- but hey, I'm just a hobbyist messing around at this point and facing some rather crappy documentation. Any tips will be much appreciated.
    John

  • How can i color the pixels that are only in the area of the rectangle i'm drawing on the picturebox1 ?

    In the form i have picturebox mouse down event:
    bool DrawIt = false;
    private void pictureBox1_MouseDown(object sender, MouseEventArgs e)
    timer1.Stop();
    LoadPictureAt(trackBar1.Value, sender);
    pictureBox1.Refresh();
    if (e.Button == MouseButtons.Left)
    rect = new Rectangle(e.X, e.Y, 0, 0);
    DrawIt = true;
    pictureBox1.Refresh();
    rect is a global Rectangle variable.
    The the picturebox mouse move event:
    List<Point> NewPoints = new List<Point>();
    private void pictureBox1_MouseMove(object sender, MouseEventArgs e)
    if (e.Button == System.Windows.Forms.MouseButtons.Left)
    if (DrawIt == true)
    rect = new Rectangle(rect.Left, rect.Top, Math.Min(e.X - rect.Left, pictureBox1.ClientRectangle.Width - rect.Left), Math.Min(e.Y - rect.Top, pictureBox1.ClientRectangle.Height - rect.Top));
    NewPoints.Add(e.Location);
    pictureBox1.Refresh();
    In the mouse move event i'm drawing the rectangle i didn't check it yet but in the move event i want to draw the rectangle in real time on the picturebox1.
    Then the paint event:
    private void pictureBox1_Paint(object sender, PaintEventArgs e)
    if (cloudPoints != null)
    if (DrawIt)
    CloudEnteringAlert.pointtocolorinrectangle = cloudPoints;
    Bitmap bmp = new Bitmap(pictureBox1.Width, pictureBox1.Height, PixelFormat.Format32bppArgb);
    CloudEnteringAlert.Paint(e.Graphics, 1, 200, bmp);
    First in the paint event how do i use the rect to draw the rectangle ?
    Second cloudPoints contain all the pixels in the pictureBox1 Image. Could be 44000 or 400.
    cloudPoints is a List<Point>  For example in cloudPoints index 0 i have a coordinate x = 100 y = 200 of a pixel.
    Then i send the pixels coordinates to another class with Paint method and color the pixels in yellow.
    But instead sending all the pixels coordinates in ccloudPoints i want to send to the paint event only the pixels coordinates from cloudPoints that exist inside the rectangle i was drawing. Only the pixels in the rectangle i was drawing.
    So in the end the List<Point> pointtocolorinrectangle will contain only the pixels coordinates exist in the rectangle i was drawing.
    1. How to fix the code in the move event ?
    2. How to change the code in the paint event so it will send coordinates of pixels only that exist in the drawn rectangle.

    I did it this way:
    bool DrawIt = false;
    private void pictureBox1_MouseDown(object sender, MouseEventArgs e)
    timer1.Stop();
    LoadPictureAt(trackBar1.Value, sender);
    pictureBox1.Refresh();
    if (e.Button == MouseButtons.Left)
    rect = new Rectangle(e.X, e.Y, 0, 0);
    DrawIt = true;
    pictureBox1.Refresh();
    List<Point> NewPoints = new List<Point>();
    private void pictureBox1_MouseMove(object sender, MouseEventArgs e)
    if (e.Button == System.Windows.Forms.MouseButtons.Left)
    if (DrawIt == true)
    rect = new Rectangle(rect.Left, rect.Top, Math.Min(e.X - rect.Left, pictureBox1.ClientRectangle.Width - rect.Left), Math.Min(e.Y - rect.Top, pictureBox1.ClientRectangle.Height - rect.Top));
    NewPoints.Add(e.Location);
    pictureBox1.Refresh();
    private void pictureBox1_Paint(object sender, PaintEventArgs e)
    if (cloudPoints != null)
    if (DrawIt)
    e.Graphics.DrawRectangle(pen, rect);
    var pointsAffected = cloudPoints.Where(pt => rect.Contains(pt));
    CloudEnteringAlert.pointtocolorinrectangle = pointsAffected.ToList();
    Bitmap bmp = new Bitmap(pictureBox1.Width, pictureBox1.Height, PixelFormat.Format32bppArgb);
    CloudEnteringAlert.Paint(e.Graphics, 1, 200, bmp);
    Working perfect just what i needed.

  • How to draw with mouse on Html 5 canvas inside browser (using createJs).

    Hi Everyone,
    In Flash AS2/3 we can draw with mouse in browser (of course inside Flash Player). How can we do that in Flash CC Canvas using CreateJs (result must be in canvas not in flash player). Something like this http://www.codicode.com/art/how_to_draw_on_a_html5_canvas_with_a_mouse.aspx
    Thanks in Advance

    This is a bit more of a JavaScript / Canvas question than a Flash question. I realize you're using the Flash product but Flash CC is just giving you an IDE with limited JavaScript automation.
    In this mode you're expected to be familiar with JavaScript and CreateJS. Are you?
    If not, what you might want to do is look at a sister product for HTML5 Canvas automation called EaselJS. It's a JavaScript library that makes using the Canvas very easy. Have a look at the commands here:
    http://www.createjs.com/Docs/EaselJS/modules/EaselJS.html
    You might find you don't need Flash CC to perform what you want. Otherwise this conversation may tip so deeply into JavaScript and CreateJS that it might be more prudent to use the Dreamweaver forum.

  • Free draw using Mouse & Save it???

    Hi
    I have an applet code using which we can free draw using mouse. Say you can sign or draw anything on screen in the space given. Now, How do I store it as an image. IF not as an image, are there any other way to store the image drawn using the mouse.

    Are you not drawing to an image anyway? If you don't then all your work will be lost if you minimize and restore the window.
    On creating your canvas component obtain an image via JComponent.createImage(). When drawing with the mouse, draw to a Graphics object which is obtained from that image via Image.getGraphics(). Then in your paintComponent() method, paint that image to the on-screen Graphics object.

  • I have been noticing that when using the computer the mouse keeps going in places where I really do not want and just now select the sentence without I have done anything. Sometimes goes to places like bookmark or open tabs in website when I am reading a

    I have been noticing that when using the computer the mouse keeps going in places where I really do not want and just now select the sentence without I have done anything. Sometimes goes to places like bookmark or open tabs in website when I am reading a page.
    Also I have noticed opened windows that I have not opened.
    I have verified the sharing folder and also the remote access but it not let me turn it off.
    Also I have add a password to my computer and even using the same one it looks like is not working.
    The I photo stopped working, Mac Mail does not let me add rules (this is from one day to the other)
    The computer is mine, the internet I use is payed by me with a password. I did not give permission to anyone to use my computer or share my files.
    In system preferences in the sharing folder is showing everyone and staff.
    My computer is private I do not own a company and I do not have a network set up in my house.
    I had my photos removed from my computer and even after trying to reinstall I photo and fix the Mac Mail is not working.
    I am receiving emails saying that I have sent emails to people that I do not know and including in a time where I am working and not using the computer.
    Any suggestions in how to fix this issue?
    I really appreciate.

    With the multitude of issues you have I would take it to an Apple store or AASP and have them sort it out. Then I would sign up for Apple camp or one on one.

  • I need to know how to edit a drawing - basically remove the arrows and text but at the same time match the background of the existing pic. then re add new text. how do i erase the arrows and text and arrows but match current background of pic. step by ste

    i need to know how to edit a drawing - basically remove the arrows and text but at the same time match the background of the existing pic. then re add new text. how do i erase the arrows and text and arrows but match current background of pic. step by step explanation please beginner

    Please post (a relevant section of) it right on this Forum.

  • The programs open tab ( list of programs open on comp) is always popping up on middle of screen whenever I go near the mouse.  HELP!!!  Have turned it off recently and moved it, a mac mini, now on new plug in and set up it now does it.

    The programs open tab ( list of programs open on comp) is always popping up on middle of screen whenever I go near the mouse.  HELP!!!  Have turned it off recently and moved it, a mac mini, now on new plug in and set up it now does it.
    Yes I have turned it off and restarted it, ubnplugged mouse and plugged it back  in.
    Have not updated it in a little bit
    running mavericks, which I dislike.10.9.1
    This is a new problem,
    Why where and what do I need to do to fix it? Please.
    Thanks for your help community, You guys are awesome, better than the guys n girls at Apple!!
    I have also noticed the drop down menu arrow on Numbers Tabs has dissappeared since move.
    you know the invisible arrow that appears in the additional tabs pages in "Numbers program"
    Especially an inconvenient for previous Numbers users as you all know.
    any word on New Numbers Tutes at all??
    You'd think with a Billion dollars they could make a 10 min clip saying here are changes guys, go enjoy new layout.....  Just saying...  not.
    anyway Hi and any help out there tonight is GREATLY APPRECIATED.
    Cheers Jason.

    If the reset doesn't work:
    FORCE IPAD INTO RECOVERY MODE
    1. Turn off iPad
    2. Turn on computer and launch iTune (make sure you have the latest version of iTune)
    3. Plug USB cable into computer's USB port
    4. Hold Home button down and plug the other end of cable into docking port. Do not release button until you see picture of iTune and plug (very important)
    5. Release Home button.
    ON COMPUTER
    6. iTune has detected iPad in recovery mode. You must restore this iPad before it can be used with iTune.
    7. Select "Restore iPad"...
    Note: Data will be lost

  • How do you make the "mouse down event" achnolage the area of an image

    Hi
    I am trying to program a simple game.
    In this game I would like to insert
    giff images, that when "clicked on"
    by the mouse, will finallly return some kind of action.
    In the book that I am reading, I have learnt how to
    use the basics of the "mousedown event".
    This I found out would be no use to me for what I am trying to achieve
    at this moment,
    because it only alows me to choose one coordinate at a time.
    Is there any class that will able me to click anywhere on the "area" of the giff image instead of only one coordinate?
    I hope I am clear enough..

    And this is how you create the JLabel:
    JLabel j = new JLabel(new ImageIcon("yourImage.gif"));

  • About a month ago, Mavericks had an automatic update. I have a Windows 7 partition bootcamped on my macbook pro. Before the update, everything was fine. Now, when I attempt to start Windows partition, as soon as I touch the keyboard or mouse the scre

    about a month ago, Mavericks had an automatic update. I have a Windows 7 partition bootcamped on my macbook pro. Before the update, everything was fine. Now, when I attempt to start Windows partition, as soon as I touch the keyboard or mouse the screen goes black and I can't go any further. I have tried to re-load the bootcamp drivers and try again. It does the same thing. Any help would be great.

    i sue windows 7 and my orignal macintosh formated and get online same window

  • Why do i keep getting Java Script Application saying uninstal and every time i click on my mouse the pop up appears and its sometimes hard to get rid of it. Please help. God Bless

    As soon as I log on to Firefox this pop up appears on the screen saying Java Script Application and under neath it it says uninstal and beside uninstal is a yellow triangle with a exclamation mark inside of it. Every time I click the mouse the pop up reappears over and over. It's really a nuisance and I need your help.The word uninstal is spelled like you see it, even though it's spelled wrong.Thank you and God Bless

    Other users have reported that this is caused by one of their add-ons. I suggest going to the Add-ons page and disabling everything that is not essential, and then restarting Firefox. Hopefully it's not caused by something you really rely on.
    orange Firefox button ''or'' Tools menu > Add-ons
    On the left side, click Extensions
    Then disable as many as possible and restart Firefox.
    Any luck?

  • [svn] 3580: MXMLG-243 - Path does not draw in the correct location when width and height are set

    Revision: 3580
    Author: [email protected]
    Date: 2008-10-10 16:24:50 -0700 (Fri, 10 Oct 2008)
    Log Message:
    MXMLG-243 - Path does not draw in the correct location when width and height are set
    Fixed MatrixUtil.transformBounds to offset the four bound points by the origin
    Bug: MXMLG-243
    QA: Yes
    Doc: No
    Review: Evtim
    Ticket Links:
    http://bugs.adobe.com/jira/browse/MXMLG-243
    http://bugs.adobe.com/jira/browse/MXMLG-243
    Modified Paths:
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/utils/MatrixUtil.as

    Hi,
    For web application problem, please post your thread in
    ASP.NET forum.
    Best Wishes!
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey. Thanks<br/> MSDN Community Support<br/> <br/> Please remember to &quot;Mark as Answer&quot; the responses that resolved your issue. It is a common way to recognize those who have helped you, and
    makes it easier for other visitors to find the resolution later.

  • I would like to cut and paste information from a word file onto a pdf file, as well as draw lines onto the pdf file.  How can I accomplish that task?  Is there software I can purchase?

    I would like to cut and paste information from a word file onto a pdf file, as well as draw lines onto the pdf file.  How can I accomplish that task?  Is there software I can purchase?

    Hi jgallu7382,
    The latter is easily accomplished using the Drawing Markup tools, which are available in both the free Adobe Reader, and in Acrobat. Copying/pasting text into the PDF is something that you could do using the editing tools that are available only in Acrobat. Note, however, that Acrobat isn't intended to be a text-editing application, so editing there won't be as robust as in an application designed specifically for that purpose. (It's also worth mentioning that you won't be able to alter a PDF if it has document permissions applied that would prevent you from doing so.)
    I hope that answers your questions.
    Best,
    Sara

  • Need to draw line after the 2nd line item(Smart Forms)

    Dear Friends,
    I need to draw horizontal line after the 2nd line item  and 3rd line item in smart forms.How can i achive this.
    Plz help.
    Edited by: farook shaik on May 19, 2009 8:19 AM

    This is what you need to do:
    1> In the tables->details section define two line types LT1 and LT2.
    2> Come back to tables section pressing the table painter button.
    3> Select a line type for which you want to have an underline(say LT2).
         a] If the anchor cursor does not come click the draw lines and columns button( the pencil icon nutton)
         b] select the line type ( it will become black after selection. Press and hold down ctrl to select
             multiple cells.
         c] after selection click the lower 'frame button' ( which is right at the top of box and shading).
    4> Now goto data section where you have given your internal table name and work area.
         a] in the sort criteria put your field POSNR and check the Event on Sort end chk box.
         b] you will see an extra node under the main area of the table.
         c] Create a table line with the line type LT2 in the node.
         d]Also in the Main area add another table line with LT1 as the line type.
    5> If POSNR remains unchnged LT1 will be triggered.
    6> if Posnr changes then LT2 will be triggered with the underline.
    This will suffice your requirement.

  • Wifi is not available where I come from. I have broadband connection where data transmission is through cell sites then to USB modem connected to a computer. The modem draws power from the computer. Will this setup work with the ipad?

    Wifi is not available where I come from. I have broadband connection where data transmission is through cell sites then to USB modem connected to a computer. The modem draws power from the computer. Will this setup work with the ipad?

    iPad requires Wifi (or 3G /LTE) to connect to the Internet. You cannot connect a USB modem to the iPad.
    You can create your own WiFi hotspot through your computer for your iPad to connect to, if your computer supports this functionality. All Wifi Macs and many Wifi PCs do. Check your computer manual for how to do it.

Maybe you are looking for

  • How do I get Alt text to show in DreamweaverCC

    Please excuse my ignorance. I would like to know how to get the Alt text to show when hovering over images. It use to happen naturally in Dreamweaver 3, but now in the latest CC version it doesn't seem to work. I use it to link images to pages so whe

  • Alert in case of errors in XI tx sm58

    Hi, we discovered that we sometimes (not more often than once a month) have errors in XI tx sm58, e.g. when a target SAP system has been down and idocs have not been delivered. Is there an easy way to monitor sm58 and send e.g. an email in case of er

  • Quicktime has audio, no video

    Ever since "day one" of owning my iPod shuffle (over a year), Quicktime has never worked. I get neon color static on the screen, no video, but I do get audio. I have reloaded several times and finally gave up and just open my videos with Real Player.

  • Transfering Outlook Express Address Book to OS X mail

    Hi Folks, Have finally made the leap from OS 9 to OS X. That was the easy part. Now, how to successfully tranfer my 700+items Outlook Express Address Book into OS X mail? I'm about at my wits end. I've thus far managed to transfer the lot of them int

  • My Ipod wont play all of my songs they just stopped working. Can anybody help?

    My ipod will not play all of my songs, they just stopped working, can anybody help me?