tl;dr I need help finding the code or OSL script for the volume scatter node. Not asking how it works, just a specific, noob-friendly instruction how to find it, or a link to it. Blender is big, and this is my first time, so...
The volume scatter node has an Anisotropy input to control the relative strength of scattering in different directions. When changed from +1 to -1 the scattering changes from more forward to more backward scattering.
It turns out there is a published excerpt from the Blender Cycles Encyclopedia that shows this - I've included two screenshots below.
The (unnormalized) distribution could be as simple as:
I(theta) ~ 1 + A * cos(theta) where A is the Anisotropy factor, or it could be completely different.
I could build a science experiment in blender to "measure" the intensity distribution as a function of angle. I don't know if there is a "light meter" node yet, but I could do it with cameras, saving rendered images, and analyzing them with NumPy.
But I am wondering if I can just read the math somewhere? Are nodes like this written in OSL, or in C? (I learned about OSL in this helpful answerthis helpful answer.) How would I go about finding the code for this node to find how the shape of the distribution is calculated?

