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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T12:43:45+00:00 2026-06-07T12:43:45+00:00

Is there an easy way to approximate the points (if any) where two instances

  • 0

Is there an easy way to approximate the points (if any) where two instances of QuadCurve2D intersect?

That is, how could I compute the coordinates of the red dots in this diagram? There is no obvious method in QuadCurve2D to do this.

Two quadratic Bézier curves (blue), approximate intersection points (red)

(note: the points are not exact as I have tweaked them manually for the diagram. Also note the “missing” fourth point which does not lie on the curve segment even though it lies on the (infinite) parabola.)

These two curve segments were created with the following code:

QuadCurve2D curve1 = new QuadCurve2D.Double(-2.00, -2.00, +0.75, +4.75, +2.00, -0.75);
QuadCurve2D curve2 = new QuadCurve2D.Double(-2.50, -0.75, +5.50, -0.50, +0.50, +1.25);

Note 2: I would also like to be able to intersect a straight line & a quadratic curve, but I assume this can be handled by setting one of the control points to be colinear with the endpoints.

  • 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-06-07T12:43:47+00:00Added an answer on June 7, 2026 at 12:43 pm

    Depends on whether you’re interested in approximate or in exact solutions (up to double precision). For approximate ones, you could simply parametrize the curves as some function f(t) and then do some interval nesting to find values for t which minimize the distance between the curves.

    For exact solutions, you’d have to find the four points where two conic sections intersect. There is a short paragraph about this on wikipedia. The book Perspectives on Projective Geometry has a longer section explaining the details. There certainly are implementations available for various languages; the one for Asymptote comes to my mind just now. The implementation for its general case looks quite frightening, though, so it might be they are doing something overly complicated there.

    Once you have all four points of intersection, you’d still have to decide which of them are on the part of the conic section delimited by the endpoints of your QuadCurve, but that should be simple in comparison. So in total, you’d have these three steps:

    1. Compute matrix of conic sections section from endpoints and control points
    2. Intersect conic sections using degenerat elements in their pencil
    3. Decide whether these intersections lie between the endpoints

    If you have a problem with the mathematical details of one of these steps, it might be better to ask on the mathematics stack exchange. Not only have people there more experience with solving mathematical problems, the MathJax features for typesetting math will make the answers far more readable than an answer here could hope to be.

    As to your note 2 about the straight line: that is easier by far, because if you express that problem in terms of coordinates, you’d only end up with a quadratic equation, instead of an equation of degree 4 for the naive approach to the general problem, and still degree 3 if you solve it as described by the above references. One can write the general aproach in such a way that intersecting a conic with a line is a step in the solution, so having a method for this might work well enough.

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

Sidebar

Related Questions

Is there an easy way to calculate the derivative of non-liner functions that are
Is there any easy way to use grep functionality in NSIS scripts? I have
Is there an easy way to query a cluster for all vertices that have
Is there an easy way, or free library, that will allow you to append
Is there easy way to create FILE* from WinApi HANDLE which points to one
Is there any easy way to set a text field's hint to italic, while
Is there any easy way to exchange the position of 2 elements - or
Is there an easy way to log PHP errors to a log for a
Is there an easy way to generate docs for REST api direct from a
Is there an easy way of getting the datetime of the last change to

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.