|Anonymous | Login||10-21-2021 01:57 UTC|
|Main | My View | View Issues | Change Log | Docs|
|Viewing Issue Simple Details [ Jump to Notes ]||[ View Advanced ] [ Issue History ] [ Print ]|
|ID||Category||Severity||Reproducibility||Date Submitted||Last Update|
|0006991||[Squeak] Balloon||minor||always||03-24-08 10:30||03-26-08 01:41|
|Summary||0006991: Fix: Rendering artifacts when using Bezier shapes (MIT license)|
i spent a few hours implementing new morph (BezierMorph) , partly to
see how balloon draws bezier shapes, partly to be able to edit all
cubic bezier parameters.
What i found that at some specific point it produces a visual
artifacts by infinitely extending a single horizontal lines.
I found the cause of problem: It's in method Bezier3Segment>>asBezier2Points:.
When cubic segment being split to multiple quadratic ones, the last quadratic segment point is calculated by conversion, instead of taking already existing end point of cubic segment.
So, in case when shape is represented as a linked list of cubic segments the condition that end point of previous segment should match the starting point of next segment is not always fulfilled due to conversion inaccuracy.
This leads to appearing of a little gaps between segment endpoints and engine, while rendering, fills gap with infinite horizontal line in right direction from gap location.
Bezier3Segment-6991.cs [^] (823 bytes) 03-24-08 10:31
BezierMorph.st.gz [^] (2,756 bytes) 03-24-08 10:33
Bezier3Segment-fix.6991-2.cs [^] (1,805 bytes) 03-25-08 06:37
(0011950 - 100 - 100 - 100 - 100 - 100 - 100)
|In additional attachment you can find a BezierMorph class using which you can reproduce the problem.|
(0011955 - 440 - 482 - 482 - 482 - 482 - 482)
This sounds like a great bug find and repair. Could you include a sunit test to prove the patch.
It needs to fail before the patch is applied and pass afterwards.
I think it will be important in this case. There are a lot of rounding problems in the balloon stuff. Which means a lot of patches as they are fixed. When that happens, tests will help prevent loosing your fix.
Yours in service and curiosity, --Jerome Peace
(0011956 - 331 - 355 - 355 - 355 - 355 - 355)
In updated changeset you can find both fix and test case.
It fails without fix, and passes after it.
But take in account, that different CPUs/platforms may compute floating points differently, so my test case may not fail with 100% guarantee with old code.
But, of course, there is 100% guarantee that it can't fail after fix.
(0011957 - 226 - 289 - 289 - 289 - 289 - 289)
>In updated changeset you can find both fix and test case.
Cool. I wrote my note before playing with patch.
Even if it doesn't work in all platforms it helps.
Partial progress always counts.
|03-24-08 10:30||sig||New Issue|
|03-24-08 10:30||sig||Status||new => assigned|
|03-24-08 10:30||sig||Assigned To||=> andreas|
|03-24-08 10:31||sig||File Added: Bezier3Segment-6991.cs|
|03-24-08 10:33||sig||Note Added: 0011950|
|03-24-08 10:33||sig||File Added: BezierMorph.st.gz|
|03-25-08 03:06||wiz||Relationship added||child of 0006511|
|03-25-08 03:14||wiz||Note Added: 0011955|
|03-25-08 06:37||sig||File Added: Bezier3Segment-fix.6991-2.cs|
|03-25-08 06:41||sig||Note Added: 0011956|
|03-26-08 01:41||wiz||Note Added: 0011957|
| Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
58 total queries executed.|
38 unique queries executed.