Came via a few phases, ancient china, at least the Xia-Shang, were fairly well connected to the western world, they have the cosmogony built into their statecraft, who invented and did what in what office, while in the west we just assigned it to heros and gods. It’s origins are in theriphorphic river gods, similar to the goddess in my “I Lost A Temple” thread.
The first major revision of the I Ching was supposedly by King Wu of the Zhou, as he was imprisoned by King Zhou of the Shang. We’ve found evidence aspects of I Chung predates this, and we certainly don’t use his system, if he ever made a version at all, because grave texts tend to look radically different from the system employed today, and one another for that matter. We have some nice ones displayed in DC.
Proto-Daoists continued with these logical schemes,and under full blown Daoism, they started focusing heavily on alchemy, with alot of paralleled investigations of near chemistry to near psychology, with heavy doses of where the fuck did this shit come from.
Around the 9th century you start having Ying-Yang formulas, based on studies of bihemispheric brain anatomy (yes,its anatomical, was originally science oriented).
You had similar systems blundering around India and Byzantium.
I’m honestly not too into the daoist systems, I was thinking about takingba job in china a whike back to look into it first hand, but didn’t, so instead I don’t bother. Why focus on western systems and not chinese? I just have better access to western works. When I come across a chinese work, it is more in line to a historic figure or a philosopher, I learn bits here and there, nothing systemmatic. I will remedy this later on.
I do recommend looking into early chinese mathematics though, they often were ahead of the west, and they use a wide variety of decises,including the magic square you listed aboce in the op.