Skip to content

Polygonal Puzzle issue #31

@ChrisVilches

Description

@ChrisVilches

Polygon intersection is incorrect.

It was fixed in the Rust repository here:
https://github.com/ChrisVilches/Polygonal-Puzzle/blob/main/src/shapes/polygon.rs

One of the lines that looked like this (there were two):

if th2 > EPS && th2 < th - EPS {

was changed to:

if th2 >= 0_f64 && th2 < th - EPS {

And then it worked.

In the C++ solution in this repository, I still haven't updated the code.

Despite the intersection being wrong, the result was the same, because the polygon was very symmetric.

Correct result (before updating the line, one polygon was on top of the other one, intersecting at some vertices):

08

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions