diff options
author | Karl Berry <karl@freefriends.org> | 2011-05-28 16:52:13 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-05-28 16:52:13 +0000 |
commit | dc8edc4b8f4c2f75e5785045925cd7cd6e7df871 (patch) | |
tree | 76149c373d7e59beeea52aef0793bf9189cb7b9b /Master/texmf/asymptote/three_surface.asy | |
parent | c96567a73dfa159f9672fa2819ce0b3cd198d764 (diff) |
asymptote 2.10
git-svn-id: svn://tug.org/texlive/trunk@22643 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf/asymptote/three_surface.asy')
-rw-r--r-- | Master/texmf/asymptote/three_surface.asy | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/Master/texmf/asymptote/three_surface.asy b/Master/texmf/asymptote/three_surface.asy index 8e48b0606a3..88e42cf6640 100644 --- a/Master/texmf/asymptote/three_surface.asy +++ b/Master/texmf/asymptote/three_surface.asy @@ -1435,7 +1435,8 @@ void label(frame f, Label L, triple position, align align=NoAlign, bool lighton=light.on(); for(patch S : surface(L,position,bbox=P.bboxonly).s) { draw3D(f,S,position,L.p,light,interaction); - if(render.labelfill && !lighton) // Fill subdivision cracks + // Fill subdivision cracks + if(render.labelfill && opacity(L.p) == 1 && !lighton) _draw(f,S.external(),position,L.p,interaction.type); } } else { @@ -1485,7 +1486,8 @@ void label(picture pic=currentpicture, Label L, triple position, if(is3D()) { for(patch S : surface(L,v,bbox=P.bboxonly).s) { draw3D(f,S,v,L.p,light,interaction); - if(render.labelfill && !lighton) // Fill subdivision cracks + // Fill subdivision cracks + if(render.labelfill && opacity(L.p) == 1 && !lighton) _draw(f,S.external(),v,L.p,interaction.type); } } @@ -1819,6 +1821,26 @@ void dot(picture pic=currentpicture, Label L, triple v, align align=NoAlign, label(pic,L,v,render); } +void pixel(picture pic=currentpicture, triple v, pen p=currentpen, + real width=1) +{ + real h=0.5*width; + pic.add(new void(frame f, transform3 t, picture pic, projection P) { + triple V=t*v; + if(is3D()) + drawpixel(f,V,p,width); + if(pic != null) { + triple R=h*unit(cross(unit(P.vector()),P.up)); + pair z=project(V,P.t); + real h=0.5*abs(project(V+R,P.t)-project(V-R,P.t)); + pair r=h*(1,1)/mm; + fill(pic,box(z-r,z+r),p,false); + } + },true); + triple R=h*(1,1,1); + pic.addBox(v,v,-R,R); +} + pair minbound(triple[] A, projection P) { pair b=project(A[0],P); |