Polar stroking: new theory and methods for stroking paths #295
Replies: 5 comments 45 replies
-
I agree that there is a lot of space for improvement for stroking, but we should be very careful not to jump into conclusions about the superiority of a particular algorithm without having it understood and compared to alternatives. After taking a brief look at the material linked, I don't see any data about how fast does their tessellation algorithm perform compared to offsetting / clipping. |
Beta Was this translation helpful? Give feedback.
-
No such things in there atm. So I think there is quite some room for optimization possibilities. |
Beta Was this translation helpful? Give feedback.
-
Hey, James (both of you, actually). I'm sorry for being unresponsive. The
end of the year was kinda hell busy at work. And now I'm on NY holidays and
away from keyboard for a week or so. If you can wait I will provide you
with any examples needed next week.
пн, 1 янв. 2024 г. в 06:17, James Jackson-South ***@***.***>:
… @hypeartist <https://github.com/hypeartist> Do you have your sample code
that you used to benchmark available. I'd like to start at the top and work
down.
—
Reply to this email directly, view it on GitHub
<#295 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA23HHCQBZSLYQJUPPRONEDYMITEZAVCNFSM6AAAAAA46IQMJOVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TSOBVHEYTK>
.
You are receiving this because you were mentioned.Message ID:
***@***.***
.com>
|
Beta Was this translation helpful? Give feedback.
-
@JimBobSquarePants Hi there! |
Beta Was this translation helpful? Give feedback.
-
The more I look into this the more I see the sheer scope of the work involved. It seems more like a complete rewrite which I cannot do. @antonfirsov Is there a reason why we don't split the work done by |
Beta Was this translation helpful? Give feedback.
-
Motivation
Almost all of the time we spend drawing polygons is taken up by offsetting and clipping the polygon to the given pen width. To be considered a first-class alternative to System.Drawing and SkiaSharp we must vastly improve the performance.
I've been doing some research in the area, and it appears that people at Nvidia have been working on an incredibly robust and performant solution to the problem of path stroking.
At the following link they present videos, documents and a CPU based implementation of an algorithm that can also be implemented on the GPU should we ever choose to follow that path (pun intended).
Abstract + Videos
https://dl.acm.org/doi/abs/10.1145/3386569.3392458
Paper
kilgard2020.pdf
I've attached a copy of the zip file containing an updated project file as the original has device specific paths for the boost library includes that are required for the demonstration program.
polar-stroking.zip
It's going to take a significant amount of effort to implement this in C# and I personally lack the skills to do it so will be looking for a lot of help.
Thoughts @SixLabors/core
Input from the community is most welcome.
Beta Was this translation helpful? Give feedback.
All reactions