First, take a look at letters for consonants. Basic letters for consonants were designed by looking after the shape of the speech organ which plays a central role in pronouncing the consonant.
Basic Consonant Letters Shape of speech organ
5 sounds(五音)  
The shape of back of tonguetouching
the velum(soft roof of the mouth)
velar sound
(牙音)
The shape of the tip
of tongue touching the alveola
lingual sound
(舌音)
The shape that the lips firmly closing labial sound
(唇音)
 
The shape of a tooth
dental sound
(齒音)
 
The shape of the throat guttural sound
(喉音)
 


Other consonant letters were made on the base of these 5 basic letters. For exmple, consonants /ㄷ/and /ㄴ/ are pronounced using the same speech organ at the same location in the mouth, while /ㄷ/ is stronger than /ㄴ/. Reflecting this fact, the letter for /ㄷ/ was made by adding one more stroke to the letter for /ㄴ/. This principle is also applied to the relationship between /ㅁ/ and /ㅂ/, /ㅅ/ and /ㅈ/, or /ㅇ/ and /ㅎ/.



In Korean, some consonants are classified into the tertiary scheme of plain sounds, aspirated sounds and glottalized sounds. /ㄱ/, /ㄷ/, /ㅂ/, /ㅅ/ and /ㅈ/ are plain sounds, and /ㅋ/, /ㅌ/, /ㅍ/ and /ㅊ/ are aspirated sounds, while /ㄲ/, /ㄸ/, /ㅃ/, /ㅆ/ and /ㅉ/ belong to tensed sounds.

   As can be seen from these, consonats pronounced by the same speech organ at the same location have similar shapes, and the relationship between sounds is parallel to that between letters for these sounds. Adding one stroke to the letter for a plain sound makes it the letter for the corresponding aspirated sound, and putting two identical letters for a plain sound together side by side leads to the letter for a tensed sound.
Plain sounds
Aspirated
sounds
Tensed sounds
 
Summarizing principles of forming letters for consonants, the basic letters were made in imitation of the shape of speech organs, and the others were made by adding a stroke to the basic letters while considering the similarity between sounds and their strength. There is no doubt that the scholars in the King Sejong era were great linguists who exactly analyzed and understood the Korean language of that period. They knew what sounds were there, and understood how the sounds were distinguished.

They decided letter shapes carefully to let the relationship between letters reflect the relationship between sounds. And they had an knowledge on which speech organ played a central role in pronouncing each consonant and what each speech organ looked like. It is a wonder how these were possible in that time, where there was no high-technology method such as X-ray.