Permalink
Browse files

Code to demonstrate you can send a polynomial into the KnotVector.N_l…

…ocal function and get that segment of the basis vector back in polynomial form.
  • Loading branch information...
1 parent 37a408b commit 4ac512c8d441be40f88175e29b32305654f7c297 SF committed Oct 6, 2009
Showing with 4 additions and 1 deletion.
  1. +4 −1 playing-around.pl
View
@@ -54,5 +54,8 @@
say $kv.N(1, 0.5).perl;
say $kv.N(2, 0.5).perl;
say $kv.N(3, 0.5).perl;
-say $kv.Nnew(3, 0.5).perl;
+say $kv.Nnew(3, 1/2).perl;
+my @polys = $kv.N_local($kv.N0_index(1/2), 3, Polynomial.new(0, 1));
+@polys.map({ $_.say });
+@polys.map({ $_.evaluate(1/2).perl.say });

0 comments on commit 4ac512c

Please sign in to comment.