Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two questions about path.js #645

Closed
nblthree opened this issue Mar 2, 2021 · 6 comments
Closed

Two questions about path.js #645

nblthree opened this issue Mar 2, 2021 · 6 comments

Comments

@nblthree
Copy link

nblthree commented Mar 2, 2021

I would like to know what this function does https://github.com/adobe-webplatform/Snap.svg/blob/master/src/path.js#L219-L237 and what are the Tvalues and Cvalues and how did you get them?

@ibrierley
Copy link
Collaborator

Good question, in the absence of a reply from Dmitry for the mo, it looks related to this code here (at the bottom)...and them being Legendre-Gauss weights ? I can't pretend to understand that stuff though! Just trying to head you in the right direction.

http://processingjs.nihongoresources.com/bezierinfo/sketchsource.php?sketch=cubicGaussQuadrature at

@ibrierley
Copy link
Collaborator

I'm not sure I should ask though, why do you want to know ? :D

@nblthree
Copy link
Author

nblthree commented Mar 2, 2021

@ibrierley just trying my luck on making the calculations more precise.

bpmn-io/path-intersection#17

@ibrierley
Copy link
Collaborator

Maybe if you go to https://pomax.github.io/bezierinfo/legendre-gauss.html#n18 and rather than select n = 12 (the one Snap uses), try n = 32 for example and copy the values for wi and xi eg at https://pomax.github.io/bezierinfo/legendre-gauss.html#n32 and then change the n value in the function to 32.

I think Tvalues are abscissa and Cvalues anre weight...maybe
Just guessing!

@ibrierley
Copy link
Collaborator

Or there's a function at the top of that page, and rewrite for js (there's probably solutions out there already though).

@nblthree
Copy link
Author

nblthree commented Mar 2, 2021

@ibrierley thanks you are right the problem occurs only in the other library

@nblthree nblthree closed this as completed Mar 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants