#Muscle codes

Every muscle in the system has a short uppercase code. The catalogue mirrors Gravn's backend constants exactly - same codes, same names, same support tiers - and a test enforces that, so the two cannot drift apart unnoticed.

#Two tiers, two behaviours

Supported codes have their own geometry. They are filled directly.

Extended codes do not. Each one is aliased onto the drawn region that covers it, so passing PEC lights the chest and passing LAT lights the upper back. Callers never need to know which is which - that is the point of the indirection.

resolveToDrawnRegion("PEC"); // "CHE"
resolveToDrawnRegion("CHE"); // "CHE" - drawn codes resolve to themselves

Aliases resolve in exactly one hop. An alias never points at another alias, and a test enforces that too.

#How collisions merge

When several codes land on the same region, the highest level wins:

resolveIntensities({ UPB: 4, LAT: 9, TER: 2 }, getBodyMap("male", "back"));
// → { regions: { UPB: { left: 9, right: 9 } }, unrenderedCodes: [] }

Not the last write, and not the average. If a session hit the upper back at 4 and the lats at 9, that region was worked hard, and 9 is the honest reading of it. Merge order does not affect the result.

#Why some muscles will never be drawn

Each code carries a resolution that says how it reaches the screen, and - critically - whether it is worth ever drawing.

ResolutionCountMeaning
drawn 23 Has its own geometry and is filled directly.
splittable 18 Has a real surface projection. Could be given its own path by subdividing the region it shares. This is the art backlog.
deep 5 Lies beneath other muscles with no surface projection. No body map can render these - permanently aliased.
side-view 3 Only properly visible from a lateral view, which this package does not have.

The deep classification is the one that saves real time. Those five muscles lie beneath other muscles and have no surface projection at all - no body map in existence renders them, because there is nothing to render. They stay aliased permanently. Do not put them on an art backlog.

The splittable codes are the genuine backlog: real, surface-visible muscles currently folded into a larger region. See Artwork for the priority order.

#Visibility

A muscle only exists on the views where the artwork draws it. Quads are front-only; glutes are back-only. Ask the geometry rather than guessing:

getVisibleViews("QUA", "male"); // ["front"]
getVisibleViews("GLU", "male"); // ["back"]
getVisibleViews("DEL", "male"); // ["front", "back"]
getVisibleViews("HEA", "female"); // ["front"]  ← note

That last one is not a bug. The female back artwork genuinely omits the head and ankles, which is what the backend's "Both (Front only for female)" annotation describes. Because getVisibleViews derives its answer from the geometry rather than a hard-coded table, improving the artwork updates it automatically.

Codes that had an intensity but nowhere to render are reported, never silently dropped:

const { unrenderedCodes } = resolveIntensities(
  { QUA: 8 },
  getBodyMap("male", "back"),
);
// unrenderedCodes === ["QUA"]

Log that in development. A value vanishing without trace is how a body map quietly starts lying.

#Coverage by diagram

Which drawn regions appear on each of the four bodies:

CodeMuscleM frontM backF frontF back
ABSAbdominals··
ADDAdductors
ANKAnkles·
BICBiceps··
CALCalves
CHEChest··
DELDeltoids
FEEFeet
FRMForearm
GLUGluteal··
HAIHair
HAMHamstrings··
HANHands
HEAHead·
KNEKnees··
LWBLower Back··
NECNeck
OBLObliques··
QUAQuadriceps··
TIBTibialis··
TRPTrapezius
TRITriceps
UPBUpper Back··
Regions per diagram19161914

#The full catalogue

CodeMuscleStatusResolutionRenders asNote
ABD Abductors (Glute Med/Min) extended splittable GLU Glute medius is surface-visible at the upper outer hip; would be carved off the top of the gluteal region.
ADDL Adductor Longus extended splittable ADD Part of the inner-thigh group the adductor region already covers.
ADDM Adductor Magnus extended splittable ADD Part of the inner-thigh group the adductor region already covers.
ANTDEL Anterior Deltoid extended splittable DEL The three-way deltoid split is the single highest-value subdivision - delt-specific programming is common and the heads are clearly distinguishable.
BRCH Brachialis extended splittable BIC Visible as the strip lateral to the biceps; needs the upper-arm region subdivided.
RAD Brachioradialis extended splittable FRM Superficial, but the forearm region is only a few dozen units wide - a split here buys very little on screen.
ERECT Erector Spinae extended splittable LWB The columns either side of the spine are surface-visible and extend above the drawn lower-back region.
GAST Gastrocnemius extended splittable CAL The two calf heads are clearly readable on the back view - a straightforward and worthwhile split.
HIPF Hip Flexors extended splittable QUA A functional group rather than one muscle; the visible part is the upper quad and hip crease.
ITB Iliotibial Band extended side-view QUA Runs down the lateral thigh; only properly visible from a side view.
INF Infraspinatus extended splittable UPB Surface-visible over the scapula; part of the upper-back subdivision.
LATDEL Lateral Deltoid extended side-view DEL Best seen laterally, but readable on both front and back views - it can be included in the three-way deltoid split without a side view.
LAT Latissimus Dorsi extended splittable UPB The upper-back region is one blob covering traps, rhomboids, teres and lats. Splitting the lats out is the highest-value back subdivision.
PEC Pectorals extended splittable CHE Anatomically the same region the chest path already covers; a split would separate clavicular from sternal heads.
PER Peroneals extended side-view CAL Runs down the lateral lower leg; only properly visible from a side view.
POSTDEL Posterior Deltoid extended splittable DEL Rear head, visible on the back view; part of the three-way deltoid split.
PRN Pronator Teres extended splittable FRM Superficial at the cubital fossa, but far too small to read at this diagram's scale.
PSO Psoas Major extended deep ABS Runs deep through the pelvis from the lumbar spine; no surface projection whatsoever.
RECT Rectus Abdominis extended splittable ABS The abs region already is the rectus abdominis; this alias is exact rather than approximate.
SERR Serratus Anterior extended splittable OBL Sits on the ribcage just above the obliques; a split would carve the upper portion of the oblique region.
SOL Soleus extended splittable CAL Visible either side of the gastrocnemius on the back view; pairs with the GAST split.
SUB Subscapularis extended deep DEL Sits on the anterior face of the scapula, entirely hidden behind the shoulder blade.
SUP Supinator extended deep FRM Lies beneath the forearm extensors with no surface projection.
SUPR Supraspinatus extended deep TRP Lies in the supraspinous fossa beneath the trapezius.
TER Teres Major/Minor extended splittable UPB Surface-visible at the rear armpit; would come out of the same upper-back subdivision as the lats.
TVA Transverse Abdominis extended deep ABS The deepest abdominal layer, entirely beneath the obliques and rectus abdominis.
ABS Abdominals supported drawn itself -
ADD Adductors supported drawn itself -
ANK Ankles supported drawn itself -
BIC Biceps supported drawn itself -
CAL Calves supported drawn itself -
CHE Chest supported drawn itself -
DEL Deltoids supported drawn itself -
FEE Feet supported drawn itself -
FRM Forearm supported drawn itself -
GLU Gluteal supported drawn itself -
HAI Hair supported drawn itself -
HAM Hamstrings supported drawn itself -
HAN Hands supported drawn itself -
HEA Head supported drawn itself -
KNE Knees supported drawn itself -
LWB Lower Back supported drawn itself -
NEC Neck supported drawn itself -
OBL Obliques supported drawn itself -
QUA Quadriceps supported drawn itself -
TIB Tibialis supported drawn itself -
TRP Trapezius supported drawn itself -
TRI Triceps supported drawn itself -
UPB Upper Back supported drawn itself -