Rotating triangle in opengl from one point

462 Views Asked by At

Can someone please advise how to rotate a triangle from its top vertice?

I want to make multiple triangles in a fan to make a circle with a common middle point, the top vertice of the triangle.

1

There are 1 best solutions below

0
On

You can rotate around a point by first translating with its inverse coordinate to the origin, then rotate by your angle and translate back to the reference point.

If you want to draw a circle consider using a triangle fan instead.