0
$\begingroup$

I got an assignment to write a program which draws the ampersand curve. The equation of ampersand curve looks like this: $(y^2-x^2)(x-1)(2x-3)=4(x^2+y^2-2x)^2$

I was given an advice to convert this equation into the polar form and so I did. With help of maple I got this little beastie(I wonder if there is a simpler form...): $$\frac{1}{4}\cdot \frac{11\cdot cos(\theta)+10\cdot cos(\theta)^3+\sqrt3\cdot \sqrt{-(21\cdot cos(\theta)^2-16)\cdot (2\cdot cos(\theta)^2-1)^2)}}{-cos(\theta)^2+2\cdot cos(\theta)^4+2}$$

But there is a problem. I get discontinuities in the curve(look at the loops). You can see the picture below. I guess something is wrong with the polar equation. Is there a way to get the polar form of ampersand curve without discontinuities?

enter image description here

$\endgroup$
1
$\begingroup$
restart:
xyexpr:=(y^2-x^2)*(x-1)*(2*x-3)=4*(x^2+y^2-2*x)^2:
plots:-implicitplot(xyexpr,x=-1..2,y=-2..2,
                    grid=[200,200],gridrefine=3);

#ee:=eval(xyexpr,[x=r*cos(t),y=r*sin(t)]):
#S:=[solve(simplify((rhs-lhs)(ee)),r)][2]:
#S:=subs(-252*cos(t)^6+444*cos(t)^4-255*cos(t)^2+48
#        =-(3*(21*cos(t)^2-16))*(2*cos(t)^2-1)^2,S);
S:=(1/4)*(10*cos(t)^3+11*cos(t)+(-3*(21*cos(t)^2-16)
   *(2*cos(t)^2-1)^2)^(1/2))/(2*cos(t)^4-cos(t)^2+2):
plot(S,t=0..2*Pi,gridlines=false,
     coords=polar,adaptive=true,numpoints=2000);
$\endgroup$
  • $\begingroup$ Fine codes, acer, as usual either here or at Mapleprime. :) $\endgroup$ – mrs Dec 9 '13 at 14:20
0
$\begingroup$

Substituting $x=r\cos\theta$ and $y=r\sin\theta$ and solving quadratically for $r$ yields

$$\small{r=\frac{\cos\theta(5\cos2\theta+16)\pm\sqrt{\cos^2\theta(5\cos2\theta+16)^2-8(16\cos^2\theta+3\cos2\theta)(\cos2\theta\cos^2\theta+2)}}{4(\cos2\theta\cos^2\theta+2)}} $$

$\endgroup$
  • 1
    $\begingroup$ But this wouldn't make that discontinuity solved. See the question again ;-) $\endgroup$ – mrs Dec 8 '13 at 8:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.