summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/base/three_surface.asy
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/utils/asymptote/base/three_surface.asy')
-rw-r--r--Build/source/utils/asymptote/base/three_surface.asy26
1 files changed, 24 insertions, 2 deletions
diff --git a/Build/source/utils/asymptote/base/three_surface.asy b/Build/source/utils/asymptote/base/three_surface.asy
index 8e48b0606a3..88e42cf6640 100644
--- a/Build/source/utils/asymptote/base/three_surface.asy
+++ b/Build/source/utils/asymptote/base/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);