{"success":true,"version":"v1","request":{"tool":"get_calculator_schema","calculator_id":"hexagram-change"},"result":{"entity_type":"calculator","id":"hexagram-change","calculator_id":"hexagram-change","canonical_url":"https://tttkmbb.com/yijing/hexagram-change","name":"Hexagram Change Calculator (变卦)","title":"Hexagram Change Calculator – Moving Lines, Changed Hexagram (之卦) and the Zhu Xi Reading Rule","category":"yijing","category_name":"I Ching & Five Elements","tool_name":"calculate_hexagram_change","featured_mcp_tool":false,"description":"Applies moving lines (动爻, dongyao) to a hexagram and returns the changed hexagram (之卦, zhigua), the nuclear hexagrams of both, the line titles of the moving lines and which text to read according to the traditional rule attributed to Zhu Xi (朱熹).","use_when":"You have a cast hexagram with one or more moving lines (from coins, yarrow stalks, Plum Blossom or Liu Yao) and need the resulting hexagram and the reading convention.","do_not_use_when":"You only need to identify a hexagram without moving lines (use hexagram-lookup) or you need to cast the hexagram itself (use meihua-yishu or liuyao).","inputs":[{"name":"hexagram","label":"Original hexagram (本卦)","type":"string","required":true,"description":"King Wen number (1–64), name (乾, 天风姤, qian, The Creative) or six line digits bottom→top; a 6/7/8/9 string (e.g. 977777) also defines the moving lines.","example":"乾"},{"name":"moving_lines","label":"Moving lines","type":"string","required":false,"description":"Positions of the moving lines counted from the bottom, e.g. 1,4 or 初九,九四, or a 6/7/8/9 string (6 = old yin, 9 = old yang move). Optional when hexagram already uses 6/9 digits; use none for no moving line.","example":"1"}],"outputs":[{"name":"original","label":"Original hexagram (本卦)","type":"string","decimals":4,"description":"Number, name, pinyin, title and symbol of the original hexagram."},{"name":"original_lines","label":"Original lines","type":"string","decimals":4,"description":"Six digits bottom→top, 1 = yang."},{"name":"notation_6789","label":"Original in 6/7/8/9 notation","type":"string","decimals":4,"description":"Bottom→top digits with moving lines as 6 (old yin) or 9 (old yang)."},{"name":"moving_line_positions","label":"Moving line positions","type":"number_list","decimals":0,"description":"Positions 1–6 of the moving lines, ascending."},{"name":"moving_line_names","label":"Moving line titles","type":"string_list","decimals":4,"description":"Traditional titles of the moving lines in the original hexagram (初九 … 上六; 九 = yang line, 六 = yin line)."},{"name":"changed_hexagram","label":"Changed hexagram (之卦)","type":"string","decimals":4,"description":"Hexagram obtained by flipping the moving lines."},{"name":"changed_lines","label":"Changed lines","type":"string","decimals":4,"description":"Six digits bottom→top of the changed hexagram."},{"name":"nuclear_original","label":"Nuclear of original (本卦互卦)","type":"string","decimals":4,"description":"Nuclear hexagram (lines 2-3-4 and 3-4-5) of the original."},{"name":"nuclear_changed","label":"Nuclear of changed (之卦互卦)","type":"string","decimals":4,"description":"Nuclear hexagram of the changed hexagram."},{"name":"reading_rule","label":"Reading rule (朱熹)","type":"string","decimals":4,"description":"Which text the traditional rule says to read for this number of moving lines."},{"name":"original_judgment_text","label":"Original judgment (本卦卦辞)","type":"string","decimals":4,"description":"Received judgment text of the original hexagram."},{"name":"changed_judgment_text","label":"Changed judgment (之卦卦辞)","type":"string","decimals":4,"description":"Received judgment text of the changed hexagram."},{"name":"disclaimer","label":"Disclaimer","type":"string","decimals":4,"description":"Cultural-reference statement."}],"input_schema":{"type":"object","properties":{"hexagram":{"description":"King Wen number (1–64), name (乾, 天风姤, qian, The Creative) or six line digits bottom→top; a 6/7/8/9 string (e.g. 977777) also defines the moving lines.","type":"string","examples":["乾"]},"moving_lines":{"description":"Positions of the moving lines counted from the bottom, e.g. 1,4 or 初九,九四, or a 6/7/8/9 string (6 = old yin, 9 = old yang move). Optional when hexagram already uses 6/9 digits; use none for no moving line.","type":"string","examples":["1"]}},"additionalProperties":false,"required":["hexagram"]},"output_schema":{"type":"object","properties":{"original":{"description":"Number, name, pinyin, title and symbol of the original hexagram.","type":"string"},"original_lines":{"description":"Six digits bottom→top, 1 = yang.","type":"string"},"notation_6789":{"description":"Bottom→top digits with moving lines as 6 (old yin) or 9 (old yang).","type":"string"},"moving_line_positions":{"description":"Positions 1–6 of the moving lines, ascending.","type":"array","items":{"type":"number"}},"moving_line_names":{"description":"Traditional titles of the moving lines in the original hexagram (初九 … 上六; 九 = yang line, 六 = yin line).","type":"array","items":{"type":"string"}},"changed_hexagram":{"description":"Hexagram obtained by flipping the moving lines.","type":"string"},"changed_lines":{"description":"Six digits bottom→top of the changed hexagram.","type":"string"},"nuclear_original":{"description":"Nuclear hexagram (lines 2-3-4 and 3-4-5) of the original.","type":"string"},"nuclear_changed":{"description":"Nuclear hexagram of the changed hexagram.","type":"string"},"reading_rule":{"description":"Which text the traditional rule says to read for this number of moving lines.","type":"string"},"original_judgment_text":{"description":"Received judgment text of the original hexagram.","type":"string"},"changed_judgment_text":{"description":"Received judgment text of the changed hexagram.","type":"string"},"disclaimer":{"description":"Cultural-reference statement.","type":"string"}}},"formula":"changed line_i = 1 − line_i for each moving position, otherwise unchanged; rule by count of moving lines: 0 → original judgment; 1 → that line; 2 → both lines, upper primary; 3 → both judgments, original primary; 4 → the two unchanged lines of the changed hexagram, lower primary; 5 → the single unchanged line of the changed hexagram; 6 → changed hexagram's judgment (乾 → 用九, 坤 → 用六)","method":"The reading rule is the convention set out in Zhu Xi's 易学启蒙 (Yixue Qimeng); line texts (爻辞) are not included, only which line to read. Traditional cultural reference calculation; not a prediction and not medical, legal or financial advice.","sources":[{"name":"Wikipedia – I Ching","url":"https://en.wikipedia.org/wiki/I_Ching","type":"reference","retrieved_at":"2026-09-24"},{"name":"Wikipedia – Hexagram (I Ching)","url":"https://en.wikipedia.org/wiki/Hexagram_(I_Ching)","type":"reference","retrieved_at":"2026-09-24"},{"name":"Wilhelm R. & Baynes C. F. (1950) The I Ching or Book of Changes, Bollingen Series XIX, Princeton University Press","url":"https://press.princeton.edu/books/hardcover/9780691097503/the-i-ching-or-book-of-changes","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":"乾 with line 1 moving","inputs":{"hexagram":"乾","moving_lines":"1"},"expected":{"original":"1 乾 Qian (The Creative) ䷀","notation_6789":"977777","moving_line_positions":[1],"moving_line_names":["初九"],"changed_hexagram":"44 姤 Gou (Coming to Meet) ䷫","changed_lines":"011111","nuclear_original":"1 乾 Qian (The Creative) ䷀","nuclear_changed":"1 乾 Qian (The Creative) ䷀","reading_rule":"One moving line: read the line text (爻辞) of 初九 in 乾."},"url":"https://tttkmbb.com/api/v1/calculate/hexagram-change?hexagram=%E4%B9%BE&moving_lines=1"},{"name":"坤 with all six lines moving","inputs":{"hexagram":"坤","moving_lines":"1,2,3,4,5,6"},"expected":{"original":"2 坤 Kun (The Receptive) ䷁","notation_6789":"666666","moving_line_names":["初六","六二","六三","六四","六五","上六"],"changed_hexagram":"1 乾 Qian (The Creative) ䷀","reading_rule":"All six lines move in 坤: read 用六 (Yong Liu) — 利永贞。"},"url":"https://tttkmbb.com/api/v1/calculate/hexagram-change?hexagram=%E5%9D%A4&moving_lines=1%2C2%2C3%2C4%2C5%2C6"}],"faq":[{"q":"How are moving lines numbered?","a":"From the bottom: line 1 is the first line cast, line 6 the top line. In 6/7/8/9 notation a 6 (old yin) becomes yang and a 9 (old yang) becomes yin in the changed hexagram; 7 and 8 stay."},{"q":"Where does the reading rule come from?","a":"From Zhu Xi's 易学启蒙 (12th century), the convention most modern manuals cite: one moving line → that line's text, two → both with the upper primary, three → both judgments, four → the two unmoving lines of the changed hexagram, five → its single unmoving line, six → the changed hexagram's judgment (用九 for 乾, 用六 for 坤)."}],"tags":["changing lines","moving lines","之卦","变卦","i ching","hexagram change"],"related":[{"calculator_id":"hexagram-lookup","reason":"Full attributes of the original or changed hexagram."},{"calculator_id":"meihua-yishu","reason":"Cast a hexagram and its moving line from a date, time or numbers."},{"calculator_id":"liuyao","reason":"Six-line chart with 世/应, six relatives and palace for the cast hexagram."}],"links":{"html":"https://tttkmbb.com/yijing/hexagram-change","markdown":"https://tttkmbb.com/yijing/hexagram-change.md","json":"https://tttkmbb.com/yijing/hexagram-change.json","api":"https://tttkmbb.com/api/v1/calculate/hexagram-change","schema":"https://tttkmbb.com/api/v1/calculators/hexagram-change","openapi":"https://tttkmbb.com/openapi.json","mcp":"https://tttkmbb.com/mcp"},"version":"v1","updated_at":"2026-09-24"},"timestamp":"2026-09-24T08:30:42Z"}