Markichu / PythonAutoNifty

Automatically and programmatically generate drawing instructions for Nifty.Ink
MIT License
3 stars 0 forks source link

Hull calculation bug for random fractal #82

Open davidryan59 opened 3 years ago

davidryan59 commented 3 years ago

In the random vector shift fractal, it appears that hull diameter is calculating incorrectly. In the console it shows up as - hull 6 has 6 points, 1.37 min diameter and this number should be much closer to 2.00.

Screenshot of fractal with expand_factor=1, the dots should be (approx) touching but not overlapping.

Screenshot 2021-09-08 at 08 53 52
davidryan59 commented 3 years ago

Interestingly, the plot_hull_outline method appears to be OK

EL-S commented 3 years ago

Perhaps it is a scaling problem when you import it, check output.txt before importing, and also check drawingCanvas.current.getSaveData() after importing it. See if they are consistent with the canvas size, eg. brushRadius/width(or height). Did this maybe get fixed when I corrected the scaling brushRadius bug the other day?

davidryan59 commented 3 years ago

I think this error is internal to the fractals code, and I think it is a faulty convex hull calculation. I'll deal with this one.

davidryan59 commented 2 years ago

Low priority, but still worth a look later.