# Fill a region between two coplanar paths in asymptote

I'd like to reproduce in 3D the same thing as can be seen in the manual (section 3.5, Paths)

``````size(0,100);
path unitcircle=E..N..W..S..cycle;
path g=scale(2)*unitcircle;
filldraw(unitcircle^^g,evenodd+yellow,black);
``````

I tried this

``````import three;
path3 p =  (0,-2,-2)-- (0,2,-2) -- (0,2,2) -- (0,-2,2) -- (0,-2,-2) -- cycle;
path3 q =  (0,-.25,-1.1) -- (0,.25,-1.1) -- (0,.25,1.1) -- (0,-.25,1.1) -- cycle;
filldraw(q^^p,evenodd+yellow,black);
``````

but I get a

`no matching function 'filldraw(path3[], pen)'` error

Any ideas?

There's a routine for generating a surface from a single cyclic path.

Here's the code:

``````settings.outformat="pdf";
settings.render=0;
import three;
size(5cm);
path3 p =  (0,-2,-2)-- (0,2,-2) -- (0,2,2) -- (0,-2,2) -- (0,-2,-2) -- (0,-2,-2);
path3 q =  (0,-.25,-1.1) -- (0,.25,-1.1) -- (0,.25,1.1) -- (0,-.25,1.1) -- (0,-.25,-1.1);
draw(surface(p -- reverse(q) -- cycle), emissive(yellow));
draw(p ^^ q, black);
``````
• An alternative is to use the `surface(path[])` routine, which will construct the surface in the xy-plane; then, use transformations to put the surface in the desired position. Aug 14, 2015 at 5:24