Cody

Problem 43023. Remove collinear points in a set of 2D points defining a polygon

Created by Massimo Zanetti in Community

Consider a polygon that is obtained by joining a set of 2D points whose coordinates are stored in matrix P=[x,y]. Write a function that returns Q, reduced P, such that all collinear points are removed but the same polygon is obtained.

Solution Stats

87.5% Correct | 12.5% Incorrect
Last solution submitted on Dec 31, 2018

Solution Comments