Need a Algorithm for Getting the border of a shape

I have a problem...I want a pseudocode..for the following problem
Aim:
I need the lines to be ordered first and then also it should be in anticlockwise directions (if the points are also not ordered for these
ordered lines ..order them too... in anti clockwise direction)
Specification:
I have a vector of lines and arcs to form a shape....
...the lines are not ordered (say for example line 1 followed by 2 ,3 and so
on... but the vector contains lines in random order say 1 3 5 2 4 so
on...please note the vector contains points for the line only and no
identification for the order.)
The lines will combine to form any shape (eg rectangle ..rhombus or any
polygon or shape.) the shape can also contain lines along diagonal too.. or
some lines intersecting the polygon at any of the sides...but within the
boundary
for example..
new java.awt.Point(10, 20));
new java.awt.Point(10, 50)); //line 4
new java.awt.Point(40, 50));
new java.awt.Point(10, 50)); //line 3
new java.awt.Point(40, 50));
new java.awt.Point(40, 20)); //line 1
new java.awt.Point(10, 20));
new java.awt.Point(40, 20)); //line 2
new java.awt.Point(10, 25));
new java.awt.Point(40, 35)); //line 5
new java.awt.Point(40, 25));
new java.awt.Point(10, 45)); //line 6
kindly if any one knows the solution for this or any site which has a
solution for this...please send it or find the solution at the earliest.
Thanking u in advance.
Oliver

My problem is I have a shape which can be formed from either arcs or lines or maybe both.This shape can contain lines in the inside ,touching the borders .Basically any combinations of lines or arcs a user can imagine.
A simple example.
__a___
|\ / |
b| f\/ e | d
|__\___|
c
Now say this is the shape and the lines for forming the shape are a,b,c,d,e,f these lines are contained in the vector, but say in random order ex. b,e,f,a,d,c
Now from these vectos I need the lines to be ordered in a sequence like a,b,c,d,e,f but I need the border first, NOTE the lines contain no identification like a,b but the startpoint and endpoints in the vector.
AIM: I need the lines ordered in anticlockwise direction.
Now taking the above diagram the corners could contain arcs instead of the lines intersecting.

Similar Messages

  • Need VB script for getting the IIS certification information

    Hi guys,
    I have totally 1000 IIS servers  2003 & 2008
    windows and some of the  servers configured
    IIS 3rd party Security certificates. I need a script to get the certification information like expiry date & certificate vendor name.
    Regards,
    SreeM

    Post here:http://forums.iis.net/
    Look in Gallery for IIS scripts:http://gallery.technet.microsoft.com/
    ¯\_(ツ)_/¯

  • FM for get the week number

    Hi experts..
    I need a FM for get the week number...
    for example today 14 april 2010 is the  15 week from the start of the year..
    best regards
    Marco

    Hi,
    Check this Fm : GET_WEEK_INFO_BASED_ON_DATE .
    Just enter the date
    the week parameter returns the year and week number. the last 2 digits give the week number.
    Thanks.

  • I have Photoshop Elements 6.0 for mac. What do I need to do to get the latest version?

    I havePhotoshop Elements 6.0 for mac. What do I need to do to get the latest version?

    See http://www.adobe.com/products/photoshop-elements/buying-guide.displayTab3.html

  • I need a program for camera.The androide has a program IP Cam View basic that has the fohu HA 425 and I get the cameras.I downlouded the IP camera viewer in the Aple but this program doesnt have the fuho HA 425. Which apple program is compatible?

    I need a program for camera.The androide has a program IP Cam View basic that has the fohu HA 425 and I get the cameras.I downlouded the IP camera viewer in the Aple but this program doesnt have the fuho HA 425. Which apple program is compatible?

    Hi,
    As far as I know, Sony Ericsson Z520, like a lot of the other cell phones, doesn�t support bluetooth serial communication.
    See:
    http://developer.sonyericsson.com/entry.jspa?externalID=138&categoryID=5
    BUT(!) You should double check this information.
    If you ask me, we have done similar project.
    We are working on hobby project � our robot use J2ME cell phone as on-board brain.
    And there is connection between this small robot and Linux-based PC.
    Communication was done via BlueTooth (in reality we use Linux implementation of BlueTooth stack and obexftp).
    BUT (!) We use Siemens S75 for this communication.
    I�m afraid that Siemens is the only manufacture, which implemented serial communication over bluetooth, embedded camera and non-usb socket.
    Also there are some Motorola phones, which implement serial communication over bluetooth.
    But � note that all Motorola phones use USB sockets and it will not be easy for you to make connection between such a phone and the robot.
    If you need just connection between cell phone and PC, then may be USB is OK too.
    Our robot project: www.RoboHobby.com

  • I use Office Outlook for mac 2011 to organise my email & calendar. Since updating to OS X Mavericks I have not been able to sync the calendar to my iPhone. What do I need to do to get the calendars syncing again?

    I use Office Outlook for mac 2011 to organise my email & calendar. Since updating to OS X Mavericks I have not been able to sync the calendar to my iPhone. What do I need to do to get the calendars syncing again?

    Jason The Hague wrote:
    Thanks!  But seriously why have Apple disabled the info sync on iTunes?  By 'Upgrading' to Mavericks I've inadvertantly disabled my Apple mobile devices from fulfilling their function.  Come on Apple work with us here!!
    Apple told developers they were removing that service over two years ago. The developers that depended upon it should have done something about it.
    Why did they remove it? My guess is because it was pretty crappy, was difficult to maintain, and wasn't a good solution for multiple devices that could get the info without tethering to a "base" Mac.

  • Using JCom for getting the user name

    I am using jcom610-win.exe and weblogic610sp2_win.exe .I need to use the Jcom for getting the user name of the NT Iser Logged in.I have got the process for this on the page at http://e-docs.bea.com/wls/docs61/jcomreference/Security.html .But this page uses a method isCallerAuthenticated() from a class file called jcom .I looked into the whole bea directory but there was no class like in the server dir.Can you tell where to get this class from.And if this has not been provided into the jar files that come along with the installable then why is it mentioned in the page @ http://e-docs.bea.com/wls/docs61/jcomreference/Security.html

    Hi.
    You might have better luck posting this in teh jcom newsgroup.
    Regards,
    Michael
    Manoj Gupta wrote:
    I am using jcom610-win.exe and weblogic610sp2_win.exe .I need to use the Jcom for getting the user name of the NT Iser Logged in.I have got the process for this on the page at http://e-docs.bea.com/wls/docs61/jcomreference/Security.html .But this page uses a method isCallerAuthenticated() from a class file called jcom .I looked into the whole bea directory but there was no class like in the server dir.Can you tell where to get this class from.And if this has not been provided into the jar files that come along with the installable then why is it mentioned in the page @ http://e-docs.bea.com/wls/docs61/jcomreference/Security.html
    Michael Young
    Developer Relations Engineer
    BEA Support

  • I've just subscribed to Acrobat Pro. Application manager is on desktop, but no Pro. When I open a PDF to edit, it's just Reader. What do i need to do to get the Pro?

    I've just subscribed to Acrobat Pro. Application manager is on desktop, but no Pro. When I open a PDF to edit, it's just Reader. What do i need to do to get the Pro?

    Link for Download & Install & Setup & Activation problems may help
    -Chat http://www.adobe.com/support/download-install/supportinfo/

  • Function module for getting the partner details and Classifications

    Hi,
    Can any one tell me FMs for getting the Partner Details and for getting the characteristics associated with an equipment??
    Thanks

    Hi Anu,
    are you talking about the SAP Business Partner???
    Well, if yes, then just check the FM 'BAPI_BUPA_CENTRAL_GETDETAIL'.
    Or just search for oher FMs with BAPI_BUPA*.
    Hope this helps...
    Ciao Bernhard

  • FM for getting the logical file name

    Hi,
    is there any FM for getting the logical file name.
    Thanks
    Vikranth

    Hi,
    CONSTANTS: c_mask          TYPE char9      VALUE ',.,..'.
          Pick up the file path from the application server
    FORM f1001_browse_appl_file .
      DATA:  lcl_directory  TYPE char128.
      lcl_directory  = p_direct.
      CALL FUNCTION '/SAPDMC/LSM_F4_SERVER_FILE'
        EXPORTING
          directory        = lcl_directory
          filemask         = c_mask
        IMPORTING
          serverfile       = p_f2  " Parameter File
        EXCEPTIONS
          canceled_by_user = 1
          OTHERS           = 2.
      IF sy-subrc <> 0.
       MESSAGE e000(zmm) WITH text-039.
       flg_app = 'X'.
      ENDIF.
    Then use  OPEN DATASET for data reading
    Hope this Helps.
    Manish
    Message was edited by:
            Manish Kumar

  • My MacBook Pro got wet and I lost all of my childs photos from the day she was born. Is there anyway I could get these pictures back from my iCloud? I actually care more for getting the photos back than I do my laptop. Please help! Thank you!

    My MacBook Pro got wet and I lost all of my childs photos from the day she was born. Is there anyway I could get these pictures back from my iCloud? I actually care more for getting the photos back than I do my laptop. Please help! Thank

    Welcome to the Apple community khnkOliver.
    I assume these photos, or at least not all of them weren't in photo stream.
    You should be able to recover your photos from a back up.

  • I installed iWork11 but the '09 versions of the software are still running--and the default. What do I need to do to get the '11 versions working?

    I installed iWork11 but the '09 versions of the software are still running--and the default. What do I need to do to get the '11 versions working?

    It's very simple. If you want to use iPhoto, just let it manage things as it does. Other than that: Export from iPhoto and delete the image from iPhoto. That will remove the master and all versions.
    If space is an issue... use an external disk.
    Don't change anything in the iPhoto Library Folder via the Finder or any other application. iPhoto depends on the structure as well as the contents of this folder. Moving things, renaming things, deleting them or otherwise making changes will prevent iPhoto from working and could even cause you to damage or lose your photos.
    Regards
    TD

  • Requirement for getting the VAT Taxes automatically from the vendor invoice

    Dear All,
    We Have a Requirement for getting the VAT Taxes automatically from the vendor invoice in to the Sales invoice after invoice verification process.Is this feasible?. Can anybody explain how this can be done to overcome this issue.
    Thanking you,
    Best regards,
    R.Srinivasan

    hi,
    technically i do not think tht can be done. but even from functional part its incorrect in the sense tht the values on which tax is calculated in purchase may be very different from tht in sales. so we may never get the correct picture.
    saurabh

  • Is there any Vi for getting the CPU and Memory usage of the Local as well as Remote System

    Is there any Vi for getting the CPU and Memory usage of the Local as well as Remote System

    Find the attachment(LV8.5) for local machines. 
    You can use shared variables to monitor the remote machine's usage.
    Attachments:
    Task Monitor 85.vi ‏25 KB

  • Userexits/BADI in ME31K for getting the contract number created.

    Dear Experts,
    Is there any userexits/BADI available in ME31K , for getting the contract number once it is created.
    Thanks&Regards,
    Anversha

    Hi
    find the BADI:
    1. Goto SE24
    2. Open the class "CL_EXITHANDLER"
    3. Open the Metnod "GET_INSTANCE"
    4. Put a Break point in the "  CASE sy-subrc."
    CALL METHOD cl_exithandler=>get_class_name_by_interface
        EXPORTING
          instance                      = instance
        IMPORTING
          class_name                    = class_name
        CHANGING
          exit_name                     = exit_name
        EXCEPTIONS
          no_reference                  = 1
          no_interface_reference        = 2
          no_exit_interface             = 3
          data_incons_in_exit_managem   = 4
          class_not_implement_interface = 5
          OTHERS                        = 6.
      CASE sy-subrc.
        WHEN 1.
          RAISE no_reference.
        WHEN 2.
          RAISE no_interface_reference.
        WHEN 3.
          RAISE no_exit_interface.
        WHEN 4.
          RAISE data_incons_in_exit_managem.
        WHEN 5.
          RAISE class_not_implement_interface.
      ENDCASE.
    5. Come Back and Execute the Transaction Code
    6. In the Debugging screen "exit_name" having the BADI Name for that Tcode.

Maybe you are looking for

  • Regarding Transaction code sxmb_ifr in SAP XI

    HI friends please help me on the below issue. when i logon to my SAP XI GUI and when i click on the transaction code sxmb_ifr, then my default browser is not opening automatically. My O/S is linux.and i already installed java web start also.please se

  • How do I get my windows to move to my external monitor when connecting one?

    I have the original Macbook and a 23" ACD. Ever since OS X 10.5, when I plug in my ACD, the windows stay on the Macbook screen. Before, in 10.4.x, the windows used to move over to the ACD, which is where the dock and menu bar are. How do I fix this?

  • Can't clean install Yosemite to 3rd party SSD in 2008 MBP

    Hi all. I'm a longtime lurker, first time poster. I seem to have really stymied myself with trying to upgrade my ol' reliable MBP. My machine: Late 2008 15" MacBook Pro 2.4Ghz Core 2 Duo 4GB RAM (3rd party Crucial, 2 matching 2GB sticks - it original

  • Error message about Shared Technologies

    Have tried many, many times to install Elements 12 and always same error message about Shared Technologies when install aborts.  Never had problems installing previous versions of Elements nor problems with Lightroom installs.  Very frustrating!!!!!!

  • Disable non secure items alert in apex

    Hi every time when a page in apex loads i see an alret This page contiains both secure and non secure items !! do yiu wnt to display non secure items ? Button Options ( Yes <> No <> Cancel ) i dont wnt this to be happen , imean i would like to disabl