wrights-deck/bread.asy

29 lines
993 B
Plaintext

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;
real slash_a = a/11;
real slash_b = b*5/8;
real slash_angle = angle-15;
real slash_spacing = a*5/12;
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[] bread = loaf^^slash^^(shift(slash_spacing*dir(angle))*slash)^^(shift(slash_spacing*dir(angle+180))*slash);
//draw(bread, evenodd+red);