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 4624684
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T03:09:50+00:00 2026-05-22T03:09:50+00:00

I’m currently working on a problem where I need to properly order (using something

  • 0

I’m currently working on a problem where I need to properly order (using something like a right-hand rule) the nodes that make up a planar polygon in 3D space. My idea thus far is to construct a transformation matrix to convert the nodes to an x-y plane, then use a Graham scan. I need to ensure that the user enters only convex polygons, so if I find any “internal” nodes, I know the polygon is concave and can throw an error. In addition to checking for convexity, the sorting procedure of the Graham scan will order the nodes for me.

I am not terribly familiar with optimized geometry algorithms. Does this seem like a appropriate/efficient process? Or is there a better way to:

1) Order the nodes of the polygon by some rule (e.g. RH rule) and
2) Ensure that the planar polygon (which may not be in the x-y plane) is convex?

  • 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-22T03:09:51+00:00Added an answer on May 22, 2026 at 3:09 am

    Yes, that is a very good solution. Here’s how to implement it to ignore numerical inaccuracy.

    - take any 3 points; these determine the plane, rotate appropriately
    - check that abs(z)<THRESHOLD for all z-coordinates, now you can ignore them
    - perform Graham scan which is O(n log(n)) time
    - return order, else throw error if results.size < #points (non-convex)
    

    You might wish to choose 3 points sufficiently far apart, or a combination of many points (still has its issues), and make the THRESHOLD some fraction of the max distance between.

    With a few assumptions, this is provably as good as you can do asymptotically, because otherwise, you could use this to perform a comparison sort in less than O(n log(n)) time, which we know is impossible without extra knowledge (the problem mapping would be to place each element X of an unsorted array at position [X,X^2] in the plane plus a point at [0,max^2]).

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

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I've got a string that has curly quotes in it. I'd like to replace
I am currently running into a problem where an element is coming back from
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I need a function that will clean a strings' special characters. I do NOT
I have thousands of HTML files to process using Groovy/Java and I need to
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I would like to count the length of a string with PHP. The string

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.