View Single Post
  #2  
Old May 19th, 2008, 10:56 PM
CaptainBlack's Avatar
CaptainBlack CaptainBlack is offline
Grand Panjandrum
 
Join Date: Nov 2005
Location: South of England
Posts: 11,379
Country:
Thanks: 667
Thanked 3,619 Times in 2,916 Posts
CaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond repute
Default

Quote:
Originally Posted by potticus View Post
Other people have given solutions for a circle and a parabola, but they mainly involve finding a quadratic in x^2, suitable as they want 2 solutions.

In this case, I need a single solution to a circle/cubic problem. I know there's only one solution because the radius of the circle has been set to the smallest distance between the line and the centre point.

I tried substituting the cubic equation into the equation for the circle, then after a lot of bracket expanding (which I've checked over and over), I still don't get any intersection points.

I end up with a 6th order equation (which I believe to be correct - just thinking logically, it seems there can be 6 intercepts between a cubic and a circle). However, finding the roots of this equation (using the roots function in matlab) doesn't work :s

This is where i'm at so far:

With (x-xp)^2 + (y-yp)^2 = dc^2
And y = ax^3 + bx^2 + cx + d

After substitution, expansion and simplification:
0=(a^2)x^6 + (2ab)x^5 + (2ac + b^2)x^4 + (2ad + 2bc - 2ayp)x^3 + (2bd + c^2 - 2byp + 1)x^2 + (2cd - 2cyp -2xp)x + (d^2 + yp^2 - 2dyp + xp^2 - dc^2)

I can't see why this doesn't give me a suitable value for x intercept point. Can someone please help me out?

Thanks
This has six roots altogether, of which 0, 2, 4 or 6 may be real. But this gets you not much further than finding the roots of a general sixth order polynomial.

But there is no simple general solution for this. With numeric coefficients all the real roots can be found, but with symbolic coefficients (without some helpfull structure to them - which I don't see here but there may be) you are probably out of luck.

RonL
__________________
Truth does not change because it is, or is not, believed by a majority of the people.

Giordano Bruno
Reply With Quote