-
Notifications
You must be signed in to change notification settings - Fork 64
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
planar NURBS curve with weights <> 1.0 not evaluating in plane #7
Comments
Dear Jonathan, In SISL the the weights are So if you multiple you x and y with w I think it will work. In the first version we only had B-spline, the approach above a representation in projective space made the introduction of NURBS very simple, only considering the rational representation when affisere coordinates were needed. Tor Sendt fra min iPhone Den 21. sep. 2016 kl. 13.07 skrev JochemvanderSpek <[email protected]mailto:[email protected]>: Hi, I'm having serious difficulty understanding what is happening with a curve that has weights that are not 1.0. This code for generating a circle: ` double coeffs[ 36 ] = { SISLCurve * curve = newCurve( 9, 3, knots, coeffs, 2, 3, 1 );` produces this curve: [screen shot 2016-09-21 at 12 49 34]https://cloud.githubusercontent.com/assets/16761743/18708501/619292c0-7ffb-11e6-95a4-1f21558edc09.png [screen shot 2016-09-21 at 13 01 28]https://cloud.githubusercontent.com/assets/16761743/18708528/8e98e58a-7ffb-11e6-82b4-770860432e52.png [screen shot 2016-09-21 at 13 01 38]https://cloud.githubusercontent.com/assets/16761743/18708533/939c5a58-7ffb-11e6-80ec-34f9d741ffad.png which is obviously not planar. tracing the code to s6ratder.c:161, it says: which seems to suggest the position is divided by the weight, which results in coordinates that are not in the xy plane. could anyone shed some light on this ? thank you ! Jonathan — |
allright, this was slightly surprising, but with some simple conversion functions I managed to keep things afloat. thanks ! |
Dear Jochem, This was a design decision taken 20 years ago based on efficiency of computations, that allows the denominator not be different from the other coordinates in most algorithms. We also store the projected coefficient in a array called rcoef (if I remember correctly). Tor From: JochemvanderSpek [mailto:[email protected]] allright, this was slightly surprising, but with some simple conversion functions I managed to keep things afloat. thanks ! — |
Hi,
I'm having serious difficulty understanding what is happening with a curve that has weights that are not 1.0. This code for generating a circle:
` double coeffs[ 36 ] = {
0.0, -radius, 0.1, 1.0,
-radius, -radius, 0.1, 0.707,
-radius, 0.0, 0.1, 1.0,
-radius, radius, 0.1, 0.707,
0.0, radius, 0.1, 1.0,
radius, radius, 0.1, 0.707,
radius, 0.0, 0.1, 1.0,
radius, -radius, 0.1, 0.707,
0.0, -radius, 0.1, 1.0
};
double knots[ 12 ] = {
0,
0,
0,
0.25,
0.25,
0.5,
0.5,
0.75,
0.75,
1,
1,
1
};
SISLCurve * curve = newCurve( 9, 3, knots, coeffs, 2, 3, 1 );`
produces this curve:
which is obviously not planar. tracing the code to s6ratder.c:161, it says:
gder[ki] = eder[ki] / w0;
which seems to suggest the position is divided by the weight, which results in coordinates that are not in the xy plane.
could anyone shed some light on this ?
thank you !
Jonathan
The text was updated successfully, but these errors were encountered: