math - How would you calculate the sum of interior angles from a SVG path? -


for example, path 1 below:

<path d="m 35 50 l 35 35 l 90 90 z" fill="goldenrod"/> 

if contour closed (z-command) , simple polygon, sum of interior angles is

sa = 180 * (n - 2) 

where n number of vertices.

here 3 vertices, sa = 180

(it works concave polygons, not self-intesecting ones (they 'not simple'))


Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -