Wolfram Language

Crossing Count

Version 12 introduces CrossingCount to count how many times a ray starting from the point crosses the closed-curve contour. It is typically used to define a polygon from self-intersecting closed curves.

Color points based on the parity of the crossing count.

CrossingPolygon gives a polygon based on crossing counts.

Related Examples

de es fr ja ko pt-br zh