Skip to content

About

Convert four-corner indices into Chinese characters.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

4CornerIndex-to-Text

Translate the 4-corner indexes to Chinese text.

Motivation:

A few days ago, my friend SUN ZHIZHENG, who is a writer, shared a post on social media, where he mentioned the concept of creating a book titled 《 $\pi$ 》: use the 4-corner index method to encode the digits of $\pi$ into an endless sequence of Chinese characters, forming a book without a final page. The idea fascinated me and sparked my imagination. Inspired by this, I decided to try bringing it to life using Python here. (of course only to a certain extent :) ).

My Steps:

  1. Extract the 4CornerIndex mapping file from the html file converted from the original source .chm file.

  2. Generate large number of digits of the constant $\pi$.

  3. Generate text with translating the digits of $\pi$ as 4-corner indexes to Chinese.

  4. Render the text to pdf by using Tex. (IDE: TeXstudio ; Compiler: XeLaTex )

    • Pi Book of text from $\pi$ of 1 million digits: tex , pdf
    • Pi Book of text from $\pi$ of 50 million digits: tex , pdf

- PS: Naturally this can be extended to other irrational numbers like $e$, $\sqrt2$, golden ratio ($1+\sqrt5/2$) .

App:

I turned it into an app for translating input number as 4-corner indexes to Chinese:

(As I tried, the phone browsers cannot display most of the characters due to encoding issue, while the computer browsers perform much better.)


References:

About

Convert four-corner indices into Chinese characters.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages