wrights-deck/puppets.asy

85 lines
4.7 KiB
Plaintext
Raw Normal View History

import "scaling.asy" as scaling;
2022-07-27 08:09:44 -04:00
transform mirror = reflect((0,0),(0,1));
2022-07-27 08:09:44 -04:00
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);
2022-07-27 08:09:44 -04:00
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));
2022-07-27 08:09:44 -04:00
real thread_width = width*0.01;
real leg_thread_length = height*0.8;
real arm_thread_length = height*0.35;
2022-07-27 08:09:44 -04:00
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;
2022-07-27 08:09:44 -04:00
real head_radius = width*0.12;
real head_height = height*0.12;
path head = circle((0, head_height), head_radius);
2022-07-27 08:09:44 -04:00
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;
2022-07-27 08:09:44 -04:00
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;
2022-07-27 08:09:44 -04:00
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;
2022-07-27 08:09:44 -04:00
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,
};