Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6662175
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:21:43+00:00 2026-05-26T02:21:43+00:00

With both my 2D physics system (box2D) and OpenGL, conplex polygons need to be

  • 0

With both my 2D physics system (box2D) and OpenGL, conplex polygons need to be decomposed into convex polygons. Ensuring models conform to this is easy. However, I would also like to edit the polygons as the simulation progresses, so I need a dynamic way of fracturing existing polygons into more polygons that are still convex.

I hope this drawing helps describe what I’m after:

image aid

My Question is, Is there an existing library that can accomplish this? And if not, what would be the least error prone way of doing it myself?

(I was looking through Boost, which has both a Geometry and a Polygon module, but the documentation is proving a little too esoteric for me to know if either can do what I want.)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T02:21:44+00:00Added an answer on May 26, 2026 at 2:21 am

    I think this is what you’re looking for.

    As for finding the intersection, that’s just a little algebra; for any two line segments it’s easy to derive the corresponding lines (‘rise over run’, etc.),

    y = a1*x + b1

    y = a2*x + b2

    then the point of intersection (x’, y’) is

    x’ = (b2 – b1) / (a1 – a2)

    y’ = a1*x’ + b1

    Now of course that’s the point of intersection of the lines, to determine that the line segments actually intersect you’ll need to do simple range checking with the x, y coordinates.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Both System.Timers.Timer and System.Threading.Timer fire at intervals that are considerable different from the requested
In the box2d physics loop of my game (the step), I must call the
What I mean is this: To know powers, I need to know multiplication, and
I have both problems and solutions to over twenty years of physics PhD qualifying
I am using the Physics Editor for creating the Polygon in Box2d. It generates
I've been testing performance of the Nape physics engine vs the Box2D AS3 and
Both employ the same concept: define some rows and columns and add content into
Both article are proving this. http://www.kyleschaeffer.com/best-practices/css-font-size-em-vs-px-vs-pt-vs/ http://www.maxdesign.com.au/presentation/relative/ I want to know SO users view?
Both the jQuery and Prototpye JavaScript libraries refuse to allow me to use a
Both are mathematical values, however the float does have more precision. Is that the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.