%@ 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)
%>
<%
'' reset the timeout
' Server.ScriptTimeout = timeout
Response.End '-----------------------------------------------------------%>