I am trying to create shadows by extending the vertices of a shape and drawing a polygon from the outer vertices.
I need a method to get all the outer vertices
Assuming someone wants to reinvent the wheel for learning purposes. (There are plenty of graphics engines around.) Intuitively, it seems necessary to make a simple ray tracer.
The other option is to make a more sophisticated ray tracer.