0

For a university assignment, I need to draw various shapes using a vertex array, and one such shape that they have asked for is a circle.

I know that I would need to use sf::TriangleFan but I'm not super experienced with SFML, so how would I go about this?

AnishG555
  • 1
  • 1
  • Please provide enough code so others can better understand or reproduce the problem. – Community Oct 28 '22 at 04:47
  • Step one: find or reinvent the formula for determining the vertex positions of a regular polygon. Step two: Create triangles for each "wedge" coming from the center and two adjacent edge vertices. Step 3: profit. – Botje Oct 28 '22 at 11:08
  • Alternatively, for step 1 cheat and use `sf::CircleShape::getPoint` to have your points calculated for you. – Botje Oct 28 '22 at 11:09

0 Answers0