I was able to shorten the code for vertex creation. I accomplished that by reordering the data (back to front is now top to botom) and combining simillar for loops.
The only differences between the loops was:
- heightT1 was used in two loops
- I duplicated it: protoVertex[N].data[0][1] == protoVertex[N].data[1][1]
- sideNess was only used in one loop
- I introduced a new array scaledOutmostArr