All Hamentashen that I've seen have three sides and all Hamentashen have filling.
Why is that?
Mi Yodeya is a question and answer site for those who base their lives on Jewish law and tradition and anyone interested in learning more. It only takes a minute to sign up.Sign up to join this community
Unfortunately, this is nothing more than a common misconception which stems from ignorance and from a lack of proper education in certain communities. Hamentashen are not required to have 3 sides. There's a famous derasha from the spelling of the word haman: just like a מ has 3 sides, a ה has two and a half, and a ן has one and a bit, so too a hamentashen: as long as it has one side and a bit of a second, it's permissible.
If it had four sides it would need tzitzis! (I can't take any credit for this answer: it's older than I am.)
Consider Rus 1:20–21:
אַל תִּקְרֶאנָה לִי נָעֳמִי קְרֶאןָ לִי מָרָא כִּי הֵמַר שקי לִי מְאֹד. אֲנִי מְלֵאָה הָלַכְתִּי וְרֵיקָם הֱשִׁיבַנִי ה׳
We see from there that that which might be expected to be filled but is in fact unfilled is bitter.
Hamentaschen, of course, are expected to be filled (ask anyone), so leaving them unfilled would make them bitter, and who wants to eat a bitter hamentasch?
Hamentashen comes from the words "Haman Tish" -- the Table of Haman in Yiddish.
Therefore, since there were three people by Haman's party they needed a three sided table (both Haman and Achashveirosh considered themselves to be the most important people in Persia and wouldn't want to sit with Esther).
The Hamentash represents the Table on which they (Haman,Esther and Achashveirosh) sat and the filling represents the food which they ate. (From where the custom to give a "last meal" came).
What food do royalty eat?
But there's an argument over what kind of Caviar did they eat, red caviar or black caviar.
So that's why there are two kinds of filling - poppy (representing black caviar) and jelly (representing red caviar).