|
"Peter Schreiber" <schreiber.peter15@gmail.com> wrote in message <gpq19u$c4d$1@fred.mathworks.com>...
> Hi guys,
> Does somebody know if there exists an analytical solution for a line - conic intersection, e.g.
> z1=z2, with
>
> z1=c.*r.^2./(1+sqrt(1-(1+k).*c.^2.*r.^2))
> z2=a.*r+b?
>
> Any hints would be highly appreciated.
>
> Best Regards,
> Peter
>
>
> %code showing the line and conic
> clear all
> clc
> close all
> c=-1/100;
> k=-1;
> a=1;
> b=2;
> r=linspace(-10,10,50);
>
> z1=c.*r.^2./(1+sqrt(1-(1+k).*c.^2.*r.^2))
> z2=a.*r+b
> plot(z1,r)
> hold on
> plot(z2,r)
> axis equal
Certainly! The first equation can be reduced to a quadratic expression in z and r. Using the second equation to substitute a*r+b for z yields a quadratic equation in the single variable r, which has an analytic solution. However, I am going to leave all that algebraic manipulation for you to do, Peter, since I am feeling lazy at the moment.
Roger Stafford
|