Chen Yin-ChenCYCU Biz Design
Home
About
AboutSchedule
Courses
Computational Thinking & ProgrammingNatural Science & Artificial IntelligenceProgramming Language Introduction
Interactive
Variable SwapMonty HallBetting SimulatorSliding PuzzleTower of Hanoi
Programming
JS Basic TutorialJavaScriptP5.js (Lecture)
Applications
Human Motion SystemAstrology SystemArchitecture SystemIndigenous Loom

Language

Traditional ChineseSimplified ChineseEnglishJapaneseBahasa Indonesia

Chen Yin-Chen

Business Design Department, Chung Yuan Christian University
Zishen Technology

Quick Links

  • About
  • Schedule
  • Games
  • JavaScript

Contact & Social

© 2026 Chen Yin-Chen。All rights reserved。

Built with Next.js & Tailwind CSS

🌌 系統概論🔮 排盤引擎📊 資料結構⚡ 四化狀態機🤖 規則引擎

玄學系統 · 排盤引擎

紫微斗數排盤引擎

輸入出生時間 → 執行演算法 → 渲染 12 宮命盤。演算法邏輯來自講師既有 JS 排盤程式。

輸入資料 (I/O)

CS 視角

輸入 → 模數運算 → 查表 → 輸出 12 宮格陣列

// 命宮計算
// (農曆月份從寅月=1積累,逆數時辰)
main_idx = (12 + lunar_m + 2
           - lunar_h + 1) % 12;

// 身宮計算
body_idx = (lunar_m + 2
           + lunar_h - 1) % 12;
🌌

請在左側輸入出生資料,按「立即排盤」

12 宮 × 多類星曜 = 一張稀疏矩陣(Sparse Matrix)