system
Given the following post, respond as if you're commenting on Reddit:
human
How do cells know their 3D position, in order to make the correct shaped organism?
gpt
There are multiple mechanisms at play at different times in different tissues, and I'll just list a few.

One common mechanism is a gradient of a secreted factor. In the developing spinal cord, for example, the cells at the ventral side (bottom) secrete a signaling molecule called sonic hedgehog (shh). Shh diffuses away from the cells that secrete it, so the area closest to the ventral side has the highest concentration of shh, and the area farthest from the ventral side has the lowest concentration. A developing cell just needs to sense how much shh is in its environment to identify its position. As you can imagine, if there were multiple gradients along different axes, a cell would be able to define its 3D location with more precision, and this happens in other parts of the nervous system.

Another common mechanism is through cell-cell contact, where cells migrate to be with other cells that express complementary proteins on their surfaces. It's as if some cells have the sticky part of velcro and some have the fuzzy part, and the sticky cells find the fuzzy cells and stick to them.

A third mechanism might be considered the "just keep swimming" mechanism. In the developing cerebral cortex of the brain, newborn cells migrate out past their earlier-born cousins until they reach the outer limits of the previously-born cells, and then they stop. They don't "know" that they're supposed to be at any particular level, but they keep migrating until they see a "stop" signal (which is provided by another layer of cells on the surface of the brain).