the patterns are called “zellij” and there is a complex theory behind it. what you see here it is done manually. to start you can visit my behance page: https://www.behance.net/gallery/47885953/Zellij-obsession-Alphabet
but you can have similar results using the “Hankin’s pattern”, Daniel Shiffman did a tutorial on islamic star pattern, you can see it here: https://www.youtube.com/watch?v=sJ6pMLp_IaI