diff --git a/puppets.asy b/puppets.asy index e7c574b..4b9488f 100644 --- a/puppets.asy +++ b/puppets.asy @@ -1,28 +1,84 @@ import "scaling.asy" as scaling; -//real x = width/3; -//real y = 2*height/6; +transform mirror = reflect((0,0),(0,1)); -//path bread = (x,0){right}..{up}(width, height-y){up}..{left}(width-x, height){left}..{down}(0,y){down}..{right}cycle; +pair cross_wsw = (-width*0.5, height*0.35); +pair cross_ssw = (-width*0.45, height*0.3); +pair cross_ene = (width*0.4, height*0.45); +pair cross_nne = (width*0.35, height*0.5); -real outer_radius = height/2; -real inner_radius = outer_radius*4/5; -real center_radius = outer_radius/5; -real axle_radius = center_radius/2; +pair cxl = intersectionpoint(cross_wsw--cross_nne, mirror*(cross_ssw--cross_ene)); +pair cxb = intersectionpoint(cross_ssw--cross_ene, mirror*(cross_ssw--cross_ene)); +pair cxt = intersectionpoint(cross_wsw--cross_nne, mirror*(cross_wsw--cross_nne)); -int gaps = 6; -real spoke_width = center_radius*0.7; +real thread_width = width*0.01; +real leg_thread_length = height*0.8; +real arm_thread_length = height*0.35; -path spoke_part = (spoke_width/2, 0)--(spoke_width/2, outer_radius); +real torso_radius = width*0.08; +real torso_top = -height*0.05; +real torso_bottom = -height*0.25; +path torso = arc((0, torso_top), torso_radius, 0, 180)--arc((0, torso_bottom), torso_radius, 180, 360)--cycle; -path gap = buildcycle(circle((0,0), center_radius), spoke_part, reverse(circle((0,0), inner_radius)), reflect((0,0), dir(90-180/gaps))*spoke_part); +real head_radius = width*0.12; +real head_height = height*0.12; +path head = circle((0, head_height), head_radius); -//draw((-width/2,-height/2)--(width/2,-height/2)--(width/2,height/2)--(-width/2,height/2)--cycle); +real limb_radius = width*0.06; +real arm_angle = 80; +real arm_length = width*0.12; +real leg_angle = 15; +real leg_length = width*0.16; -path wheel[] = { circle((0,0), outer_radius), circle((0,0), axle_radius) }; +pair thigh_start = (-width*0.2, -height*0.4); +real thigh_angle = 50; +real thigh_length = width*0.13; +pair thigh_end = thigh_start + thigh_length*dir(thigh_angle); +path thigh = arc(thigh_start, limb_radius, thigh_angle+90, thigh_angle+270)--arc(thigh_end, limb_radius, thigh_angle-90, thigh_angle+90)--cycle; -for (int i = 0; i < gaps; ++i) { - wheel = wheel^^(rotate(360*i/gaps)*gap); -} +pair shoulder_start = (width*0.15, height*-0.02); +real shoulder_angle = 20; +real shoulder_length = width*0.08; +pair shoulder_end = shoulder_start + shoulder_length*dir(shoulder_angle); +path shoulder = arc(shoulder_start, limb_radius, shoulder_angle+90, shoulder_angle+270)--arc(shoulder_end, limb_radius, shoulder_angle-90, shoulder_angle+90)--cycle; -//fill(wheel, evenodd+red); +pair arm_end = (cross_nne+(0,-arm_thread_length)); +pair arm_start = arm_end+(arm_length*dir(arm_angle+180)); +path arm = arc(arm_end, limb_radius, arm_angle-90, arm_angle+90)--arc(arm_start, limb_radius, arm_angle+90, arm_angle+270)--cycle; + +pair leg_end = (cross_ssw+(0,-leg_thread_length)); +pair leg_start = leg_end+(leg_length*dir(leg_angle)); + +pair leg_thread_outer = intersectionpoint(cross_ssw--cross_wsw, (cross_ssw+(-thread_width/2,-10))--(cross_ssw+(-thread_width/2,10))); +pair leg_thread_inner = intersectionpoint(cross_ssw--cross_ene, (cross_ssw+(thread_width/2,-10))--(cross_ssw+(thread_width/2,10))); + +pair leg_thread_leg_outer_connect = intersectionpoint(circle(leg_end, limb_radius), (leg_end+(-thread_width/2,0))--(cross_ssw+(-thread_width/2,0))); +pair leg_thread_leg_inner_connect = intersectionpoint(circle(leg_end, limb_radius), (leg_end+(thread_width/2,0))--(cross_ssw+(thread_width/2,0))); + +pair arm_thread_outer = intersectionpoint(cross_ssw--cross_ene, (cross_nne+(thread_width/2, -50))--(cross_nne+(thread_width/2,0))); +pair arm_thread_inner = intersectionpoint(cross_ssw--cross_ene, (cross_nne+(-thread_width/2, -50))--(cross_nne+(-thread_width/2,0))); + +pair arm_thread_outer_upper_crossover = intersectionpoint(mirror*(cross_wsw--cross_nne), (cross_nne+(thread_width/2, -100))--(cross_nne+(thread_width/2,0))); +pair arm_thread_inner_upper_crossover = intersectionpoint(mirror*(cross_wsw--cross_nne), (cross_nne+(-thread_width/2, -100))--(cross_nne+(-thread_width/2,0))); + +pair arm_thread_outer_lower_crossover = intersectionpoint(mirror*(cross_ssw--cross_ene), (cross_nne+(thread_width/2, -100))--(cross_nne+(thread_width/2,0))); +pair arm_thread_inner_lower_crossover = intersectionpoint(mirror*(cross_ssw--cross_ene), (cross_nne+(-thread_width/2, -100))--(cross_nne+(-thread_width/2,0))); + +pair arm_thread_arm_outer_connect = intersectionpoint(circle(arm_end, limb_radius), (arm_end+(thread_width/2,0))--(cross_nne+(thread_width/2,0))); +pair arm_thread_arm_inner_connect = intersectionpoint(circle(arm_end, limb_radius), (arm_end+(-thread_width/2,0))--(cross_nne+(-thread_width/2,0))); + +path half = mirror*(cross_nne--cross_ene)--mirror*(arm_thread_outer--arm_thread_outer_upper_crossover)--cross_wsw--leg_thread_outer--leg_thread_leg_outer_connect--arc(leg_end, limb_radius, leg_angle+90, leg_angle+270)--arc(leg_start, limb_radius, leg_angle-90, leg_angle+90)--leg_thread_leg_inner_connect--leg_thread_inner--mirror*(arm_thread_outer_lower_crossover--arc(arm_end, arm_thread_arm_outer_connect, arm_end+(limb_radius*dir(arm_angle-90)), CW)--arc(arm_start, limb_radius, arm_angle+270, arm_angle+90, CW)--arc(arm_end, arm_end+(limb_radius*dir(arm_angle+90)), arm_thread_arm_inner_connect, CW)--arm_thread_inner_lower_crossover); + +path crossover_cutout = (mirror*cxl)--arm_thread_inner--arm_thread_inner_upper_crossover--cycle; + +path puppet[] = { + half--cxb--reverse(mirror*half)--cxt--cycle, + crossover_cutout, + mirror*crossover_cutout, + torso, + head, + thigh, + mirror*thigh, + shoulder, + mirror*shoulder, +}; diff --git a/suits.asy b/suits.asy index cb2f35a..ce90eb4 100644 --- a/suits.asy +++ b/suits.asy @@ -13,6 +13,7 @@ int CARDS = 5; path icons[][] = { {}, {}, {}, {}, {}, {} }; +icons[PUPPETS] = puppet; icons[BREAD] = bread; icons[CHAIRS] = chair; icons[BLADES] = blade;