I am trying to design square gearset using MATLAB program. I have designed several ones (elliptical, eccentric, spiral, circular ....etc). But when I came to the square gears, I needed the relationships governor the dimensions of the square gearset. The radius of the rounded square and the center distance relationships to the side length of the square. I tried so much to found a reference talking about this square gears, but unfortunately no avail.

Please, I need help in this.

enter image description here