Skip to content

An interactive 3D visualization of the I Ching hexagrams arranged in a spherical formation.

License

Notifications You must be signed in to change notification settings

edisedis777/yijing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

I Ching Sphere

Yijing Sphere

Visual Studio Code HTML CSS JavaScript Three.js Markdown

An interactive 3D visualization of the I Ching hexagrams arranged in a spherical formation.

ALWAYS REMEMBER what Lao Tzu said: "The Tao that can be spoken is not the eternal Tao."

This is only a 3D representation of a 6D structure. This is only one portion or slice of the entity. Additionally, the I-Ching is always moving through space and time. This further complicates things.

Screenshot

🔮 Features

  • Interactive 3D Sphere: Navigate through all 64 hexagrams positioned in a spherical arrangement
  • Intuitive Controls: Rotate, zoom, and interact with the sphere using mouse or touch controls
  • Hexagram Details: Click/tap on any hexagram to view its details including number, name in Chinese, pinyin, and English translation
  • Responsive Design: Optimized for both desktop and mobile devices
  • Performance Optimized: Adaptive rendering based on device capabilities

🚀 Live Demo

Live Demo

🧩 About the I Ching

The I Ching (易經), or "Book of Changes," is an ancient Chinese text dating back to the 9th century BCE. It is not just a divination text, but rather a teacher of phylosophy. It consists of 64 hexagrams, each representing a unique archetype or situation. The hexagrams are composed of six horizontal lines that can be either solid (yang) or broken (yin), read from top to bottom. This application arranges these hexagrams in a spherical pattern, with special emphasis on the pole hexagrams:

  • North Pole: Hexagram 1 (乾 Qián) - "The Creative (Initiating)"
  • South Pole: Hexagram 2 (坤 Kūn) - "The Receptive (Responding)"

The arrangement follows a logical pattern with multiple levels, thereby creating a spatial relationship between hexagrams.

📊 Hexagrams

Number Symbol Traditional Chinese Pinyin Simplified Chinese English Binary
01 qián Initiating 111111
02 kūn Responding 000000
03 zhūn Beginning 010001
04 méng Childhood 100010
05 Waiting 111010
06 sòng Contention 010111
07 shī Leading 010000
08 Grouping 000010
09 小畜 xiǎo chù 小畜 Small Accumulation 111011
10 Treading 110111
11 tài Advance 111000
12 Obstruction 000111
13 同人 tóng rén 同人 Fellowship 101111
14 大有 dà yǒu 大有 Great Possession 111101
15 qiān Humbling 000100
16 Delight 001000
17 suí Following 100110
18 Remedying 011001
19 lín Approaching 110000
20 guān Viewing 000011
21 噬嗑 shì kè 噬嗑 Eradicating 100101
22 Adorning 101001
23 Falling Away 000001
24 Returning 100000
25 無妄 wú wàng 无妄 Without Falsehood 100111
26 大畜 dà chù 大畜 Great Accumulation 111001
27 Nourishing 100001
28 大過 dà guò 大过 Great Exceeding 011110
29 kǎn Darkness 010010
30 Brightness 101101
31 xián Conjoining 001110
32 héng Perseverance 011100
33 dùn Retreating 001111
34 大壯 dà zhuàng 大壮 Great Strength 111100
35 jìn Proceeding 000101
36 明夷 míng yí 明夷 Brightness Hiding 101000
37 家人 jiā rén 家人 Dwelling People 101011
38 kuí Diversity 110101
39 jiǎn Hardship 001010
40 xiè Relief 010100
41 sǔn Decreasing 110001
42 Increasing 100011
43 guài Decisiveness 111110
44 gòu Encountering 011111
45 cuì Gathering 000110
46 shēng Growing Upward 011000
47 kùn Exhaustion 010110
48 jǐng Replenishing 011010
49 Abolishing 101110
50 dǐng Establishing 011101
51 zhèn Taking Action 100100
52 gèn Keeping Still 001001
53 jiàn Developing 001011
54 歸妹 guī mèi 归妹 Marrying 110100
55 fēng Abundance 101100
56 Traveling 001101
57 xùn Proceeding Humbly 110110
58 duì Joyful 011011
59 huàn Dispersing 010011
60 jié Restricting 110010
61 中孚 zhōng fú 中孚 Center Confirming 110011
62 小過 xiǎo guò 小过 Small Exceeding 001100
63 既濟 jì jì 既济 Already Complete 010101
64 ䷿ 未濟 wèi jì 未济 Not Yet Complete 101010

Each hexagram represents a unique situation or state, and the I Ching provides guidance on how to navigate through these circumstances. The binary representation shows the structure of each hexagram, with 1 representing yang (unbroken) lines and 0 representing yin (broken) lines, read from bottom to top.

💻 Technologies Used

  • Three.js - 3D JavaScript library
  • JavaScript (ES6+)
  • HTML5 & CSS3

🛠️ Installation & Setup

  1. Clone the repository:

    git clone https://github.com/edisedis777/i-ching-sphere.git
    cd i-ching-sphere
    
  2. Since this is a pure frontend project with ES modules, you'll need to serve it using a local server:

    Using Python:

    python -m http.server
    

    Or using Node.js's live-server:

    npx live-server
    
  3. Open your browser and navigate to http://localhost:8000 (or the port specified by your local server)

📱 Usage

  • Drag to rotate the sphere
  • Scroll/Pinch to zoom in or out
  • Click/Tap on any hexagram to view its details
  • Use the Reset View button to return to the default perspective

📂 Project Structure

i-ching-sphere/
├── index.html              # Main HTML file
├── script.js               # Main application script
├── hexagramsRendering.js   # Hexagram positioning and rendering functions
├── hexagramsData.js        # Hexagram data and positioning data
└── README.md               # This file

🔄 Performance Considerations

The application includes several optimizations for mobile devices:

  • Adaptive rendering quality based on device capabilities
  • Reduced geometry complexity on mobile devices
  • Optimized texture sizes for better performance
  • Frame rate limiting for consistent experience across devices

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

🙏 Credits

📜 License

Distributed under the GNU Affero General Public License v3.0 License. See LICENSE for more information.

About

An interactive 3D visualization of the I Ching hexagrams arranged in a spherical formation.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published