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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T14:41:07+00:00 2026-05-20T14:41:07+00:00

I am writing a converter for 2D geometry data. One of the elements I

  • 0

I am writing a converter for 2D geometry data. One of the elements I have to convert is an arc. In the source system the arc is described with two axis aligned rectangles. The first rectangle is a boundingbox for the circle of which the arc is part of. The second rectangle is a boundingbox for the arc itself. The constraint is, that the arc’s boundingbox must intersect two edges of the circle’s boundingbox. I know the coordinates of the top left and bottom right points of each rectangle.

The target system describes an arc as follows: A rectangle is a bounding box around the circle of which the arc is part of. So far it is the same as above. Then I have two points designating the start and end points of the arc. Both points must be exactly on the circle’s “edge”.

The question is: do you see an easy way to calculate the start and end-point of the arc? I have already seen this question but it seems really complicated. Perhaps there is an easier way to do this…

My thoughts so far:

It seems I must calculate the intersections of the edges of the arc’s boundingbox with the circle. Two cases are possible (due to the restrictions mentioned above): only one edge intersects with the circle or two edges intersect with the circle. Additionally all other edges will always be outside of the circle.

Update: the start and end points cut the circle in two parts. Which of the two parts is draw as the arc, is determined by the order of the start and end points. The arc is always drawn counter clockwise from start to end point.

  • 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-20T14:41:08+00:00Added an answer on May 20, 2026 at 2:41 pm

    Call the outer box coordinates top, left, bottom and right. The centre and radius are then:

    centre.x = (left + right)/2
    centre.y = (top + bottom)/2
    radius = (right - left)/2
    

    From this we can write an equation that must be satisfied for all points on the circle perimeter:

    (x - centre.x) * (x - centre.x) + (y - centre.y) * (y - centre.y) = radius * radius
    

    The inner box coordinates give you possible values of x and y. Substitute one in at a time and solve as a standard quadratic equation. If there is a real solution and the corresponding point is within the span of the inner box, that’s a point. Given the constraints of the original data, you should find there are two points — those are your answer.

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

Sidebar

Related Questions

I've been writing a time converter to take the systems time_t and convert it
I'm writing a blog archive converter in ruby. In order to convert wordpress post
I'm writing a Binary file converter in which I need to convert 1-6 byte
I've been writing a source-to-display converter for a small project. Basically, it takes an
I'm writing a number converter. How can I convert a integer to a binary
I'm writing a converter between some dialects of the same programming language. I've found
I'm writing a unit test for a custom subclass of org.springframework.http.converter.xml.AbstractXmlHttpMessageConverter<T> and I need
I'm writing a C# program to convert a FoxPro database to XML, and everything
I am writing a program that convert TM-2 degree to lat/lon on Android, but
I'm writing a function to convert MS Word-styled text into Adobe InDesign-formatted text (it

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.