2022-07-26 20:05:39 -04:00
|
|
|
import "scaling.asy" as scaling;
|
|
|
|
|
2022-07-27 06:00:47 -04:00
|
|
|
real leg_height = height*0.45;
|
|
|
|
real seat_thickness = height*0.2;
|
|
|
|
real back_height = height*0.6;
|
|
|
|
real back_top_offset = width*0.1;
|
|
|
|
real front_leg_top = -width*0.35;
|
|
|
|
real front_leg_bottom = -width*0.45;
|
|
|
|
real back_leg_top = width*0.4;
|
|
|
|
real back_leg_bottom = width*0.45;
|
|
|
|
real leg_thickness = width*0.2;
|
|
|
|
real back_thickness = width*0.2;
|
|
|
|
real cushion_thickness = height*0.06;
|
|
|
|
pair cushion_edge_smoothing = width*0.2*dir(55);
|
|
|
|
|
2022-07-27 06:44:18 -04:00
|
|
|
path[] chair = { scale(0.8)*((width/2, 0)--(width/2+back_top_offset,back_height)--(width/2+back_top_offset-back_thickness, back_height)--(width/2-back_thickness, 0)..(0,cushion_thickness)..(-width/2 + cushion_edge_smoothing.x, 0)..(-width/2, -cushion_edge_smoothing.y)---(-width/2,-seat_thickness)--(front_leg_top-leg_thickness/2, -seat_thickness)--(front_leg_bottom-leg_thickness/2,-seat_thickness-leg_height)--(front_leg_bottom+leg_thickness/2,-seat_thickness-leg_height)--(front_leg_top+leg_thickness/2, -seat_thickness)--(back_leg_top-leg_thickness/2, -seat_thickness)--(back_leg_bottom-leg_thickness/2,-seat_thickness-leg_height)--(back_leg_bottom+leg_thickness/2,-seat_thickness-leg_height)--(back_leg_top+leg_thickness/2, -seat_thickness)--(width/2,-seat_thickness)--cycle) };
|