In your code, there is an unnecessary calculation, on (sketch.js) line 27: const bisector = opposite / tan(PI - HALF_PI - TYPES[type].angle); Because: PI - HALF_PI = HALF_PI, so you can declare: const bisector = opposite / tan(HALF_PI - TYPES[type].angle); Oh, and I didn't really understand this part: return p5.Vector .sub(b, d) .rotate(-HALF_PI) .setMag(bisector) .add(d); I didn't understand why you subtracted, rotated, entered the size and then added the vector. I even watched your video at part 32:10, but I didn't understand.
In your code, there is an unnecessary calculation, on (sketch.js) line 27: const bisector = opposite / tan(PI - HALF_PI - TYPES[type].angle);
Because:
PI - HALF_PI = HALF_PI, so you can declare: const bisector = opposite / tan(HALF_PI - TYPES[type].angle);
Oh, and I didn't really understand this part:
return p5.Vector
.sub(b, d)
.rotate(-HALF_PI)
.setMag(bisector)
.add(d);
I didn't understand why you subtracted, rotated, entered the size and then added the vector.
I even watched your video at part 32:10, but I didn't understand.
Feel free to open a pull request on the repo for the fix