Victoria's Code STA / 01
MCAT — build log

Anatomy in 3D and 4D

The MCAT study app I am building for my son, for his personal use, has a 3D anatomy viewer. I call it 3D/4D because the fourth dimension is time: the parts move.

A warning: the text beside each model is an AI draft that has not been fact-checked yet. The shapes themselves are real.
The 3D brain model, with each lobe in its own color
The brain, with each lobe in its own color.
The 3D heart model, with arteries in red and veins in blue
The heart. Arteries in red, veins in blue.

What a page shows

He clicks a part, or picks it from the list, and the panel beside the model answers three questions: what it does, how the MCAT tests it, and what happens if it is damaged. There is a box for his own notes on that part, and a button that asks the AI tutor about it.

The whole brain page: the 3D model on the left, and on the right the chosen part, the precentral gyrus, with what it does, how the MCAT tests it and what happens if it is damaged. Below is the list of every part.
A whole page: the model on the left, and on the right what the chosen part does, how the MCAT tests it, and what happens if it is damaged.

Real shapes, made small

The shapes come from BodyParts3D, a model of the human body by the Database Center for Life Science in Japan. It is shared under the Creative Commons Attribution-Share Alike 2.1 Japan license, and my adapted files carry the same license. Credits are at the end of this post.

The full download is 136 MB, too much for a web page. A script picks the structures each model needs, merges them, and stores every coordinate as a 16-bit whole number. For whole-body models it also merges points that sit very close together. The twelve finished models total 25 MB.

A gland a few millimeters wide is lost inside a whole body, so tiny parts get a soft glow.

BodyParts3D has limits. It is a male body with nothing smaller than an organ. So there is no female reproductive system, thyroid or ear, and nothing microscopic.

Flow and life

Many MCAT questions are about a route: blood through the heart, or urine from kidney to bladder. Each model lists its routes, and drops of color travel along them, following the curve of each tube.

"Bring it to life" starts a shared clock. The diaphragm and ribs breathe, arteries swell with the pulse, the bladder fills and empties, and muscles thicken in opposing pairs. To make a muscle bulge, a small shader pushes every point of its surface outward. A shader is a short program that runs on the graphics card.

The heart seen from inside while it beats: blue drops of oxygen-poor blood and red drops of oxygen-rich blood moving through the chambers
Inside the heart while it beats. Blue drops are oxygen-poor blood, red drops are oxygen-rich.

Step by step

Each model also has pathways. A pathway plays by itself, one part at a time, with a spark traveling from each part to the next. "One trip of blood" through the heart has twelve steps. He can pause it, go back, or move on when he is ready, and each step says what is happening in plain words.

The whole heart page in its 4D tab, paused on step 2 of 12 of one trip of blood: the right atrium is lit on the model, and the panel explains that blood collects there
“One trip of blood”, paused on step 2 of 12. The right atrium lights up while the panel explains it.

A third tab, "What goes wrong", links the anatomy to illness. Pick a heart attack, and the model turns to the artery that is usually blocked, with what happens, why, and how the exam connects to it.

The heart page in its What goes wrong tab, with heart attack chosen: the model shows the left coronary artery, and the text explains what happens and why
The “What goes wrong” tab, with heart attack chosen. The model turns to the artery that is usually blocked.

Three lessons

Motion that ran but could not be seen. My first version worked, and nobody could see it. I measured how much of the picture changed between two frames: the muscles moved 0.13 percent. After I made parts thicken and light up, they reached 2.0 percent. Code that runs is not the same as an effect a person can see.

A crash on the first frame. The flow sometimes froze. The cause was the time value on the very first frame, which could be negative.

"The eye works only sometimes." I could not reproduce it. I fixed two likely causes, and one of the fixes could not be tested. I have written that down as untested rather than call it solved.

Credits

3D anatomy models: BodyParts3D, Copyright © 2008 Database Center for Life Science (ライフサイエンス統合データベースセンター), licensed under CC Attribution-Share Alike 2.1 Japan.
Changes I made: picked the structures for each model, merged and compressed them, and added colors, labels and motion. My adapted models, and the screenshots of them in this post, are shared under the same license.
Comments

Thoughts?

Comments are threads on GitHub, so a GitHub account is needed to post. No account? Email me instead — I read everything.