Energy of d(x²-y²) and d(xy) orbitals the same with respect to trigonal symmetry?

In the orbital splitting diagrams of trigonal planar and trigonal bipyramidal complexes the d$\_{x² - y²}$ and d$\_{xy}$ orbitals have the same energy. I have always assumed that this is because they have different, co-prime symmetry — $C\_4$ for the d orbitals, and $C\_3$ for the ligands — and that therefore the overlap of the orbitals with the triangularly spaced ligands would be the same, and furthermore, that the choice of orientation of the coordinate system with respect to rotation of the x and y axes within the xy plane, around the z axis was arbitrary.


I "calculated" this, and it turns out to not be true. I used GeoGebra to calculate the area of overlap of a square and a triangle, both centred at the origin, expecting it to be independent of the relative rotation of the objects around the origin.


Here's a picture:
[![GeoGebra overlap of square and circle](https://i.stack.imgur.com/OKkpY.png)](https://i.stack.imgur.com/OKkpY.png)


Here's the calculation: [GeoGebra document/project](https://www.geogebra.org/calculator/ddenehbq).


Details of how I made the construction are given below.


I want to know why these orbitals have the same energy if the overlap integral with the ligands is different. Or am I setting up this calculation incorrectly? I know that the orbitals have non-uniform density within the lobes, so the interaction goes up rapidly as they align with the ligand orbitals, but I would think that you could still make the symmetry argument, or else the choice of orientation of the x and y axes with respect to z is *not arbitrary*, which I think would cause a cascade of problems and choices to question.


\_\_\_\_ The construction \_\_\_\_


To make the square:


* Made point A at (1,0).
* From A, made point A' rotated by 90º around the origin.
* Constructed a regular polygon with 4 sides (poly1) using AA' as one side.


To make the triangle:


* Made point B rotated from A by angle "a", which is adjustable.
* Made B' rotated from B by 120º.
* Constructed a regular polygon with 3 sides "poly2" using BB'.


Found the intersection points of the sides of the square and the triangle: intersect(poly1,poly2).


Calculated the area of the polygon enclosed by those points: area(F,G,K,J,I,H).


"a" is an adjustable slider about halfway up, the area is down the bottom. I couldn't figure out how to put them near each other so that you can look at the area while changing the angle. I also couldn't figure out how to graph the area as a function of angle, but I assume that it would have to have $C\_{12}$ symmetry since it must have both $C\_4$ and $C\_3$ symmetry. GeoGebra looks pretty and seems powerful, but I find the interface incredibly obtuse


