mirror of
https://github.com/visioncortex/vtracer.git
synced 2026-10-02 00:41:22 -07:00
A splice slice with very uneven point spacing — a few-pixel jog followed by a long straight leg, which the walker produces around thin strands — was fitted by a single cubic that interpolated every sample exactly while swinging up to ~30 px sideways between them (the fit error was only measured at the samples). On the Cityscape sample at -p 8 -g 28 the maroon strand's wall bulged across its 2 px gap; a long-standing defect present in pre-1.0 vtracer as well. The fix lives in visioncortex 0.9.1 (densify slices with witness points, keep the full multi-cubic chain): the mosaic's shared-boundary spline fitter switches to the new fit_points_with_beziers so open segments get the same treatment as stacked mode. Verified against the exact pixel-mode rasterization — the fitted wall now matches it at every probed row — with identical path counts and only +3 cubics across the whole Cityscape output. All three workspaces (core, py, nodejs) carry a [patch.crates-io] entry pointing at the local visioncortex until 0.9.1 is published. Regression coverage for spline handle anchoring; re-bless goldens tests/spline_fit.rs traces the real reproduction (the Cityscape sample at color precision 8 / gradient step 28, whose maroon region contains a 1 px by 330 px strand) through both compositors and asserts the property the sparse-slice bug violated: every cubic's control points stay within its shape's on-curve bounding box plus a 15 px allowance. The ballooning fit put a handle 25 px outside the whole shape, so the margin is decisive in both directions. The sample photo is decoded via a test-only image dev-dependency. The synthetic goldens are re-blessed: the fitting fix shifts fixture coordinates slightly (witness points refine fits even on clean shapes); the old files still passed the render-diff, so the visual change is sub-tolerance, but goldens should byte-match intentional behavior. Depend on published visioncortex 0.9.1; drop local path patches
7 lines
520 B
XML
7 lines
520 B
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!-- Generator: visioncortex VTracer 1.0.0-alpha.1 -->
|
|
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="48" height="48">
|
|
<path d="M0,0C16,0,32,0,48,0c0,16,0,32,0,48c-16,0-32,0-48,0C0,32,0,16,0,0Z" fill="#F0F0F0"/>
|
|
<path d="M35.31,12.06c3.79,4.14,5.85,8.38,5.6,14.09c-1,4.97-3.14,8.4-6.91,11.85c-4.31,2.33-8.33,3.47-13.19,2.5c-4.79-1.59-8.46-4-10.92-8.55c-1.83-4.63-2.32-8.33-.74-13.1c2.28-4.97,5.13-7.86,10.16-9.85c6.33-1.77,10.55-.34,16,3.06Z" fill="#C83C3C"/>
|
|
</svg>
|