Code or formula for the intersection of two parabolas in any rotation

I am working on a geometry problem that requires finding the intersection of two parabolic arcs at any rotation. I was able to index the line and the parabolic arc by rotating the plane to align the arc with the axis, but the two parabolas cannot be aligned with the axis. I am working on getting formulas, but I would like to know if there is a resource already available for this.

+5
source share
3 answers

First, I defined the equation for a parabolic arc in 2D without rotations:

  x(t) = ax² + bx + c
  y(t) = t;

Now you can apply the rotation by constructing the rotation matrix:

  s = sin(angle)
  c = cos(angle)

  matrix = | c -s |
           | s  c |

Apply this matrix and you will get a rotating parametric equation:

x' (t) = x(t) * c - s*t;
y' (t) = x(t) * s + c*t;

( x y) .

. :

  xa'(t) = rotated equation of arc1 in x
  ya'(t) = rotated equation of arc1 in y.
  xb'(t) = rotated equation of arc2 in x
  yb'(t) = rotated equation of arc2 in y.
  t1 = parametric value of arc1
  t2 = parametric value of arc2

  0 = xa'(t1) - xb'(t2)
  0 = ya'(t1) - yb'(t2)

2. .

, (, ).

. , x y, .

: , x y.

+6

, . , y = x ^ 2, (ax + by) ^ 2 + cx + dy + e == 0. , . y = x ^ 2, , : (ax + bx ^ 2) ^ 2 + cx + dx ^ 2 + e == 0. ( : , ).

+1

, CAS.

. Mathematica.

, y (x) = a x ^ 2 ( ).

:

A x^2 + B x y + CC y^2 + DD x + EE y + F == 0 

where B^2-4 A C ==0 (so it a parabola)  

:

p = {a -> 1, A -> 1, B -> 2, CC -> 1, DD -> 1, EE -> -1, F -> 1};
p1 = {ToRules@N@Reduce[
       (A x^2 + B x y + CC y^2 + DD x + EE y +F /. {y -> a x^2 } /. p) == 0, x]}

{{x → -2.11769}, {x → -0.641445}, {x → 0.379567 - 0.76948 I}, {x → 0.379567+ 0.76948 I}}

Let me build it:

Show[{
  Plot[a x^2 /. p, {x, -10, 10}, PlotRange -> {{-10, 10}, {-5, 5}}], 
  ContourPlot[(A x^2 + B x y + CC y^2 + DD x + EE y + F /. p) == 
    0, {x, -10, 10}, {y, -10, 10}],
  Graphics[{
    PointSize[Large], Pink, Point[{x, x^2} /. p /. p1[[1]]],
    PointSize[Large], Pink, Point[{x, x^2} /. p /. p1[[2]]]
    }]}]

enter image description here

A general solution involves calculating the roots:

4 A F + 4 A DD x + (4 A^2 + 4 a A EE) x^2 + 4 a A B x^3 + a^2 B^2 x^4 == 0  

What is done easily in any CAS.

+1
source

All Articles