Can not get the proper angle value

Hello,
I have drawed a circle on the canvas control, and want to capture an arbitrary point in the circle, where the point's coordinate is determined by the "GetRelativeMouseState()" function. The whole idea is this:  once click in the circle, I can get the coordinate of the clicking point by using "GetRelativeMouseState()", then drawing a line from the circle's midpoint to the point, expecting to calculate the angle between the line and the X axis. I post the sketch to explain how the process is treated :
the coordinate of the midpoint is (width/2, height/2), so if want to calculate the theta angle, I can get the formular: theta = atan((height/2 - yCoor) / (width/2 - xCoor)), there is a strange condition: if the line is near to the X axis (in fact, the line turn to angle exceed 135 degree (as to the counterclockwise) but there is a distinct angle between the X axis, the theta), I always get a zero angle value(the theta).
Please help whether  the "GetRelativeMouseState()" can provide an exact position?
David

How are you calculating the angles? With some basic trigonometry and atan2 () function I always get the correct angles: take a look at the attached canvas.prj sample which I modified adding the necessary functions (click Draw Circle and check Angle drawing: when clicking on the canvas the program will draw the line and calculate the corresponding angle)
Proud to use LW/CVI from 3.1 on.
My contributions to the Developer Zone Community
If I have helped you, why not giving me a kudos?
Attachments:
canvas.zip ‏10 KB

Similar Messages

  • I can not get the correct anser

    Hi, Please help me.  As the following sch I can not get the correct sqrt value.  if changing resistor of R1 I always get 12v direct flow output.
    Attachments:
    op_divider.zip ‏121 KB

    Thanks for your answers.  I want the sch to do the operation of square root.
     1. in my sch the inverting input is DC -5v, I want to get the square root of 5?
     2. In my feedback path I use a multiplier, I Originally thought it is a negative feedback?
     3. it Already have ground in the sch, I do not understand that you say "did not ground the scope"?
    Thanks again, Could you give me the further pointing. if possible Could you give me a correct sch.
    (in fact, I get the sch from a rough sch in a textbook(the rough sch not for multisim). I just give the values for the all components)

  • I can not get the flash player plug in to work with Internet Explorer

    I can not get the flash player plug in to work with Internet Explorer

    Zoltan71 wrote:
    I just bought this computer. My Internet Explorer is version 11.0.1
    I have the box checked to Install new version automatically, but it has not done any upgrading.
    I can't get the computer to update anything as far as I can see.
    The flash plug in does work with the Crome browser but it will not work with Internet explorer.
    I looked in the manage add-ons and it says enabled.
    I also went into the safety tab and deselected
    Active X filtering.
    Restarted and still does not work.
    I need help.....
    Chrome uses a different and separate plug-in.
    There are things about IE you need to know, especially 11. Specifically:
    "User-Agent Strings"
    That doesn't mean a lot, I'm sure, but it's the root of your problems, and Flash Player has nothing to do with it.
    Microsoft "rewrote" the User-Agent Strings for the abomination they call their latest and greatest browser. User-Agent Strings are what websites use to identify the browser you're using and provide the proper content for it's browser engine, like ActiveX stuff, and Flash or HTML5 video. Thanks to the geniuses in Redmond, WA, the User-Agent Strings for IE11 (which has a Trident engine), ID it as either "Gecko" (Firefox) or "Webkit" (Chrome). Problem is: when the site the directs to the content for one of these two engines, the Trident engine in IE can't intepret it and the site then sees IE as an "unidentified" browser.
    The problem with an unidentified browser is that the plug-ins in that browser aren't recognized either, so even though you're up to date, it says you need the latest Flash Player when you use IE11. YouTube... has converted to HTML5 video so if it doesn't detect Flash Player, it can display HTML5 (MP4) video which requires no plug-in to play. Facebook can't do that, because HTML5 doesn't apply to games... only video.
    Microsoft has no plans to "fix" the mess they've created because they think it's a great idea to block you out of the websites you visit.
    They recommend using "Compatibility View" and pretending that you're using an older verison of IE... Problem with that is that it's seen limited success, and you have to enable it for EVERY page that has problems... individually.
    I'm not big on "pretending" so I recommend actually using another browser.
    Firefox (from Mozilla)
    Opera (from Opera)
    Safari (from Apple)
    Chrome (from Google)
    ANY of those will work where IE11 won't, with the Flash Player Plug-in (For all other browsers), and Chrome doesn't even need that because it has its own Flash Player plugin built in.

  • HT204382 I was attempting to upload a video to face book and decided to cancel, now I can not get the quicktime icon with Facebook icon embedded to delete? what are steps to clear desktop?

    I was attempting to upload a video to face book and decided to cancel, now I can not get the quicktime icon with Facebook icon embedded to delete? what are steps to clear desktop?

    A warm welcome to Apple discussions!
    A 2003 iMac cannot support Snow Leopard 10.6; you'd need an Intel processor and that cannot be retrofitted to your Mac. What does "About this Mac" in your Apple menu say  for your processor speed? What does it say about how much RAM you have?
    If the processor is 1ghz or faster, you can run OS 10.5; otherwise, you are maxed out at 10.4.11.
    Also, are you running any commercial ("pay for") anti-virus or security software? They are notorious for slowing most Macs to a fraction of their speed potential.
    A too-full hard drive can drag down performance, especially if you don't have a lot of physical RAM installed. If you single-click your hard drive icon and then do command i, you'll see the disk usage. Looks like this:
    The value for "Used" should be no more than about 90 percent of "Capacity." In the example image, that drive has about 34 percent of its space used and 66 percent free--more than enough. Please post what you see for your Capacity and Used numbers
    There are a few more things we might check but this is a good start.
    Awaiting your information,
    Allan

  • Can not get the parameter?

    I use a form to upload files,
    like this:
    <form name="gdform10" action="upload.jsp" ENCTYPE="multipart/form-data" method="post">
    <input type="hidden" name="picName" value="wxds.jpg">
    <input type="file" name="file">
    <input type="submit" name="savePic" value="modify">
    </form>
    but I can not get the parameter picName in the upload.jsp,
    like :
    String pname = request.getParameter("picName");
    but pname is null.

    Hello,
    In Jsp, if you want to upload file, you can't directly use "request.getParameter()".
    There're two company provide components for you and it's free.
    First is jspsmart company, it offer jspsmartUpload component and link is
    http://www.jspsmart.com
    Second is o'reilly, it offer MultipartRequest component and links is http://www.servlets.com/cos/javadoc/com/oreilly/servlet/MultipartRequest.html
    for example, you use oreilly component.
    <%@ page import="com.oreilly.servlet.MultipartRequest" %>
    String saveDirectory = "c:\\Upload\\";
    int maxPostSize = 5 * 1024*1024;
    MultipartRequest multi= new MultipartRequest(request,saveDirectory,maxPostSize );
    Enumeration filesname = multi.getFileNames();
    while(filesname.hasMoreElements()){
    String name = (String)filesname.nextElement();
    FileName = multi.getFilesystemName(name);
    File f = multi.getFile(name);
    String ContentType = multi.getContentType(name);
    ps. above codes is from book named "java server pages tech reference"

  • I can not get the debugger to work on oracle studio 12.3 - It will not attach

    I can not get the debugger to work on oracle studio 12.3 - It will not attach

    APN for Tmobile is epc.tmobile.com
    MMSC is http://216.155.174.84/servlets/mms
    Here are the instructions:
    Create devel catalog (appl from this catalog can damage your phone but don't have to so if you are not sure about your needs or skills dont use it and wait for official applications from Nokia or firmware update) The software hosted in Extras-devel is NOT ready for normal users! PLEASE PLEASE PLEASE don't play with it unless you really know what you are doing. Be ready to file proper bug reports instead of posting complaints. Expected problems: crashes, battery drain, poor system performance, full disk space & more - SERIOUSLY! Don't play with Extras-devel if you haven't backed up your data or are prepared to re-flash your device.
    Application manager --> Application catalogs --> New
    Catalog name: Extras-devel
    Web address: http://repository.maemo.org/extras-devel
    Distribution: fremantle
    Components: free non-free
    Refresh catalogue
    Install fAPN and fMMS
    Run fAPN and create new APN with MMS setting which you can get from your operator or find on this page (this may not be needed for all users, see note below)
    Run fMMS and it will start with configuration
    Put APN name the same you named your MMS APN point during fAPN configuration
    Type MMSC which you can take from your operator
    Type your number starting with +
    Put max size of pics you want to have in outgoing MMS
    Save all and start sending MMS from fMMS menu.
    It is very important to put correct setting in new APN and be sure if there is proxy needed in your operator.
    WHEN YOU GO TO MMS to set your configuraions, the information should look like this
    MMSC: http://216.155.174.84/servlets/mms
    Resize Image: 300
    Your Phone Number: +##########
    NOW U ARE DONE!! =)

  • Can not get the Cisco TSP to show UP - 2003 64bit

    Can not get the Cisco TSP to show up on the list of Providers in Phone and Modem Options- Advance tab. Installed ver. 4.1, it seems to install correctly, with no errors but when I restart the server, there is no Cisco TSP001.tsp in the providers list. It works perfectly on my Windows 2003 servers, but will not work on this new Windows 2003 64 bit server. Any tricks to getting this to load?
    Thanks
    Keith

    Hi
    There is no 64-bit TSP yet. Whilst 32-bit apps will work OK for the most part on 64-bit via the WoW function, drivers tend to not be so flexible, and that's what TSP is...
    You'll have to bother your Cisco accounts folks to get this prioritised, it is upsetting a lot of people...
    Aaron
    Please rate helpful posts...

  • I have IMac 10.7.5 Lion I use I forgot the password and I did a few fixes from the we sites, which did not work and now I can not get the computer to reboot the gray screen comes on and if a shift c I get a load bar and it goes half way and help

    I have IMac 10.7.5 Lion I use I forgot the password and I did a few fixes from web sites, which did not work and now I can not get the computer to reboot the gray screen comes on with the apple and if a shift+c, I get a load bar and it goes half way and stops, I can get into the black screen area with the hard drive info
    I did the following:   mount -uw /    rm/var/db/.AppleSetupDone    shutdown/uses/us  reboot Ok I know I should not have, but now I need help to reboot and hopefully not lose everything on the desk top, Linda Markle

    You did the wrong things. In the future it's a good idea to remember not to do something when you don't know what you are doing and what happens when you do it.
    Forgot Your Account Password
    For Lion, Mountain Lion, or Mavericks
        Boot to the Recovery HD:
    Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
         When the menubar appears select Terminal from the Utilities menu.
         Enter resetpassword at the prompt and press RETURN. Follow
         instructions in the dialog window that will appear.
         Or see:
           Reset a Mac OS X 10.7 Lion Password
           OS X Mountain Lion- Reset a login password,
           OS X Mavericks- Solve password problems,
           OS X Lion- Apple ID can be used to reset your user account password.

  • TS3988 I just bought a Iphone 5 -- my Iphone 4 and my ipad used to automatically sinc calendars via the Icloud whenever I entered anything on either device -- I can not get the new phone to do this.I have  check the settings on both devices and they seem

    I just bought a Iphone 5 -- my Iphone 4 and my ipad used to automatically sinc calendars via the Icloud whenever I entered anything on either device -- I can not get the new phone to do this.I have  check the settings on both devices and they seem to be t

    There are only two things that you must do to connect a device to calendars:
    1)  In settings>icloud, you must log in, WITH THE CORRECT ID/PASSWORD, and
    2)  Turn on calendars on the same page.
    You said that the iphone 4 and ipad **used** to automatically sync.  Do they no long sync?

  • I just upgraded my iMac to OS 10.8.5 from 10.6.8 and now I can not get the calendars on my Mac and my iPhone 4s (running iOS 8.3) to sync

    I just upgraded my iMac to OS 10.8.5 from 10.6.8 and now I can not get the calendars on my Mac and my iPhone 4s (running iOS 8.3) to sync.  I already tried replacing the calendars on the phone with those on my computer but nothing happened.

    Set up iCloud
    Set up iCloud (2)

  • I have Adobe Photoshop Elements 10. It came installed on my HP Desktop. I am can not get the warp text tool to work. It has worked in the past. Once I click warp text, the little window does not pop up, and if I try to do anything else after I click warp

    I have Adobe Photoshop Elements 10. It came installed on my HP Desktop. I am can not get the warp text tool to work. It has worked in the past. Once I click warp text, the little window does not pop up, and if I try to do anything else after I click warp text, it wont let me. Just sounds the ding, alert, can still slightly navigate the program but can not use any other tools after clicking warp text. I just have to open task manager and close the program. not sure if I'm doing something wrong or maybe I just need to uninstall and re install. Having trouble finding out how to uninstall and reinstall because the program came pre installed on my desktop.

    It actually sounds like the warp text window is opening off screen.
    Resetting the photoshop elements 10 preferences should fix it.
    *Press and hold the Shift+Ctrl+Alt keys just after you start the launch of the photoshop elements 10 editor
    *Keep holding the keys down until you get a dialog asking if you want to delete the adobe photoshop elements setting file
    *Press Yes

  • Can not get the agent from rule determination

    Dear expert,
      We have a PR workflow,for one step, the agent is determined by one rule,In our Q system,everythink is ok to get the agent correctly,and the workflow also can works.but in our P system,can not get the agent from the rule,when we simulate the rule,the agent can be get smoothly,but in workflow,realy can't get the agent(after trace the workflow), so would you like to give me sone suggestion, whant had happen in our workflow?
    Many thanks!
    Best Regards,
    Kerry

    Tks!
    I have one question,how to check the agent assignment is active?
    and also want to say,the rule that determin the responsible agent is used at one step of the workflow,not for possible agent of task ,and the rule's type is RESPONSIBILITIES.
    Best Regards
    Edited by: Kerry Wang on Jun 25, 2010 3:14 AM

  • Hi help unlock the phone happened after we installed a new programa we can not get the activation password and ID, I know and still does not stop the phone bought in Israel and what documents should be sent to confirm that my phone Please read through the

    hi help unlock the phone happened after we installed a new programa we can not get the activation password and ID, I know and still does not stop the phone bought in Israel and what documents should be sent to confirm that my phone Please read through the help

    What I am saying is ..........
    The iPhone HAS to be active making calls on the UK carrier network for the carrier to identify as "theirs" and therefore eligible for the Carrier to unlock
    The way to achieve this is to use a PAYG sim making and receiving calls to establish a customer relationship  with the Carrier and then follow the Carrier's process to unlock
    With a PAYG it usually means adding a specified (by the carrier ) amount  usually £15 /£20 depending on the carrier
    This is how O2 function and according to Gemma  this is how Vodafone work

  • I have recently upgraded to mountain lion and I can not get the calendar application to work. I con appears on the side put on calendars. Any suggestions

    I have recently upgrades to Mountain Lion and I can not get the calendar utility to come alive. Icon appears in the tast bar but the application does not launch or appear to be any where else. Any suggestion?

    Did you look in the Applications folder for Calendar? If it is there, remove the item that is in the Dock and replace it by dragging the Calendar application to the Dock.
    If it is not there, did you have iCal located somewhere other than the Applications folder when you upgraded?

  • I can not get the latest version of itunes to update on my computer.  How can I do this?

    I can not get the newest version of itunes to update on my account.   How do I do this?

    What have you tried?
    What happened?
    Error message?
    What did it say?
    Any info?

Maybe you are looking for

  • NF-e 3.10 - Tag VeicProd - Veiculos novos

    Pessoal, Estamos migrando para a emissão da NF-e 3.10 com GRC, para um dos cenários de vendas há o preenchimento da tag VeicProd (Veiculos Novos), entretanto está sendo enviado a seguinte mensagem de erro:  S:J1B_NFE_ERP_GRC:251 000001 IT_NFE_PROD_VE

  • Some options are greyed out in Captivate 8.0.1 and my bullets do not work?

    Hi, I am using Captivate 8.0.1 and am having trouble with 2 things: 1. The bullets and indents that I have formated for my responsive project appear very messed up and not as I have formatted when I view my project in Edge Inspect? 2. Some options in

  • How do I see my game center games on game center again?

    In game center on my iPod touch, none of the game center games will appear and none of the achievements of my friends will appear either. I have tried turning it off and on and also resetting and restoring the touch but nothing worked so far. What do

  • Error handling in File content conversion

    In our project , we are converting Flat file to XML by adapter modules ... File is like this : HEADER 123 567 DETAIL UWERU AASD fftk DETAIL UWERU AASD fftk DETAIL UWERU AASD fftk DETAIL UWERU AASD fftk FOOTER File has been succesfully converted to XM

  • Media Player 11/empty PC Library/unable to transfer, import, sync - Micro Photo proble

    I've just received a new computer and had to download my Micro software all over again - Media Source 5, burner, playsforsure. Running WMP . Windows XP Professional with SP 2. ?My problem -- my PC Library is empty. I can't seem to get the music from