赞
踩
很久之前就对这个算法感兴趣了,但是一直没搞定,网上公说公的,婆说婆的,搞得你头晕眼睛花,最后东拼西凑研究了好久才研究出来,在这里给大家分享。
第一步,掏出你的老黄历,如果你没有老黄历问题不大,你有手机或者电脑,查询日干支,这个日干支计算太蛋蛋疼了。不过我有易语言,问题不大,随手就掏出了万年历模块,动手改造就能得到日干支。
第二步,有了日干支,你还得会算时干支,时干支简单,问题不大,我们先解决时干支。先看这个表。
“甲己” | “["甲子","乙丑","丙寅","丁卯","戊辰","己巳","庚午","辛未","壬申","癸酉","甲戌","乙亥","丙子"]”
“乙庚” | “["丙子","丁丑","戊寅","己卯","庚辰","辛巳","壬午","癸未","甲申","乙酉","丙戌","丁亥","戊子"]”
* “丙辛” | “["戊子","己丑","庚寅","辛卯","壬辰","癸巳","甲午","乙未","丙申","丁酉","戊戌","己亥","庚子"]”
* “丁壬” | “["庚子","辛丑","壬寅","癸卯","甲辰","乙巳","丙午","丁未","戊申","己酉","庚戌","辛亥","壬子"]”
* “戊癸” | “["壬子","癸丑","甲寅","乙卯","丙辰","丁巳","戊午","己未","庚申","辛酉","壬戌","癸亥","甲子"]”
百度查到上图,自己手动把这个表鲁到程序。我已经提供了文字版了,有了这个表你就能查询到日干支+小时对应的干支了,好了
到这里万事俱备只欠东风了,,,
第三步:把计算公式掏出来
灵龟八法穴位计算公式
公式:(日干+日支+时干+时支)÷9(阳日)或÷6(阴日)=商……余数
[1]阳日:(日干+日支+时干+时支)÷9 = 商……余数(取余数)。
[2]阴日:(日干+日支+时干+时支)÷6 = 商……余数(取余数)。
这里你又发现,阳日和阴日怎么计算,问的好,接下来我会告诉你
我二话不说,直接给你结果。这些都是固定的,不要太在意其他细节
{"甲":9,"丙":9,"乙":6,"戊":9,"庚":9,"辛":6,"壬":9,"丁":6,"己":6,"癸":6}
接下来,你会发现,公式中 日干+日支+时干+时支 这些怎么算,好了,再次给你查询表
日干查询表
{"甲":10,"己":10,"乙":9,"丙":7,"庚":9,"丁":8,"辛":7,"壬":8,"戊":7,"癸":7}
日支查询表{"丑":10,"寅":8,"辰":10,"戌":10,"子":7,"酉":9,"未":10,"申":9,"卯":8,"巳":7,"午":7,"亥":7}
时干查询表
{"甲":9,"己":9,"乙":8,"丙":7,"庚":8,"壬":6,"辛":7,"丁":6,"戊":5,"癸":5}
时支查询表
{"酉":6,"未":8,"子":9,"申":7,"午":9,"丑":8,"辰":5,"寅":7,"卯":6,"戌":5,"巳":4,"亥":4}
好了,距离成功基本就差一步了。。。
举例。目前是
2022年12月27日15点03分
年干支: 壬寅
月干支: 壬子
日干支: 甲寅
时干支: 壬申
开穴索引: 4
开穴: 足临泣
配穴: 外关
直接查询网上,得到 2022年12月27日 是 甲寅 日 15点,
* “甲己” | “["甲子","乙丑","丙寅","丁卯","戊辰","己巳","庚午","辛未","壬申","癸酉","甲戌","乙亥","丙子"]”
甲寅日,天干是 甲,看上面的那个图片,属于 甲己 这一行,,然后15点,对应的列是 壬申
这里推算出来时辰的 干支
接下来在看一下公式
公式:(日干+日支+时干+时支)÷9(阳日)或÷6(阴日)=商……余数
我们继续查询 (日干+日支+时干+时支) 这四个,得到的数值是
"甲":10
"寅":8
"壬":6
"申":7
9(阳日)或÷6(阴日)因为是 甲寅 ,带个甲,查询
{"甲":9,"丙":9,"乙":6,"戊":9,"庚":9,"辛":6,"壬":9,"丁":6,"己":6,"癸":6}
得到 "甲":9
套入公式 (10+8+6+7)取 9的余数 == 31 % 9 == 余数 4
得到这个余数以后,最后查询一个表即可
1代表申脉,2代表照海穴,3代表外关,4代表足临泣,5男子取照海|女子取内关,余数6取公孙,7取后溪,8取内关。 刚刚算得余数为4,足临泣
得到 足临泣 对应的就是外关,反过来如果得到的是外关,那么对应的穴位就是 足临泣
最后。。。要补充一个小问题,,如果余数是0的话
余数 你就取
9(阳日)或 6(阴日)
即可,好了,大家可以愉快的玩耍了
附上装13的图
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。