N is the number of threads. R is the thickness of the threads. Braids alternate each thread going over and under each other. The pens are weaved together by first drawing the parts under and then drawing the parts over.
This is a (Day Version) Thanks to lolucky for the original project!