Closed tristanryerparke closed 1 year ago
@tristanryerparke Do you solve this problem? I have some similar ideas based on the polylines rendering.
@WinKawaks I tried a bunch of different things, but never got it working. However, I found that one can use the from_svg_path
method upon initialization, and then edit or optimize the path.points tensor directly, this allowed for differentiable adjustment of the polyline.
In the single_curve.py and painterly_rendering.py examples I see that paths can be created from numpy arrays, with the points in the array representing end points and control points of a chain of quadratic bezier curves. In the single_path.py example a cubic bezier is specified from an svg string. However I don't see anywhere in the examples where a polyline is passed to the 'pydiffvg.Path()' constructor. I'd like to avoid converting my numpy array of points to an svg string and then using 'pydiffvg.from_svg_path' on each epoch. Is this possible? Thanks