Thread: Area of a Polygon with Arcs

  1. #1
    Registered User
    Join Date
    Aug 2010
    Location
    England
    Posts
    90

    Area of a Polygon with Arcs

    Has anyone seen a C procedure for calculating the area of a polygon when one or more sides are arcs?
    Never re-write code unless the user benefits

  2. #2
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    I have not, but it's pretty easily done I believe: (I could be wrong)

    1) calculate the area below the arc
    2) calculate the arc'd area,

    and add 'em up.

    What have you tried? Are you close?

  3. #3
    Password:
    Join Date
    Dec 2009
    Location
    NC
    Posts
    587
    Arcs as in semi circles or arcs as in not an obvious percentage of a circle arcs? For the second, you'll need to do some integration.

  4. #4
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    And for integral calculus help, just ask for User Name!

  5. #5
    Password:
    Join Date
    Dec 2009
    Location
    NC
    Posts
    587
    I can help with the math portion, but coding it...

  6. #6
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    I'm not a genius! Why should I have to suffer?

  7. #7
    Registered User
    Join Date
    Aug 2010
    Location
    England
    Posts
    90
    I don't think I explained my question fully.

    I have no problem with the maths for any specific polygon, and there are plenty of general C functions available for polygons with lines only, but I need a variant that allows at least one side to be an arc.

    Usage will be for automatically pricing any custom designed polygon where the price is calculated using the polygon area, rather than the blank from which it will be cut.

    I have seen this published some time ago, but at the time I only needed to deal with straight line convex polygons, now I need a more complex solution I can't find it again.
    Never re-write code unless the user benefits

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Point in polygon test - spherical coords
    By bhdz in forum C Programming
    Replies: 1
    Last Post: 11-07-2007, 01:25 PM
  2. polygon area
    By totalfreeloader in forum C++ Programming
    Replies: 4
    Last Post: 11-25-2003, 09:38 AM
  3. Polygon Area and Centroid :(
    By Moni in forum C++ Programming
    Replies: 7
    Last Post: 06-01-2003, 12:39 PM
  4. IDEA: Polygon unions and intersections
    By Magos in forum Contests Board
    Replies: 3
    Last Post: 05-21-2003, 07:16 PM
  5. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 09:44 AM