{"success":true,"version":"v1","request":{"tool":"get_calculator_schema","calculator_id":"bagua"},"result":{"entity_type":"calculator","id":"bagua","calculator_id":"bagua","canonical_url":"https://tttkmbb.com/yijing/bagua","name":"Bagua Trigram Lookup (八卦)","title":"Bagua Trigram Lookup – Eight Trigrams (八卦) with Lines, Numbers, Directions and Correspondences","category":"yijing","category_name":"I Ching & Five Elements","tool_name":"lookup_bagua_trigram","featured_mcp_tool":false,"description":"Looks up one of the eight trigrams (八卦, bagua) and returns its lines, Fuxi (先天, xiantian) and Luoshu (洛书, later-heaven) numbers, directions in both arrangements, element, yin/yang, family member, body part, animal, attribute and season, plus a table of all eight.","use_when":"You need the structured attributes of a trigram (乾 兑 离 震 巽 坎 艮 坤) or the whole eight-trigram table, e.g. to build or explain a hexagram, a compass arrangement or a feng shui reference.","do_not_use_when":"You need a six-line hexagram (use hexagram-lookup), a person's Ming Gua trigram from a birth year (use ming-gua) or the Luoshu magic square (use luoshu-square).","inputs":[{"name":"trigram","label":"Trigram","type":"string","required":true,"description":"Chinese name (乾 兑 离 震 巽 坎 艮 坤, traditional 兌 離 accepted), pinyin (qian, dui, li, zhen, xun, kan, gen, kun), English nature (heaven, lake, fire, thunder, wind, water, mountain, earth), symbol (☰ … ☷), 3 line digits bottom→top with 1 = yang (e.g. 010 = 坎), or fuxi:N / luoshu:N number forms.","example":"乾"}],"outputs":[{"name":"name_cn","label":"Name (中文)","type":"string","decimals":4,"description":"Chinese name of the trigram."},{"name":"pinyin","label":"Pinyin","type":"string","decimals":4,"description":"Hanyu pinyin of the name."},{"name":"english","label":"Nature (English)","type":"string","decimals":4,"description":"Natural image: Heaven, Lake, Fire, Thunder, Wind, Water, Mountain or Earth."},{"name":"symbol","label":"Symbol","type":"string","decimals":4,"description":"Unicode trigram symbol (U+2630–U+2637)."},{"name":"lines","label":"Lines (bottom→top)","type":"string","decimals":4,"description":"Three digits from the bottom line to the top line; 1 = yang ⚊ (solid), 0 = yin ⚋ (broken)."},{"name":"line_description","label":"Line description","type":"string","decimals":4,"description":"The three lines in words from bottom to top."},{"name":"fuxi_number","label":"Fuxi (先天) number","type":"integer","decimals":0,"description":"Earlier-heaven number: 乾1 兑2 离3 震4 巽5 坎6 艮7 坤8."},{"name":"luoshu_number","label":"Luoshu (后天) number","type":"integer","decimals":0,"description":"Later-heaven / Luoshu number: 坎1 坤2 震3 巽4 乾6 兑7 艮8 离9 (5 is the centre)."},{"name":"later_heaven_direction","label":"Later-heaven direction (后天)","type":"string","decimals":4,"description":"Compass direction in the King Wen / later-heaven arrangement used by feng shui."},{"name":"earlier_heaven_direction","label":"Earlier-heaven direction (先天)","type":"string","decimals":4,"description":"Compass direction in the Fuxi / earlier-heaven arrangement."},{"name":"element","label":"Element (五行)","type":"string","decimals":4,"description":"Five-element attribution: 乾 兑 Metal, 离 Fire, 震 巽 Wood, 坎 Water, 艮 坤 Earth."},{"name":"yin_yang","label":"Yin/yang","type":"string","decimals":4,"description":"乾 震 坎 艮 are yang trigrams; 坤 巽 离 兑 are yin trigrams (by the family classification of the 说卦传)."},{"name":"family_member","label":"Family member","type":"string","decimals":4,"description":"Family role from the 说卦传 (Shuogua)."},{"name":"body_part","label":"Body part","type":"string","decimals":4,"description":"Body correspondence from the 说卦传."},{"name":"animal","label":"Animal","type":"string","decimals":4,"description":"Animal correspondence from the 说卦传."},{"name":"attribute","label":"Attribute (性情)","type":"string","decimals":4,"description":"Characteristic quality (健 顺 动 入 陷 丽 止 说)."},{"name":"season","label":"Season (后天)","type":"string","decimals":4,"description":"Season assigned in the later-heaven arrangement."},{"name":"all_trigrams","label":"All eight trigrams","type":"list","decimals":4,"description":"One row per trigram (Fuxi order): name, pinyin, symbol, lines, Fuxi number, Luoshu number, later-heaven direction, element."}],"input_schema":{"type":"object","properties":{"trigram":{"description":"Chinese name (乾 兑 离 震 巽 坎 艮 坤, traditional 兌 離 accepted), pinyin (qian, dui, li, zhen, xun, kan, gen, kun), English nature (heaven, lake, fire, thunder, wind, water, mountain, earth), symbol (☰ … ☷), 3 line digits bottom→top with 1 = yang (e.g. 010 = 坎), or fuxi:N / luoshu:N number forms.","type":"string","examples":["乾"]}},"additionalProperties":false,"required":["trigram"]},"output_schema":{"type":"object","properties":{"name_cn":{"description":"Chinese name of the trigram.","type":"string"},"pinyin":{"description":"Hanyu pinyin of the name.","type":"string"},"english":{"description":"Natural image: Heaven, Lake, Fire, Thunder, Wind, Water, Mountain or Earth.","type":"string"},"symbol":{"description":"Unicode trigram symbol (U+2630–U+2637).","type":"string"},"lines":{"description":"Three digits from the bottom line to the top line; 1 = yang ⚊ (solid), 0 = yin ⚋ (broken).","type":"string"},"line_description":{"description":"The three lines in words from bottom to top.","type":"string"},"fuxi_number":{"description":"Earlier-heaven number: 乾1 兑2 离3 震4 巽5 坎6 艮7 坤8.","type":"integer"},"luoshu_number":{"description":"Later-heaven / Luoshu number: 坎1 坤2 震3 巽4 乾6 兑7 艮8 离9 (5 is the centre).","type":"integer"},"later_heaven_direction":{"description":"Compass direction in the King Wen / later-heaven arrangement used by feng shui.","type":"string"},"earlier_heaven_direction":{"description":"Compass direction in the Fuxi / earlier-heaven arrangement.","type":"string"},"element":{"description":"Five-element attribution: 乾 兑 Metal, 离 Fire, 震 巽 Wood, 坎 Water, 艮 坤 Earth.","type":"string"},"yin_yang":{"description":"乾 震 坎 艮 are yang trigrams; 坤 巽 离 兑 are yin trigrams (by the family classification of the 说卦传).","type":"string"},"family_member":{"description":"Family role from the 说卦传 (Shuogua).","type":"string"},"body_part":{"description":"Body correspondence from the 说卦传.","type":"string"},"animal":{"description":"Animal correspondence from the 说卦传.","type":"string"},"attribute":{"description":"Characteristic quality (健 顺 动 入 陷 丽 止 说).","type":"string"},"season":{"description":"Season assigned in the later-heaven arrangement.","type":"string"},"all_trigrams":{"description":"One row per trigram (Fuxi order): name, pinyin, symbol, lines, Fuxi number, Luoshu number, later-heaven direction, element.","type":"array"}}},"formula":"lines bottom→top: 乾 111, 兑 110, 离 101, 震 100, 巽 011, 坎 010, 艮 001, 坤 000; Fuxi number = 8 − binary(lines) reading the bottom line as the most significant bit (乾 = 8 − 7 = 1); Luoshu number from the later-heaven arrangement (坎1 坤2 震3 巽4 乾6 兑7 艮8 离9)","method":"Correspondences follow the 说卦传 (Shuogua) chapter of the Yijing and the standard Fuxi / King Wen arrangements. Traditional cultural reference calculation; not a prediction and not medical, legal or financial advice.","sources":[{"name":"Wikipedia – Bagua","url":"https://en.wikipedia.org/wiki/Bagua","type":"reference","retrieved_at":"2026-09-24"},{"name":"Wikipedia – I Ching","url":"https://en.wikipedia.org/wiki/I_Ching","type":"reference","retrieved_at":"2026-09-24"},{"name":"Legge J. (1899) The Yî King, Sacred Books of the East vol. 16 (public domain)","url":"https://sacred-texts.com/ich/index.htm","type":"textbook","retrieved_at":"2026-09-24"}],"freshness":{"type":"static","max_age_seconds":null,"note":"Deterministic formula with fixed constants; results never go stale. Inputs supplied by the caller determine the output."},"examples":[{"name":"乾 Qian (Heaven)","inputs":{"trigram":"乾"},"expected":{"symbol":"☰","lines":"111","fuxi_number":1,"luoshu_number":6,"later_heaven_direction":"Northwest (NW, 西北)","element":"Metal (金)","family_member":"Father (父)"},"url":"https://tttkmbb.com/api/v1/calculate/bagua?trigram=%E4%B9%BE"},{"name":"kan (Water) by pinyin","inputs":{"trigram":"kan"},"expected":{"name_cn":"坎","symbol":"☵","lines":"010","fuxi_number":6,"luoshu_number":1,"later_heaven_direction":"North (N, 北)","element":"Water (水)","family_member":"Middle son (中男)"},"url":"https://tttkmbb.com/api/v1/calculate/bagua?trigram=kan"}],"faq":[{"q":"Which line is the bottom line?","a":"The first digit of `lines` is the bottom line (line 1) and the last digit is the top line, following the way trigrams are drawn from the ground up; 1 = solid yang line, 0 = broken yin line."},{"q":"Why does 乾 have two different numbers?","a":"The Fuxi (先天) sequence numbers the trigrams by their binary structure (乾 1 … 坤 8); the Luoshu (后天) numbers come from the King Wen compass arrangement mapped onto the Luoshu square (乾 6 in the northwest). Feng shui and Ming Gua use the Luoshu numbers."}],"tags":["bagua","trigram","八卦","i ching","eight trigrams","fuxi luoshu"],"related":[{"calculator_id":"hexagram-lookup","reason":"Combine two trigrams into one of the 64 hexagrams."},{"calculator_id":"luoshu-square","reason":"The later-heaven numbers placed on the 3×3 Luoshu square."},{"calculator_id":"ming-gua","reason":"Personal trigram (命卦) from birth year and sex."}],"links":{"html":"https://tttkmbb.com/yijing/bagua","markdown":"https://tttkmbb.com/yijing/bagua.md","json":"https://tttkmbb.com/yijing/bagua.json","api":"https://tttkmbb.com/api/v1/calculate/bagua","schema":"https://tttkmbb.com/api/v1/calculators/bagua","openapi":"https://tttkmbb.com/openapi.json","mcp":"https://tttkmbb.com/mcp"},"version":"v1","updated_at":"2026-09-24"},"timestamp":"2026-09-24T08:30:38Z"}