<%@ Language=VBScript %><% option explicit %> <% Response.Buffer = FALSE %> <% Response.ContentType = "image/svg+xml" %> <% '--- muscle.asp --- DIM ScreenWidth, ScreenHeight DIM timeout, SID DIM scalefactor, scalefactor_x, scalefactor_y DIM msg '-- for errors DIM shift_x, shift_y 'shifting (transform(translate(.. '3 shapes: box, ball, and cylinder DIM foot_l, foot_w, foot_d 'box: length, width, depth DIM ankle_r 'ball: radius DIM ankle_pos 'ankle pos in % from toes to heel DIM lower_leg_l, lower_leg_r 'cylinder: length, radius DIM knee_r 'ball DIM upper_leg_l, upper_leg_r 'cylinder DIM hip_joint_r 'ball DIM hip_l, hip_w, hip_d 'box DIM waist_r 'ball DIM shoulder_l, shoulder_w, shoulder_d 'box DIM shoulder_joint_r 'ball DIM shoulder_joint_pos 'shoulder joint pos in % of shoulder length DIM upper_arm_l, upper_arm_r 'cylinder DIM elbow_r 'ball DIM lower_arm_l, lower_arm_r 'cylinder DIM wrist_r 'ball DIM hand_l, hand_w, hand_d 'box DIM neck_r 'ball DIM head_l, head_w, head_d 'box DIM eye_pos 'eye position in % from chin to top of head DIM eye_r 'ball 'up to 3 planes of joint rotations, right and left where appropriate DIM waist_f, waist_s, waist_a DIM hip_joint_f_r, hip_joint_s_r, hip_joint_a_r 'right rot: front, side, axis DIM hip_joint_f_l, hip_joint_s_l, hip_joint_a_l 'left rot: front, side, axis DIM knee_f_r, knee_a_r DIM knee_f_l, knee_a_l DIM ankle_f_r, ankle_s_r, ankle_a_r DIM ankle_f_l, ankle_s_l, ankle_a_l DIM shoulder_joint_f_r, shoulder_joint_s_r, shoulder_joint_a_r DIM shoulder_joint_f_l, shoulder_joint_s_l, shoulder_joint_a_l DIM elbow_f_r, elbow_a_r DIM elbow_f_l, elbow_a_l DIM wrist_f_r, wrist_s_r, wrist_a_r DIM wrist_f_l, wrist_s_l, wrist_a_l DIM neck_f, neck_s, neck_a DIM eye_f, eye_s '' extend the timeout to allow for long files ' timeout = Server.ScriptTimeout '' Response.Write "Initial timeout=" & timeout & "
" ' Server.ScriptTimeout = 1200 ' SID = Request.Cookies("Humble")("SID") ScreenWidth = Request.Cookies("Humble")("ScreenWidth") ScreenHeight = Request.Cookies("Humble")("ScreenHeight") 'scale scalefactor_x = ScreenWidth / 2600 scalefactor_y = ScreenHeight / 1600 scalefactor = scalefactor_y '-- g transform="scale(%=scalefactor%)" shift_x = -200 shift_y = 0 foot_l = 270 foot_w = 90 foot_d = 70 ankle_r = 20 ankle_pos = 0.7 lower_leg_l = 400 lower_leg_r = 60 knee_r = 45 upper_leg_l = 460 upper_leg_r = 75 hip_joint_r = 50 hip_l = 200 hip_w = 340 hip_d = 240 waist_r = 55 shoulder_l = 330 shoulder_w = 460 shoulder_d = 250 shoulder_joint_r = 40 shoulder_joint_pos = 0.85 upper_arm_l = 380 upper_arm_r = 55 elbow_r = 35 lower_arm_l = 260 lower_arm_r = 50 wrist_r = 20 hand_l = 200 hand_w = 120 hand_d = 50 neck_r = 50 head_l = 250 head_w = 150 head_d = 180 eye_r = 20 eye_pos = 0.65 waist_f = 0 waist_s = 0 waist_a = 0 hip_joint_f_r = -20 hip_joint_s_r = 0 hip_joint_a_r = 0 hip_joint_f_l = 20 hip_joint_s_l = 0 hip_joint_a_l = 0 knee_f_r = 0 knee_a_r = 0 knee_f_l = -35 knee_a_l = 0 ankle_f_r = 0 ankle_s_r = 0 ankle_a_r = 0 ankle_f_l = 0 ankle_s_l = 0 ankle_a_l = 0 shoulder_joint_f_r = 30 shoulder_joint_s_r = 0 shoulder_joint_a_r = 0 shoulder_joint_f_l = -45 shoulder_joint_s_l = 0 shoulder_joint_a_l = 0 elbow_f_r = 35 elbow_a_r = 0 elbow_f_l = 65 elbow_a_l = 0 wrist_f_r = 15 wrist_s_r = 0 wrist_a_r = 0 wrist_f_l = 0 wrist_s_l = 0 wrist_a_l = 0 neck_f = 0 neck_s = 0 neck_a = 0 eye_f = 0 eye_s = 0 ' set it up for a graph bounding box of 4000(mm) horizontal by 2000(mm) vertical ' the viewBox has to be larger? ' the graphing starts from the waist (centre of gravity) ' 5 layers ' first the back (right) arm ' 2nd the back (right) leg ' 3rd: hips, waist, shoulders, neck, head, eye, and line-of-sight ' 4th: down the front (left) leg (upper & lower, knee & ankle, foot) ' 5th: the front (left) arm (upper & lower, elbow & wrist, hand) %> Humble Graphic The body as stick figure with bones and joints <%'- units in mm -%> <% '-- the measurements are in the humble.mdb Access database ---%> <% '-translate all to hip-centre coordinates, then rotate, translate back ---%> <%'----------------------------------------------------------------------%> <%'------------------- intro: legend --------------------------------%> Stick figure <%'----------------------------------------------------------------------%> <%'----------------------------------------------------------------------%> <%'1st- right back-arm, first - need to rotate waist & get shoulder pos --%> <%'1.1--------- waist to get to the shoulder-joint ---------------%> <%'1.2-- rotate upper back-arm at the shoulder-joint, then draw upper-arm --%> <%'1.3---- rotate lower back-arm at the elbow, then draw the lower arm -----%> <%'1.4---------------- rotate hand at the wrist -------------------------%> <%'1.4r-- end rotation of hand at the wrist, then draw wrist --%> <%'1.3r-- end rotation of lower-back-arm at the elbow, then draw elbow --%> <%'1.2r-- end rotation of arm at the shoulder-joint, then draw shoulder-joint ----%> <%'1.1r---- end rotation of waist to get the shoulder-joint ----%> <%'----------------------------------------------------------------------%> <%'----------------------------------------------------------------------%> <%'----------------------------------------------------------------------%> <%'2nd----------------- right back leg - drawn second ----------------------------%> <%'2.1----- upper-leg: rotate upper leg at the hip-joint, then draw -------%> <%'2.2---- lower-leg rotate lower leg at the knee, then draw -------------%> <%'2.3---- foot, no separate toes: rotate foot at the ankle, then draw -----%> <%'2.3r-- end rotation of foot at the ankle, then ankle-joint as circle ----%> <%'2.2r-- end rotation of lower leg at the knee, then knee as circle -------%> <%'2.1r-- end rotation of right upper leg at the hip-joint, then hip-joint --%> <%'----------------------------------------------------------------------%> <%'----------------------------------------------------------------------%> <%'-----------------------------------------------------------------------%> <%'3.1 ----- hip ------%> <%'3.2 --- shoulder - need to rotate waist & get shoulder pos --%> <%'3.3 --- head - need to rotate neck --%> <%'3.4 --- viewpoint of eyes - need to rotate eye --%> line of sight: eyes <%'3.4r--- end rotation of eyes - as joint ---------%> <%'3.3r--- end rotation of neck - as joint ----------%> <%'3.2r---- end rotation of waist to get the shoulder, then waist - as joint ----%> <%'----------------------------------------------------------------------%> <%'----------------------------------------------------------------------%> <%'----------------- front (left) leg - drawn fourth -----------------------------%> <%'4.1----- upper-leg: rotate upper leg at the hip-joint, then draw -------%> <%'4.2---- lower-leg rotate lower leg at the knee, then draw -------------%> <%'4.3---- foot, no separate toes: rotate foot at the ankle, then draw -----%> <%'4.3r-- end rotation of foot at the ankle, then ankle-joint as circle ----%> <%'4.2r-- end rotation of lower leg at the knee, then knee as circle -------%> <%'4.1r-- end rotation of right upper leg at the hip-joint, then hip-joint --%> <%'----------------------------------------------------------------------%> <%'----------------------------------------------------------------------%> <%'----------------- front-arm - drawn fifth -----------------------------%> <%'-- left front-arm, fifth - need to rotate waist & get shoulder pos --%> <%'5.1--------- waist to get to the shoulder-joint ---------------%> <%'5.2-- rotate upper back-arm at the shoulder-joint, then draw upper-arm --%> <%'5.3---- rotate lower back-arm at the elbow, then draw the lower arm -----%> <%'5.4---------------- rotate hand at the wrist -------------------------%> <%'5.4r-- end rotation of hand at the wrist, then draw wrist --%> <%'5.3r-- end rotation of lower-back-arm at the elbow, then draw elbow --%> <%'5.2r-- end rotation of arm at the shoulder-joint, draw shoulder-joint --%> <%'5.1r---- end rotation of waist to get the shoulder-joint ----%> <%'----------------------------------------------------------------------%> <%'----------------------------------------------------------------------%> <%'-----------------------------------------------------------------------%> <%'-----------------------------------------------------------------------%> <%'------------- waist = centre of gravity as horizontal line ------------------------------%> <%'------------- stage as horizontal line ------------------------------%> Stage <%'-------------------- plumb line -------------------------------------%> <%'--- transform="scale(scalefactor)"> ---%> <%'-/g-%> <% '' reset the timeout ' Server.ScriptTimeout = timeout Response.End '-----------------------------------------------------------%>