The Nine Gates and Eight Trigrams