make use of path stripped-concatenation operator for bread slashes

main
xenofem 2022-07-28 11:09:22 -04:00
parent f7584030bd
commit 8017c48181
1 changed files with 1 additions and 10 deletions

View File

@ -1,10 +1,5 @@
import "scaling.asy" as scaling; 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 a = height*7/12;
real b = a/2; real b = a/2;
real angle = 60; 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 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; 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[] bread = loaf^^slash^^(shift(slash_spacing*dir(angle))*slash)^^(shift(slash_spacing*dir(angle+180))*slash); path[] bread = loaf^^slash^^(shift(slash_spacing*dir(angle))*slash)^^(shift(slash_spacing*dir(angle+180))*slash);
//draw(bread, evenodd+red);