Open yyuting opened 2 years ago
Hi, I am facing the same problem with the circles. When I change the fill color to a transparent color ([0, 0, 0, 0]) and have a circle with a nonzero stroke width, the circle is iteratively getting smaller and being lost. Any update on this issue?
@yyuting Were you able to solve your problem?
I am facing the same error while using squares instead of circles. Were you able to solve this issue @yyuting, @askaradeniz ?
Hi, I was trying to modify the single_circle_outline.py to optimize a ring shape by setting the fill color of a circle to None and using a nonzero stroke width. But the optimization never converges, and the radius of the circle always shrinks to a value smaller than 0. So I rendered a gradient map for pixel color wrt the radius parameter, and realize its value disagrees with finite-difference. Specifically, for the inner circle, its gradient has an opposite sign as in FD. I'm guessing it's a bug in the implementation, but also want to check whether this behavior is caused by the math derivation? Code that generates disagreeing gradient map for diffvg and finite diff:
Code to reproduce the non-convergent optimization (slight modification from single_circle_outline.py):