Hi,

how we can define an ellipse with FF++ and plot it?

Regards

Hi,

how we can define an ellipse with FF++ and plot it?

Regards

```
int nn = 40;
real a = 1, b = 3;
border ellipse(t=0, 2.*pi){x=a*cos(t); y=b*sin(t); label=1;};
plot(ellipse(nn));
```

Thak tou so much.

Anothe question please. The following code plot many balls in the domaine [0,1]x[0,1].

How we can modify this function to obtain ellipse in place of the balls?

real eps=0.2;

real w1=3.0;

func real q1 (real t, real s, real w1) {

real t1 = t - rint(t);

real s1 = s - rint(s);

real delta1=1.0/sqrt(w1*pi);

if ( square(s1)+square(t1) <= square(delta1))

return w1;

else

return 0.0;

};

int N=200.;

mesh Th=square(N,N,[x,y]);

fespace Wh(Th,P2,periodic=[[2,y],[4,y],[1,x],[3,x]]);

Wh uplot;

uplot=q1(x/eps,y/eps,w1);

plot(uplot,fill=true,value=true,ps=“q1.eps”);

define

```
real a=1,b=3;
```

and replace the inequality with

`if ( a*square(s1)+b*square(t1) <= square(delta1))`

Thank you so much

Best regards