Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

area of polygon

  • 26-11-2003 4:04pm
    #1
    Registered Users, Registered Users 2 Posts: 2,621 ✭✭✭


    Right now problem calculating the area.... trouble is intersections.... anyone no away around this problem?


Comments

  • Registered Users, Registered Users 2 Posts: 4,196 ✭✭✭deadl0ck


    You'll have to be a little clearer.

    Do you mean intersecting polygons or what ?


  • Registered Users, Registered Users 2 Posts: 2,621 ✭✭✭GreenHell


    Calculating the area of a polygon by breaking it into little triangles then adding the area of all the triangles. When the polygon is convex lines intersect creating a larger triangle by going out side the perimeter of the polygon.


  • Closed Accounts Posts: 1,325 ✭✭✭b3t4


    At a wild guess are you studing in UL??

    Anyways thats beside the point. What ya need to do is to search in google on how to find the area of a polygon. I found a really easy algorithm last year when I was doing an assignment on finding the area of a polygon. I implemented it recursively to keep the lecturer happy(twos also alot easier done this way). I also went with the algorithm to him and had him approve it before I used it.

    AFAIR http://astronomy.swin.edu.au/~pbourke/geometry/polyarea/ was the algorithm I used. Worked fine on every type of polygon coordinates that were thrown at it. Can't find the original page that I used though.

    I stayed away from the whole putting the triagles together. I hope the above helps in some way. (it probably doesn't :-)

    Rgds,
    A.


  • Registered Users, Registered Users 2 Posts: 410 ✭✭Drazhar


    AHHH HA AHA HAHAHA

    Paddy Healy strikes again!!!! (if you dont get it, dont ask)

    Im in fourth year Comp Sys, i couldnt do it then, and i still cant do it. I got the thing to work with all kinds of regular polygons, but when they started going irregular, forget it


  • Registered Users, Registered Users 2 Posts: 2,621 ✭✭✭GreenHell


    And the bitter ul students appear! Have 75% of it workin, right formula but I'm getting screwed one polygon, returning points to big to be represented... grr


  • Advertisement
  • Closed Accounts Posts: 9,314 ✭✭✭Talliesin


    Please think about the titles you give to threads, this thread has nothing to do with C++. The algorithm would be the same if you were using Visual Basic, javascript, machine code or moving beads around an abacus.

    Mathematical algorithm for solving a matematical problem... sounds like mathematics to me.


  • Registered Users, Registered Users 2 Posts: 19,608 ✭✭✭✭sceptre


    Originally posted by Drazhar
    Paddy Healy strikes again!!!! (if you dont get it, dont ask)
    They don't call Paddy "Paddy Viagra" for nothing
    (makes everything hard you see)

    My solution doesn't work. it probably won't even compile tomorrow. And I probably got a negative mark on the midterm.
    (that was the "it could be worse" part of the post)


  • Closed Accounts Posts: 1,325 ✭✭✭b3t4


    Ahh paddy healy and negative marking. lol

    I'm in third year and he gave us a "warm-up" midterm and the average for the entire class was -5. Beat that one. :-)

    A.


  • Registered Users, Registered Users 2 Posts: 255 ✭✭hertz


    Yeah, I know all about P. Healys modules, his notes are hard to read, but he is a sound lecturer.
    I'm getting screwed one polygon, returning points to big to be represented... grr

    You need to use a recursive function which takes induction statement in. Using triangles thing makes it more complicated.

    Don't copy cos healy uses a program to trace copying, Moss I think. He will pull you up on it if yours is 80% similar to someone elses.

    hertz


  • Moderators, Recreation & Hobbies Moderators, Science, Health & Environment Moderators, Technology & Internet Moderators Posts: 93,581 Mod ✭✭✭✭Capt'n Midnight


    "I wis to make a complaint, it's about this parrot I bought from you yesterday."
    "Ah the Norweign Blue, great bird them - very mathematical"
    "but it's dead"
    "yes sir, very mathematical as I told you - polygon.!"


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 19,608 ✭✭✭✭sceptre


    Originally posted by hertz
    Yeah, I know all about P. Healys modules... but he is a sound lecturer.

    Apparently so.

    I'll be finding out on Monday - my solution (which incidentally worked) was 5 minutes late because the server was 10 minutes fast:( In the real world I submitted it at 16:54. In the magical pixie different timezone world of CSIS, it was 17:03.

    (some idiot (er, that'd be me) left his emacs window open and didn't put a handy ampersand at the end when opening it. Couldn't figure out why the thing seemed to be hanging:rolleyes: )

    Either way, the consensus I've had from people over the past few months is that Paddy is a good egg.


Advertisement