From 8017c481819d02f6119b74c2336e82f11d6d04aa Mon Sep 17 00:00:00 2001 From: xenofem Date: Thu, 28 Jul 2022 11:09:22 -0400 Subject: [PATCH] make use of path stripped-concatenation operator for bread slashes --- bread.asy | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/bread.asy b/bread.asy index be1de39..e166313 100644 --- a/bread.asy +++ b/bread.asy @@ -1,10 +1,5 @@ import "scaling.asy" as scaling; -//real x = width/3; -//real y = 2*height/6; - -//path bread = (x,0){right}..{up}(width, height-y){up}..{left}(width-x, height){left}..{down}(0,y){down}..{right}cycle; - real a = height*7/12; real b = a/2; real angle = 60; @@ -19,10 +14,6 @@ pair center = (0,0); path loaf = (center+a*dir(angle))..(center+b*dir(angle+90))..(center+a*dir(angle+180))..(center+b*dir(angle+270))..cycle; -path slash = (center+slash_b*dir(slash_angle+90))..(center+slash_a*dir(slash_angle+180))..(center+slash_b*dir(slash_angle+270))--(center+slash_b*dir(slash_angle+270))..(center+slash_a*dir(slash_angle))..(center+slash_b*dir(slash_angle+90))--cycle; - -//draw((-width/2,-height/2)--(width/2,-height/2)--(width/2,height/2)--(-width/2,height/2)--cycle); +path slash = (center+slash_b*dir(slash_angle+90))..(center+slash_a*dir(slash_angle+180))..(center+slash_b*dir(slash_angle+270))&(center+slash_b*dir(slash_angle+270))..(center+slash_a*dir(slash_angle))..(center+slash_b*dir(slash_angle+90))&cycle; path[] bread = loaf^^slash^^(shift(slash_spacing*dir(angle))*slash)^^(shift(slash_spacing*dir(angle+180))*slash); - -//draw(bread, evenodd+red);