Draw a 7/3 Heptagram (7-pointed star) within a tight bounding box using OpenGL. Seems simple enough. What's the catch?
The catch here was that the star and box both had to be able to be rotated at any arbitrary angle.
For the star, this was relatively simple. Just some basic trigonometry to calculate the location of each of the vertices.
The box, however, was an entirely different issue. For such a basic shape, calculating the position of the four corners was surprisingly difficult. I did eventually figure it out. "How?" you may ask. Well, I can't tell you yet. It's a trade secret.
Of all the ways to spend a Wednesday evening, programmatically drawing a tight bounding box around a 7/3 heptagram at an arbitrary angle using OpenGL was definitely a new one for me.
Comments