]> Creatis software - CreaPhase.git/blob - octave_packages/nurbs-1.3.6/doc-cache
Add a useful package (from Source forge) for octave
[CreaPhase.git] / octave_packages / nurbs-1.3.6 / doc-cache
1 # Created by Octave 3.6.1, Wed Apr 04 09:02:21 2012 UTC <root@t61>
2 # name: cache
3 # type: cell
4 # rows: 3
5 # columns: 61
6 # name: <cell-element>
7 # type: sq_string
8 # elements: 1
9 # length: 8
10 basisfun
11
12
13 # name: <cell-element>
14 # type: sq_string
15 # elements: 1
16 # length: 722
17  BASISFUN:  Basis function for B-Spline
18
19  Calling Sequence:
20  
21    N = basisfun(iv,uv,p,U)
22    
23     INPUT:
24    
25       iv - knot span  ( from FindSpan() )
26       uv - parametric points
27       p  - spline degree
28       U  - knot sequence
29    
30     OUTPUT:
31    
32       N - Basis functions vector(numel(uv)*(p+1))
33    
34     Adapted from Algorithm A2.2 from 'The NURBS BOOK' pg70.
35
36  Copyright (C) 2000 Mark Spink
37  Copyright (C) 2007 Daniel Claxton
38  Copyright (C) 2009 Carlo de Falco
39
40     This program is free software: you can redistribute it and/or modify
41     it under the terms of the GNU General Public License as published by
42     the Free Software Foundation, either version 2 of the License, or
43     (at your option) any later version.
44
45
46
47 # name: <cell-element>
48 # type: sq_string
49 # elements: 1
50 # length: 40
51  BASISFUN:  Basis function for B-Spline
52
53
54
55
56 # name: <cell-element>
57 # type: sq_string
58 # elements: 1
59 # length: 11
60 basisfunder
61
62
63 # name: <cell-element>
64 # type: sq_string
65 # elements: 1
66 # length: 745
67  BASISFUNDER:  B-Spline Basis function derivatives.
68
69  Calling Sequence:
70  
71    ders = basisfunder (ii, pl, uu, k, nd)
72
73     INPUT:
74    
75       ii  - knot span index (see findspan)
76       pl  - degree of curve
77       uu  - parametric points
78       k   - knot vector
79       nd  - number of derivatives to compute
80
81     OUTPUT:
82    
83       ders - ders(n, i, :) (i-1)-th derivative at n-th point
84    
85     Adapted from Algorithm A2.3 from 'The NURBS BOOK' pg72.
86
87     Copyright (C) 2009,2011 Rafael Vazquez
88
89     This program is free software: you can redistribute it and/or modify
90     it under the terms of the GNU General Public License as published by
91     the Free Software Foundation, either version 2 of the License, or
92     (at your option) any later version.
93
94
95
96 # name: <cell-element>
97 # type: sq_string
98 # elements: 1
99 # length: 51
100  BASISFUNDER:  B-Spline Basis function derivatives.
101
102
103
104 # name: <cell-element>
105 # type: sq_string
106 # elements: 1
107 # length: 10
108 bspdegelev
109
110
111 # name: <cell-element>
112 # type: sq_string
113 # elements: 1
114 # length: 703
115  BSPDEGELEV:  Degree elevate a univariate B-Spline. 
116  
117  Calling Sequence:
118  
119    [ic,ik] = bspdegelev(d,c,k,t)
120  
121    INPUT:
122  
123    d - Degree of the B-Spline.
124    c - Control points, matrix of size (dim,nc).
125    k - Knot sequence, row vector of size nk.
126    t - Raise the B-Spline degree t times.
127  
128    OUTPUT:
129
130    ic - Control points of the new B-Spline. 
131    ik - Knot vector of the new B-Spline.
132  
133     Copyright (C) 2000 Mark Spink, 2007 Daniel Claxton
134
135     This program is free software: you can redistribute it and/or modify
136     it under the terms of the GNU General Public License as published by
137     the Free Software Foundation, either version 2 of the License, or
138     (at your option) any later version.
139
140
141
142 # name: <cell-element>
143 # type: sq_string
144 # elements: 1
145 # length: 51
146  BSPDEGELEV:  Degree elevate a univariate B-Spline.
147
148
149
150 # name: <cell-element>
151 # type: sq_string
152 # elements: 1
153 # length: 8
154 bspderiv
155
156
157 # name: <cell-element>
158 # type: sq_string
159 # elements: 1
160 # length: 766
161  BSPDERIV:  B-Spline derivative.
162  
163   MATLAB SYNTAX:
164  
165          [dc,dk] = bspderiv(d,c,k)
166   
167   INPUT:
168  
169     d - degree of the B-Spline
170     c - control points          double  matrix(mc,nc)
171     k - knot sequence           double  vector(nk)
172  
173   OUTPUT:
174  
175     dc - control points of the derivative     double  matrix(mc,nc)
176     dk - knot sequence of the derivative      double  vector(nk)
177  
178   Modified version of Algorithm A3.3 from 'The NURBS BOOK' pg98.
179
180     Copyright (C) 2000 Mark Spink, 2007 Daniel Claxton
181
182     This program is free software: you can redistribute it and/or modify
183     it under the terms of the GNU General Public License as published by
184     the Free Software Foundation, either version 2 of the License, or
185     (at your option) any later version.
186
187
188
189 # name: <cell-element>
190 # type: sq_string
191 # elements: 1
192 # length: 32
193  BSPDERIV:  B-Spline derivative.
194
195
196
197 # name: <cell-element>
198 # type: sq_string
199 # elements: 1
200 # length: 7
201 bspeval
202
203
204 # name: <cell-element>
205 # type: sq_string
206 # elements: 1
207 # length: 713
208  BSPEVAL:  Evaluate B-Spline at parametric points.
209  
210  Calling Sequence:
211  
212    p = bspeval(d,c,k,u)
213  
214     INPUT:
215  
216        d - Degree of the B-Spline.
217        c - Control Points, matrix of size (dim,nc).
218        k - Knot sequence, row vector of size nk.
219        u - Parametric evaluation points, row vector of size nu.
220  
221     OUTPUT:
222
223        p - Evaluated points, matrix of size (dim,nu)
224  
225     Copyright (C) 2000 Mark Spink, 2007 Daniel Claxton, 2010 C. de Falco
226
227     This program is free software: you can redistribute it and/or modify
228     it under the terms of the GNU General Public License as published by
229     the Free Software Foundation, either version 2 of the License, or
230     (at your option) any later version.
231
232
233
234 # name: <cell-element>
235 # type: sq_string
236 # elements: 1
237 # length: 50
238  BSPEVAL:  Evaluate B-Spline at parametric points.
239
240
241
242 # name: <cell-element>
243 # type: sq_string
244 # elements: 1
245 # length: 9
246 bspkntins
247
248
249 # name: <cell-element>
250 # type: sq_string
251 # elements: 1
252 # length: 855
253  BSPKNTINS:  Insert knots into a B-Spline
254
255  Calling Sequence:
256  
257    [ic,ik] = bspkntins(d,c,k,u)
258
259   INPUT:
260  
261     d - spline degree             integer
262     c - control points            double  matrix(mc,nc)      
263     k - knot sequence             double  vector(nk) 
264     u - new knots                 double  vector(nu)               
265  
266   OUTPUT:
267  
268     ic - new control points double  matrix(mc,nc+nu) 
269     ik - new knot sequence  double  vector(nk+nu)
270  
271   Modified version of Algorithm A5.4 from 'The NURBS BOOK' pg164.
272  
273     Copyright (C) 2000 Mark Spink, 2007 Daniel Claxton, 2010 Rafael Vazquez
274
275     This program is free software: you can redistribute it and/or modify
276     it under the terms of the GNU General Public License as published by
277     the Free Software Foundation, either version 2 of the License, or
278     (at your option) any later version.
279
280
281
282 # name: <cell-element>
283 # type: sq_string
284 # elements: 1
285 # length: 42
286  BSPKNTINS:  Insert knots into a B-Spline
287
288
289
290
291 # name: <cell-element>
292 # type: sq_string
293 # elements: 1
294 # length: 14
295 curvederivcpts
296
297
298 # name: <cell-element>
299 # type: sq_string
300 # elements: 1
301 # length: 970
302  Compute control points of n-th derivatives of a B-spline curve.
303  
304  usage: pk = curvederivcpts (n, p, U, P, d) 
305         pk = curvederivcpts (n, p, U, P, d, r1, r2) 
306
307  If r1, r2 are not given, all the control points are computed.
308
309   INPUT:
310          n+1 = number of control points
311          p   = degree of the spline
312          d   = maximum derivative order (d<=p)
313          U   = knots
314          P   = control points
315          r1  = first control point to compute
316          r2  = auxiliary index for the last control point to compute
317   OUTPUT:
318          pk(k,i) = i-th control point of (k-1)-th derivative, r1 <= i <= r2-k
319
320  Adaptation of algorithm A3.3 from the NURBS book, pg98.
321
322     Copyright (C) 2009 Carlo de Falco
323
324     This program is free software: you can redistribute it and/or modify
325     it under the terms of the GNU General Public License as published by
326     the Free Software Foundation, either version 2 of the License, or
327     (at your option) any later version.
328
329
330
331 # name: <cell-element>
332 # type: sq_string
333 # elements: 1
334 # length: 64
335  Compute control points of n-th derivatives of a B-spline curve.
336
337
338
339 # name: <cell-element>
340 # type: sq_string
341 # elements: 1
342 # length: 14
343 curvederiveval
344
345
346 # name: <cell-element>
347 # type: sq_string
348 # elements: 1
349 # length: 754
350
351  CURVEDERIVEVAL: Compute the derivatives of a B-spline curve.
352  
353  usage: ck = curvederiveval (n, p, U, P, u, d) 
354
355   INPUT: 
356
357         n+1 = number of control points
358         p   = spline order
359         U   = knots
360         P   = control points
361         u   = evaluation point
362         d   = derivative order
363
364   OUTPUT:
365
366         ck (k+1) =  curve differentiated k times
367
368  Adaptation of algorithm A3.4 from the NURBS book, pg99
369
370     Copyright (C) 2009 Carlo de Falco
371     Copyright (C) 2010 Rafael Vazquez
372
373     This program is free software: you can redistribute it and/or modify
374     it under the terms of the GNU General Public License as published by
375     the Free Software Foundation, either version 2 of the License, or
376     (at your option) any later version.
377
378
379
380 # name: <cell-element>
381 # type: sq_string
382 # elements: 1
383 # length: 62
384
385  CURVEDERIVEVAL: Compute the derivatives of a B-spline curve.
386
387
388
389 # name: <cell-element>
390 # type: sq_string
391 # elements: 1
392 # length: 7
393 deg2rad
394
395
396 # name: <cell-element>
397 # type: sq_string
398 # elements: 1
399 # length: 696
400  DEG2RAD: Convert degrees to radians.
401  
402  Calling Sequence:
403  
404    rad = deg2rad(deg);
405  
406  INPUT:
407  
408    deg          : Angle in degrees.
409
410  OUTPUT:
411  
412    rad          : Angle in radians. 
413  
414  Description:
415  
416    Convenient utility function for converting degrees to radians, which are
417    often the required angular units for functions in the NURBS toolbox.
418  
419  Examples:
420  
421    // Convert 35 degrees to radians
422    rad = deg2rad(35);
423
424     Copyright (C) 2000 Mark Spink
425
426     This program is free software: you can redistribute it and/or modify
427     it under the terms of the GNU General Public License as published by
428     the Free Software Foundation, either version 2 of the License, or
429     (at your option) any later version.
430
431
432
433 # name: <cell-element>
434 # type: sq_string
435 # elements: 1
436 # length: 37
437  DEG2RAD: Convert degrees to radians.
438
439
440
441 # name: <cell-element>
442 # type: sq_string
443 # elements: 1
444 # length: 8
445 findspan
446
447
448 # name: <cell-element>
449 # type: sq_string
450 # elements: 1
451 # length: 634
452  FINDSPAN  Find the span of a B-Spline knot vector at a parametric point
453
454  Calling Sequence:
455  
456    s = findspan(n,p,u,U)
457  
458   INPUT:
459  
460     n - number of control points - 1
461     p - spline degree
462     u - parametric point
463     U - knot sequence
464  
465   OUTPUT:
466  
467     s - knot span index
468
469   Modification of Algorithm A2.1 from 'The NURBS BOOK' pg68
470
471     Copyright (C) 2010 Rafael Vazquez
472
473     This program is free software: you can redistribute it and/or modify
474     it under the terms of the GNU General Public License as published by
475     the Free Software Foundation, either version 2 of the License, or
476     (at your option) any later version.
477
478
479
480 # name: <cell-element>
481 # type: sq_string
482 # elements: 1
483 # length: 73
484  FINDSPAN  Find the span of a B-Spline knot vector at a parametric point
485
486
487
488
489 # name: <cell-element>
490 # type: sq_string
491 # elements: 1
492 # length: 13
493 kntbrkdegmult
494
495
496 # name: <cell-element>
497 # type: sq_string
498 # elements: 1
499 # length: 917
500  KNTBRKDEGMULT: Construct an open knot vector by giving the sequence of
501                 knots, the degree and the multiplicity.
502
503    knots = kntbrkdegreg (breaks, degree)
504    knots = kntbrkdegreg (breaks, degree, mult)
505
506  INPUT:
507
508      breaks:  sequence of knots.
509      degree:  polynomial degree of the splines associated to the knot vector.
510      mult:    multiplicity of the knots.
511
512  OUTPUT:
513
514      knots:  knot vector.
515
516  If MULT has as many entries as BREAKS, or as the number of interior
517    knots, a different multiplicity will be assigned to each knot. If
518    MULT is not present, it will be taken equal to 1.
519
520  Copyright (C) 2010 Carlo de Falco, Rafael Vazquez
521
522     This program is free software: you can redistribute it and/or modify
523     it under the terms of the GNU General Public License as published by
524     the Free Software Foundation, either version 2 of the License, or
525     (at your option) any later version.
526
527
528
529 # name: <cell-element>
530 # type: sq_string
531 # elements: 1
532 # length: 80
533  KNTBRKDEGMULT: Construct an open knot vector by giving the sequence of
534         
535
536
537
538 # name: <cell-element>
539 # type: sq_string
540 # elements: 1
541 # length: 12
542 kntbrkdegreg
543
544
545 # name: <cell-element>
546 # type: sq_string
547 # elements: 1
548 # length: 939
549  KNTBRKDEGREG: Construct an open knot vector by giving the sequence of
550                 knots, the degree and the regularity.
551
552    knots = kntbrkdegreg (breaks, degree)
553    knots = kntbrkdegreg (breaks, degree, regularity)
554
555  INPUT:
556
557      breaks:     sequence of knots.
558      degree:     polynomial degree of the splines associated to the knot vector.
559      regularity: splines regularity.
560
561  OUTPUT:
562
563      knots:  knot vector.
564
565  If REGULARITY has as many entries as BREAKS, or as the number of interior
566    knots, a different regularity will be assigned to each knot. If
567    REGULARITY is not present, it will be taken equal to DEGREE-1.
568
569  Copyright (C) 2010 Carlo de Falco, Rafael Vazquez
570
571     This program is free software: you can redistribute it and/or modify
572     it under the terms of the GNU General Public License as published by
573     the Free Software Foundation, either version 2 of the License, or
574     (at your option) any later version.
575
576
577
578 # name: <cell-element>
579 # type: sq_string
580 # elements: 1
581 # length: 80
582  KNTBRKDEGREG: Construct an open knot vector by giving the sequence of
583          
584
585
586
587 # name: <cell-element>
588 # type: sq_string
589 # elements: 1
590 # length: 9
591 kntrefine
592
593
594 # name: <cell-element>
595 # type: sq_string
596 # elements: 1
597 # length: 1327
598  KNTREFINE: Refine a given knot vector by dividing each interval uniformly,
599              maintaining the continuity in previously existing knots.
600
601    [rknots]                  = kntrefine (knots, n_sub, degree, regularity)
602    [rknots, zeta]            = kntrefine (knots, n_sub, degree, regularity)
603    [rknots, zeta, new_knots] = kntrefine (knots, n_sub, degree, regularity)
604
605  INPUT:
606
607      knots:      initial knot vector.
608      n_sub:      number of new knots to be added in each interval.
609      degree:     polynomial degree of the refined knot vector
610      regularity: maximum global regularity 
611
612  OUTPUT:
613
614      rknots:    refined knot vector
615      zeta:      refined knot vector without repetitions
616      new_knots: new knots, to apply the knot insertion
617
618  The regularity at the new inserted knots is the one given by the user.
619  At previously existing knots, the regularity is the minimum
620   between the previous regularity, and the one given by the user.
621   This ensures optimal convergence rates in the context of IGA.
622
623  Copyright (C) 2010 Carlo de Falco, Rafael Vazquez
624
625     This program is free software: you can redistribute it and/or modify
626     it under the terms of the GNU General Public License as published by
627     the Free Software Foundation, either version 2 of the License, or
628     (at your option) any later version.
629
630
631
632 # name: <cell-element>
633 # type: sq_string
634 # elements: 1
635 # length: 80
636  KNTREFINE: Refine a given knot vector by dividing each interval uniformly,
637     
638
639
640
641 # name: <cell-element>
642 # type: sq_string
643 # elements: 1
644 # length: 10
645 kntuniform
646
647
648 # name: <cell-element>
649 # type: sq_string
650 # elements: 1
651 # length: 716
652  KNTUNIFORM: generate uniform open knot vectors in the reference domain.
653
654    [csi, zeta] = kntuniform (num, degree, regularity)
655
656  INPUT:
657      
658      num:        number of breaks (in each direction)
659      degree:     polynomial degree (in each direction)
660      regularity: global regularity (in each direction)
661
662  OUTPUT:
663
664      csi:  knots
665      zeta: breaks = knots without repetitions
666  
667  Copyright (C) 2009, 2010 Carlo de Falco
668  Copyright (C) 2011 Rafael Vazquez
669
670     This program is free software: you can redistribute it and/or modify
671     it under the terms of the GNU General Public License as published by
672     the Free Software Foundation, either version 2 of the License, or
673     (at your option) any later version.
674
675
676
677 # name: <cell-element>
678 # type: sq_string
679 # elements: 1
680 # length: 72
681  KNTUNIFORM: generate uniform open knot vectors in the reference domain.
682
683
684
685 # name: <cell-element>
686 # type: sq_string
687 # elements: 1
688 # length: 8
689 nrb4surf
690
691
692 # name: <cell-element>
693 # type: sq_string
694 # elements: 1
695 # length: 1088
696  
697  NRB4SURF: Constructs a NURBS bilinear surface.
698  
699  Calling Sequence:
700  
701    srf = nrb4surf(p11,p12,p21,p22)
702  
703  INPUT:
704  
705    p11          : Cartesian coordinate of the lhs bottom corner point.
706  
707    p12          : Cartesian coordinate of the rhs bottom corner point.
708  
709    p21          : Cartesian coordinate of the lhs top corner point.
710   
711    p22          : Cartesian coordinate of the rhs top corner point.
712
713  OUTPUT:
714  
715    srf          : NURBS bilinear surface, see nrbmak. 
716  
717  Description:
718  
719    Constructs a bilinear surface defined by four coordinates.
720  
721    The position of the corner points
722  
723           ^ V direction
724           |
725           ----------------
726           |p21        p22|
727           |              |
728           |    SRF       |
729           |              |
730           |p11        p12|
731           -------------------> U direction
732  
733
734     Copyright (C) 2000 Mark Spink
735
736     This program is free software: you can redistribute it and/or modify
737     it under the terms of the GNU General Public License as published by
738     the Free Software Foundation, either version 2 of the License, or
739     (at your option) any later version.
740
741
742
743 # name: <cell-element>
744 # type: sq_string
745 # elements: 1
746 # length: 49
747  
748  NRB4SURF: Constructs a NURBS bilinear surface.
749
750
751
752 # name: <cell-element>
753 # type: sq_string
754 # elements: 1
755 # length: 11
756 nrbbasisfun
757
758
759 # name: <cell-element>
760 # type: sq_string
761 # elements: 1
762 # length: 974
763  NRBBASISFUN: Basis functions for NURBS
764
765  Calling Sequence:
766  
767     B     = nrbbasisfun (u, crv)
768     B     = nrbbasisfun ({u, v}, srf)
769    [B, N] = nrbbasisfun ({u, v}, srf)
770    [B, N] = nrbbasisfun (p, srf)
771
772     INPUT:
773    
774       u or p(1,:,:)  - parametric points along u direction
775       v or p(2,:,:)  - parametric points along v direction
776       crv - NURBS curve
777       srf - NURBS surface
778    
779     OUTPUT:
780    
781       B - Value of the basis functions at the points
782           size(B)=[numel(u),(p+1)] for curves
783           or [numel(u)*numel(v), (p+1)*(q+1)] for surfaces
784
785       N - Indices of the basis functions that are nonvanishing at each
786           point. size(N) == size(B)
787    
788
789     Copyright (C) 2009 Carlo de Falco
790
791     This program is free software: you can redistribute it and/or modify
792     it under the terms of the GNU General Public License as published by
793     the Free Software Foundation, either version 2 of the License, or
794     (at your option) any later version.
795
796
797
798 # name: <cell-element>
799 # type: sq_string
800 # elements: 1
801 # length: 40
802  NRBBASISFUN: Basis functions for NURBS
803
804
805
806
807 # name: <cell-element>
808 # type: sq_string
809 # elements: 1
810 # length: 14
811 nrbbasisfunder
812
813
814 # name: <cell-element>
815 # type: sq_string
816 # elements: 1
817 # length: 1227
818  NRBBASISFUNDER:  NURBS basis functions derivatives
819
820  Calling Sequence:
821  
822    Bu          = nrbbasisfunder (u, crv)
823    [Bu, N]     = nrbbasisfunder (u, crv)
824    [Bu, Bv]    = nrbbasisfunder ({u, v}, srf)
825    [Bu, Bv, N] = nrbbasisfunder ({u, v}, srf)
826    [Bu, Bv, N] = nrbbasisfunder (p, srf)
827
828     INPUT:
829    
830       u or p(1,:,:)  - parametric points along u direction
831       v or p(2,:,:)  - parametric points along v direction
832       crv - NURBS curve
833       srf - NURBS surface
834    
835     OUTPUT:
836    
837       Bu - Basis functions derivatives WRT direction u
838            size(Bu)=[numel(u),(p+1)] for curves
839            or [numel(u)*numel(v), (p+1)*(q+1)] for surfaces
840
841       Bv - Basis functions derivatives WRT direction v
842            size(Bv)=[numel(v),(p+1)] for curves
843            or [numel(u)*numel(v), (p+1)*(q+1)] for surfaces
844
845       N - Indices of the basis functions that are nonvanishing at each
846           point. size(N) == size(B)
847    
848     Copyright (C) 2009 Carlo de Falco
849
850     This program is free software: you can redistribute it and/or modify
851     it under the terms of the GNU General Public License as published by
852     the Free Software Foundation, either version 2 of the License, or
853     (at your option) any later version.
854
855
856
857 # name: <cell-element>
858 # type: sq_string
859 # elements: 1
860 # length: 52
861  NRBBASISFUNDER:  NURBS basis functions derivatives
862
863
864
865
866 # name: <cell-element>
867 # type: sq_string
868 # elements: 1
869 # length: 7
870 nrbcirc
871
872
873 # name: <cell-element>
874 # type: sq_string
875 # elements: 1
876 # length: 999
877  
878  NRBCIRC: Construct a circular arc.
879  
880  Calling Sequence:
881  
882    crv = nrbcirc()
883    crv = nrbcirc(radius)
884    crv = nrbcirc(radius,center)
885    crv = nrbcirc(radius,center,sang,eang)
886  
887  INPUT:
888  
889    radius       : Radius of the circle, default 1.0
890  
891    center       : Center of the circle, default (0,0,0)
892  
893    sang : Start angle, default 0 radians (0 degrees)
894  
895    eang : End angle, default 2*pi radians (360 degrees)
896  
897  OUTPUT:
898
899    crv          : NURBS curve for a circular arc.
900  
901  Description:
902  
903    Constructs NURBS data structure for a circular arc in the x-y plane. If
904    no rhs arguments are supplied a unit circle with center (0.0,0.0) is
905    constructed. 
906  
907    Angles are defined as positive in the anti-clockwise direction.
908
909     Copyright (C) 2000 Mark Spink
910
911     This program is free software: you can redistribute it and/or modify
912     it under the terms of the GNU General Public License as published by
913     the Free Software Foundation, either version 2 of the License, or
914     (at your option) any later version.
915
916
917
918 # name: <cell-element>
919 # type: sq_string
920 # elements: 1
921 # length: 37
922  
923  NRBCIRC: Construct a circular arc.
924
925
926
927 # name: <cell-element>
928 # type: sq_string
929 # elements: 1
930 # length: 8
931 nrbcoons
932
933
934 # name: <cell-element>
935 # type: sq_string
936 # elements: 1
937 # length: 2143
938  
939  NRBCOONS: Construction of a Coons patch.
940  
941  Calling Sequence:
942  
943    srf = nrbcoons(ucrv1, ucrv2, vcrv1, vcrv2)
944  
945  INPUT:
946  
947    ucrv1        : NURBS curve defining the bottom U direction boundary of
948                 the constructed NURBS surface.
949  
950    ucrv2        : NURBS curve defining the top U direction boundary of
951                 the constructed NURBS surface.
952  
953    vcrv1        : NURBS curve defining the bottom V direction boundary of
954                 the constructed NURBS surface.
955  
956    vcrv2        : NURBS curve defining the top V direction boundary of
957                 the constructed NURBS surface.
958
959  OUTPUT:
960  
961    srf          : Coons NURBS surface patch.
962  
963  Description:
964  
965    Construction of a bilinearly blended Coons surface patch from four NURBS
966    curves that define the boundary.
967  
968    The orientation of the four NURBS boundary curves.
969  
970           ^ V direction
971           |
972           |     ucrv2
973           ------->--------
974           |              |
975           |              |
976     vcrv1 ^   Surface    ^ vcrv2
977           |              |
978           |              |
979           ------->-----------> U direction
980                 ucrv1
981  
982  
983  Examples:
984  
985    // Define four NURBS curves and construct a Coons surface patch.
986    pnts = [ 0.0  3.0  4.5  6.5 8.0 10.0;
987             0.0  0.0  0.0  0.0 0.0  0.0; 
988             2.0  2.0  7.0  4.0 7.0  9.0];   
989    crv1 = nrbmak(pnts, [0 0 0 1/3 0.5 2/3 1 1 1]);
990  
991    pnts= [ 0.0  3.0  5.0  8.0 10.0;
992            10.0 10.0 10.0 10.0 10.0;
993            3.0  5.0  8.0  6.0 10.0];
994    crv2 = nrbmak(pnts, [0 0 0 1/3 2/3 1 1 1]);
995  
996    pnts= [ 0.0 0.0 0.0 0.0;
997            0.0 3.0 8.0 10.0;
998            2.0 0.0 5.0 3.0];
999    crv3 = nrbmak(pnts, [0 0 0 0.5 1 1 1]);
1000  
1001    pnts= [ 10.0 10.0 10.0 10.0 10.0;
1002            0.0   3.0  5.0  8.0 10.0;
1003            9.0   7.0  7.0 10.0 10.0];
1004    crv4 = nrbmak(pnts, [0 0 0 0.25 0.75 1 1 1]);
1005  
1006    srf = nrbcoons(crv1, crv2, crv3, crv4);
1007    nrbplot(srf,[20 20],220,45);
1008
1009     Copyright (C) 2000 Mark Spink
1010
1011     This program is free software: you can redistribute it and/or modify
1012     it under the terms of the GNU General Public License as published by
1013     the Free Software Foundation, either version 2 of the License, or
1014     (at your option) any later version.
1015
1016
1017
1018 # name: <cell-element>
1019 # type: sq_string
1020 # elements: 1
1021 # length: 43
1022  
1023  NRBCOONS: Construction of a Coons patch.
1024
1025
1026
1027 # name: <cell-element>
1028 # type: sq_string
1029 # elements: 1
1030 # length: 15
1031 nrbcrvderiveval
1032
1033
1034 # name: <cell-element>
1035 # type: sq_string
1036 # elements: 1
1037 # length: 753
1038
1039  NRBCRVDERIVEVAL: Evaluate n-th order derivatives of a NURBS curve.
1040
1041  usage: skl = nrbcrvderiveval (crv, u, d) 
1042
1043    INPUT:
1044
1045    crv : NURBS curve structure, see nrbmak
1046
1047    u   : parametric coordinate of the points where we compute the derivatives
1048
1049    d   : number of partial derivatives to compute
1050
1051
1052    OUTPUT: 
1053
1054    ck (i, j, l) = i-th component derived j-1 times at the l-th point.
1055
1056  Adaptation of algorithm A4.2 from the NURBS book, pg127
1057
1058     Copyright (C) 2010 Carlo de Falco, Rafael Vazquez
1059
1060     This program is free software: you can redistribute it and/or modify
1061     it under the terms of the GNU General Public License as published by
1062     the Free Software Foundation, either version 2 of the License, or
1063     (at your option) any later version.
1064
1065
1066
1067 # name: <cell-element>
1068 # type: sq_string
1069 # elements: 1
1070 # length: 68
1071
1072  NRBCRVDERIVEVAL: Evaluate n-th order derivatives of a NURBS curve.
1073
1074
1075
1076 # name: <cell-element>
1077 # type: sq_string
1078 # elements: 1
1079 # length: 11
1080 nrbctrlplot
1081
1082
1083 # name: <cell-element>
1084 # type: sq_string
1085 # elements: 1
1086 # length: 662
1087  NRBCTRLPLOT: Plot a NURBS entity along with its control points.
1088  
1089  Calling Sequence:
1090  
1091    nrbctrlplot (nurbs)
1092  
1093  INPUT:
1094  
1095    nurbs: NURBS curve or surface, see nrbmak.
1096  
1097  Example:
1098
1099    Plot the test curve and test surface with their control polygon and
1100     control net, respectively
1101
1102    nrbctrlplot(nrbtestcrv)
1103    nrbctrlplot(nrbtestsrf)
1104
1105  See also:
1106  
1107    nrbkntplot
1108
1109     Copyright (C) 2011 Rafael Vazquez
1110
1111     This program is free software: you can redistribute it and/or modify
1112     it under the terms of the GNU General Public License as published by
1113     the Free Software Foundation, either version 2 of the License, or
1114     (at your option) any later version.
1115
1116
1117
1118 # name: <cell-element>
1119 # type: sq_string
1120 # elements: 1
1121 # length: 64
1122  NRBCTRLPLOT: Plot a NURBS entity along with its control points.
1123
1124
1125
1126 # name: <cell-element>
1127 # type: sq_string
1128 # elements: 1
1129 # length: 9
1130 nrbcylind
1131
1132
1133 # name: <cell-element>
1134 # type: sq_string
1135 # elements: 1
1136 # length: 988
1137  
1138  NRBCYLIND: Construct a cylinder or cylindrical patch.
1139  
1140  Calling Sequence:
1141  
1142    srf = nrbcylind()
1143    srf = nrbcylind(height)
1144    srf = nrbcylind(height,radius)
1145    srf = nrbcylind(height,radius,center)
1146    srf = nrbcylind(height,radius,center,sang,eang)
1147  
1148  INPUT:
1149  
1150    height       : Height of the cylinder along the axis, default 1.0
1151  
1152    radius       : Radius of the cylinder, default 1.0
1153  
1154    center       : Center of the cylinder, default (0,0,0)
1155  
1156    sang : Start angle relative to the origin, default 0.
1157  
1158    eang : End angle relative to the origin, default 2*pi.
1159
1160  OUTPUT: 
1161
1162    srf     : cylindrical surface patch 
1163  
1164  Description:
1165  
1166    Construct a cylinder or cylindrical patch by extruding a circular arc.
1167
1168     Copyright (C) 2000 Mark Spink
1169
1170     This program is free software: you can redistribute it and/or modify
1171     it under the terms of the GNU General Public License as published by
1172     the Free Software Foundation, either version 2 of the License, or
1173     (at your option) any later version.
1174
1175
1176
1177 # name: <cell-element>
1178 # type: sq_string
1179 # elements: 1
1180 # length: 56
1181  
1182  NRBCYLIND: Construct a cylinder or cylindrical patch.
1183
1184
1185
1186 # name: <cell-element>
1187 # type: sq_string
1188 # elements: 1
1189 # length: 10
1190 nrbdegelev
1191
1192
1193 # name: <cell-element>
1194 # type: sq_string
1195 # elements: 1
1196 # length: 1358
1197  
1198  NRBDEGELEV: Elevate the degree of the NURBS curve, surface or volume.
1199  
1200  Calling Sequence:
1201  
1202    ecrv = nrbdegelev(crv,utimes);
1203    esrf = nrbdegelev(srf,[utimes,vtimes]);
1204    evol = nrbdegelev(vol,[utimes,vtimes,wtimes]);
1205  
1206  INPUT:
1207  
1208    crv          : NURBS curve, see nrbmak.
1209  
1210    srf          : NURBS surface, see nrbmak.
1211  
1212    vol          : NURBS volume, see nrbmak.
1213  
1214    utimes       : Increase the degree along U direction utimes.
1215  
1216    vtimes       : Increase the degree along V direction vtimes.
1217  
1218    wtimes       : Increase the degree along W direction vtimes.
1219
1220  OUTPUT:
1221
1222    ecrv : new NURBS structure for a curve with degree elevated.
1223  
1224    esrf : new NURBS structure for a surface with degree elevated.
1225  
1226    evol : new NURBS structure for a volume with degree elevated.
1227  
1228  
1229  Description:
1230  
1231    Degree elevates the NURBS curve or surface. This function uses the
1232    B-Spline function bspdegelev, which interface to an internal 'C'
1233    routine.
1234  
1235  Examples:
1236  
1237    Increase the NURBS surface twice along the V direction.
1238    esrf = nrbdegelev(srf, [0, 2]); 
1239  
1240  See also:
1241  
1242    bspdegelev
1243
1244     Copyright (C) 2000 Mark Spink, 2010 Rafel Vazquez
1245
1246     This program is free software: you can redistribute it and/or modify
1247     it under the terms of the GNU General Public License as published by
1248     the Free Software Foundation, either version 2 of the License, or
1249     (at your option) any later version.
1250
1251
1252
1253 # name: <cell-element>
1254 # type: sq_string
1255 # elements: 1
1256 # length: 72
1257  
1258  NRBDEGELEV: Elevate the degree of the NURBS curve, surface or volume.
1259
1260
1261
1262 # name: <cell-element>
1263 # type: sq_string
1264 # elements: 1
1265 # length: 8
1266 nrbderiv
1267
1268
1269 # name: <cell-element>
1270 # type: sq_string
1271 # elements: 1
1272 # length: 1370
1273  
1274  NRBDERIV: Construct the first and second derivative representation of a
1275            NURBS curve, surface or volume.
1276  
1277  Calling Sequence:
1278  
1279    ders = nrbderiv (nrb);
1280    [ders, ders2] = nrbderiv (nrb);
1281  
1282  INPUT:
1283  
1284    nrb          : NURBS data structure, see nrbmak.
1285
1286  OUTPUT:
1287  
1288    ders:  A data structure that represents the first
1289                     derivatives of a NURBS curve, surface or volume.
1290    ders2: A data structure that represents the second
1291                     derivatives of a NURBS curve, surface or volume.
1292  
1293  Description:
1294  
1295    The derivatives of a B-Spline are themselves a B-Spline of lower degree,
1296    giving an efficient means of evaluating multiple derivatives. However,
1297    although the same approach can be applied to NURBS, the situation for
1298    NURBS is more complex. We have followed in this function the same idea
1299    that was already used for the first derivative in the function nrbderiv.
1300    The second derivative data structure can be evaluated later with the
1301    function nrbdeval.
1302  
1303  See also:
1304  
1305        nrbdeval
1306
1307  Copyright (C) 2000 Mark Spink
1308  Copyright (C) 2010 Carlo de Falco
1309  Copyright (C) 2010, 2011 Rafael Vazquez
1310
1311     This program is free software: you can redistribute it and/or modify
1312     it under the terms of the GNU General Public License as published by
1313     the Free Software Foundation, either version 2 of the License, or
1314     (at your option) any later version.
1315
1316
1317
1318 # name: <cell-element>
1319 # type: sq_string
1320 # elements: 1
1321 # length: 80
1322  
1323  NRBDERIV: Construct the first and second derivative representation of a
1324      
1325
1326
1327
1328 # name: <cell-element>
1329 # type: sq_string
1330 # elements: 1
1331 # length: 8
1332 nrbdeval
1333
1334
1335 # name: <cell-element>
1336 # type: sq_string
1337 # elements: 1
1338 # length: 1418
1339  NRBDEVAL: Evaluation of the derivative and second derivatives of NURBS curve, surface or volume.
1340
1341      [pnt, jac] = nrbdeval (crv, dcrv, tt)
1342      [pnt, jac] = nrbdeval (srf, dsrf, {tu tv})
1343      [pnt, jac] = nrbdeval (vol, dvol, {tu tv tw})
1344      [pnt, jac, hess] = nrbdeval (crv, dcrv, dcrv2, tt)
1345      [pnt, jac, hess] = nrbdeval (srf, dsrf, dsrf2, {tu tv})
1346      [pnt, jac, hess] = nrbdeval (vol, dvol, {tu tv tw})
1347
1348  INPUTS:
1349
1350    crv,   srf,   vol   - original NURBS curve, surface or volume.
1351    dcrv,  dsrf,  dvol  - NURBS derivative representation of crv, srf 
1352                           or vol (see nrbderiv2)
1353    dcrv2, dsrf2, dvol2 - NURBS second derivative representation of crv,
1354                           srf or vol (see nrbderiv2)
1355    tt     - parametric evaluation points
1356             If the nurbs is a surface or a volume then tt is a cell
1357             {tu, tv} or {tu, tv, tw} are the parametric coordinates
1358
1359  OUTPUT:
1360
1361    pnt  - evaluated points.
1362    jac  - evaluated first derivatives (Jacobian).
1363    hess - evaluated second derivatives (Hessian).
1364
1365  Copyright (C) 2000 Mark Spink 
1366  Copyright (C) 2010 Carlo de Falco
1367  Copyright (C) 2010, 2011 Rafael Vazquez
1368
1369     This program is free software: you can redistribute it and/or modify
1370     it under the terms of the GNU General Public License as published by
1371     the Free Software Foundation, either version 2 of the License, or
1372     (at your option) any later version.
1373
1374
1375
1376 # name: <cell-element>
1377 # type: sq_string
1378 # elements: 1
1379 # length: 80
1380  NRBDEVAL: Evaluation of the derivative and second derivatives of NURBS curve, s
1381
1382
1383
1384 # name: <cell-element>
1385 # type: sq_string
1386 # elements: 1
1387 # length: 7
1388 nrbeval
1389
1390
1391 # name: <cell-element>
1392 # type: sq_string
1393 # elements: 1
1394 # length: 1803
1395  
1396  NRBEVAL: Evaluate a NURBS at parametric points.
1397  
1398  Calling Sequences:
1399  
1400    [p,w] = nrbeval(crv,ut)
1401    [p,w] = nrbeval(srf,{ut,vt})
1402    [p,w] = nrbeval(vol,{ut,vt,wt})
1403    [p,w] = nrbeval(srf,pts)
1404  
1405  INPUT:
1406  
1407    crv          : NURBS curve, see nrbmak.
1408  
1409    srf          : NURBS surface, see nrbmak.
1410
1411    vol          : NURBS volume, see nrbmak.
1412  
1413    ut           : Parametric evaluation points along U direction.
1414
1415    vt           : Parametric evaluation points along V direction.
1416  
1417    wt           : Parametric evaluation points along W direction.
1418
1419    pts     : Array of scattered points in parametric domain
1420  
1421  OUTPUT:
1422
1423    p            : Evaluated points on the NURBS curve, surface or volume as 
1424                 Cartesian coordinates (x,y,z). If w is included on the lhs argument
1425                 list the points are returned as homogeneous coordinates (wx,wy,wz).
1426  
1427    w            : Weights of the homogeneous coordinates of the evaluated
1428                 points. Note inclusion of this argument changes the type 
1429                 of coordinates returned in p (see above).
1430  
1431  Description:
1432  
1433    Evaluation of NURBS curves, surfaces or volume at parametric points along  
1434    the U, V and W directions. Either homogeneous coordinates are returned
1435    if the weights are requested in the lhs arguments, or as Cartesian coordinates.
1436    This function utilises the 'C' interface bspeval.
1437  
1438  Examples:
1439  
1440    Evaluate the NURBS circle at twenty points from 0.0 to 1.0
1441  
1442    nrb = nrbcirc;
1443    ut = linspace(0.0,1.0,20);
1444    p = nrbeval(nrb,ut);
1445  
1446  See also:
1447   
1448      bspeval
1449
1450  Copyright (C) 2000 Mark Spink 
1451  Copyright (C) 2010 Carlo de Falco
1452  Copyright (C) 2010, 2011 Rafael Vazquez
1453
1454     This program is free software: you can redistribute it and/or modify
1455     it under the terms of the GNU General Public License as published by
1456     the Free Software Foundation, either version 2 of the License, or
1457     (at your option) any later version.
1458
1459
1460
1461 # name: <cell-element>
1462 # type: sq_string
1463 # elements: 1
1464 # length: 50
1465  
1466  NRBEVAL: Evaluate a NURBS at parametric points.
1467
1468
1469
1470 # name: <cell-element>
1471 # type: sq_string
1472 # elements: 1
1473 # length: 9
1474 nrbexport
1475
1476
1477 # name: <cell-element>
1478 # type: sq_string
1479 # elements: 1
1480 # length: 690
1481
1482  NRBEXPORT: export NURBS geometries to a format compatible with the one used in GeoPDEs (version 0.6).
1483  
1484  Calling Sequence:
1485  
1486    nrbexport (nurbs, filename);
1487  
1488  INPUT:
1489  
1490    nurbs    : NURBS curve, surface or volume, see nrbmak.
1491    filename : name of the output file.
1492  
1493  
1494  Description:
1495  
1496    The data of the nurbs structure is written in the file, in a format 
1497      that can be read by GeoPDEs.
1498
1499     Copyright (C) 2011 Rafael Vazquez
1500
1501     This program is free software: you can redistribute it and/or modify
1502     it under the terms of the GNU General Public License as published by
1503     the Free Software Foundation, either version 2 of the License, or
1504     (at your option) any later version.
1505
1506
1507
1508 # name: <cell-element>
1509 # type: sq_string
1510 # elements: 1
1511 # length: 80
1512
1513  NRBEXPORT: export NURBS geometries to a format compatible with the one used in
1514
1515
1516
1517 # name: <cell-element>
1518 # type: sq_string
1519 # elements: 1
1520 # length: 10
1521 nrbextract
1522
1523
1524 # name: <cell-element>
1525 # type: sq_string
1526 # elements: 1
1527 # length: 1011
1528
1529  NRBEXTRACT: construct NURBS curves by extracting the boundaries of a NURBS surface, or NURBS surfaces by extracting the boundary of a NURBS volume.
1530  
1531  Calling Sequence:
1532  
1533    crvs = nrbextract(surf);
1534  
1535  INPUT:
1536  
1537    surf        : NURBS surface or volume, see nrbmak.
1538  
1539  OUTPUT: 
1540  
1541    crvs        : array of NURBS curves or NURBS surfaces extracted.
1542  
1543  Description:
1544  
1545   Constructs either an array of four NURBS curves, by extracting the boundaries
1546   of a NURBS surface, or an array of six surfaces, by extracting the boundaries
1547   of a NURBS volume. The new entities are ordered in the following way
1548
1549     1: U = 0
1550     2: U = 1
1551     3: V = 0
1552     4: V = 1
1553     5: W = 0 (only for volumes)
1554     6: W = 1 (only for volumes)
1555
1556     Copyright (C) 2010 Rafael Vazquez
1557
1558     This program is free software: you can redistribute it and/or modify
1559     it under the terms of the GNU General Public License as published by
1560     the Free Software Foundation, either version 2 of the License, or
1561     (at your option) any later version.
1562
1563
1564
1565 # name: <cell-element>
1566 # type: sq_string
1567 # elements: 1
1568 # length: 80
1569
1570  NRBEXTRACT: construct NURBS curves by extracting the boundaries of a NURBS sur
1571
1572
1573
1574 # name: <cell-element>
1575 # type: sq_string
1576 # elements: 1
1577 # length: 10
1578 nrbextrude
1579
1580
1581 # name: <cell-element>
1582 # type: sq_string
1583 # elements: 1
1584 # length: 1243
1585
1586  NRBEXTRUDE: Construct a NURBS surface by extruding a NURBS curve, or 
1587   construct a NURBS volume by extruding a NURBS surface.
1588  
1589  Calling Sequence:
1590  
1591    srf = nrbextrude(crv,vec);
1592  
1593  INPUT:
1594  
1595    crv          : NURBS curve or surface to extrude, see nrbmak.
1596  
1597    vec          : Vector along which the entity is extruded.
1598
1599  OUTPUT: 
1600  
1601    srf          : NURBS surface or volume constructed.
1602  
1603  Description:
1604  
1605    Constructs either a NURBS surface by extruding a NURBS curve along a  
1606    defined vector, or a NURBS volume by extruding a NURBS surface. In the 
1607    first case, the NURBS curve forms the U direction of the surface edge, and
1608    is extruded along the vector in the V direction. In the second case, the 
1609    original surface forms the U and V direction of the volume, and is extruded
1610    along the W direction.
1611
1612  Examples:
1613  
1614    Form a hollow cylinder by extruding a circle along the z-axis.
1615
1616    srf = nrbextrude(nrbcirc, [0,0,1]);
1617
1618     Copyright (C) 2000 Mark Spink
1619     Copyright (C) 2010 Rafael Vazquez
1620
1621     This program is free software: you can redistribute it and/or modify
1622     it under the terms of the GNU General Public License as published by
1623     the Free Software Foundation, either version 2 of the License, or
1624     (at your option) any later version.
1625
1626
1627
1628 # name: <cell-element>
1629 # type: sq_string
1630 # elements: 1
1631 # length: 80
1632
1633  NRBEXTRUDE: Construct a NURBS surface by extruding a NURBS curve, or 
1634   constr
1635
1636
1637
1638 # name: <cell-element>
1639 # type: sq_string
1640 # elements: 1
1641 # length: 9
1642 nrbkntins
1643
1644
1645 # name: <cell-element>
1646 # type: sq_string
1647 # elements: 1
1648 # length: 1961
1649  
1650  NRBKNTINS: Insert a single or multiple knots into a NURBS curve,
1651             surface or volume.
1652  
1653  Calling Sequence:
1654  
1655    icrv = nrbkntins(crv,iuknots);
1656    isrf = nrbkntins(srf,{iuknots ivknots});
1657    ivol = nrbkntins(vol,{iuknots ivknots iwknots});
1658  
1659  INPUT:
1660  
1661    crv          : NURBS curve, see nrbmak.
1662  
1663    srf          : NURBS surface, see nrbmak.
1664  
1665    srf          : NURBS volume, see nrbmak.
1666  
1667    iuknots      : Knots to be inserted along U direction.
1668  
1669    ivknots      : Knots to be inserted along V direction.
1670  
1671    iwknots      : Knots to be inserted along W direction.
1672  
1673  OUTPUT:
1674  
1675    icrv : new NURBS structure for a curve with knots inserted.
1676  
1677    isrf : new NURBS structure for a surface with knots inserted.
1678  
1679    ivol : new NURBS structure for a volume with knots inserted.
1680  
1681  Description:
1682  
1683    Inserts knots into the NURBS data structure, these can be knots at
1684    new positions or at the location of existing knots to increase the
1685    multiplicity. Note that the knot multiplicity cannot be increased
1686    beyond the order of the spline. Knots along the V direction can only
1687    inserted into NURBS surfaces, not curve that are always defined along
1688    the U direction. This function use the B-Spline function bspkntins,
1689    which interfaces to an internal 'C' routine.
1690  
1691  Examples:
1692  
1693    Insert two knots into a curve, one at 0.3 and another
1694    twice at 0.4
1695
1696    icrv = nrbkntins(crv, [0.3 0.4 0.4])
1697  
1698    Insert into a surface two knots as (1) into the U knot
1699    sequence and one knot into the V knot sequence at 0.5.
1700
1701    isrf = nrbkntins(srf, {[0.3 0.4 0.4] [0.5]})
1702  
1703  See also:
1704  
1705    bspkntins
1706
1707  Note:
1708
1709    No knot multiplicity will be increased beyond the order of the spline.
1710
1711     Copyright (C) 2000 Mark Spink, 2010 Rafael Vazquez
1712
1713     This program is free software: you can redistribute it and/or modify
1714     it under the terms of the GNU General Public License as published by
1715     the Free Software Foundation, either version 2 of the License, or
1716     (at your option) any later version.
1717
1718
1719
1720 # name: <cell-element>
1721 # type: sq_string
1722 # elements: 1
1723 # length: 80
1724  
1725  NRBKNTINS: Insert a single or multiple knots into a NURBS curve,
1726             
1727
1728
1729
1730 # name: <cell-element>
1731 # type: sq_string
1732 # elements: 1
1733 # length: 10
1734 nrbkntplot
1735
1736
1737 # name: <cell-element>
1738 # type: sq_string
1739 # elements: 1
1740 # length: 582
1741  NRBKNTPLOT: Plot a NURBS entity with the knots subdivision.
1742  
1743  Calling Sequence:
1744  
1745    nrbkntplot(nurbs)
1746  
1747  INPUT:
1748  
1749    nurbs: NURBS curve, surface or volume, see nrbmak.
1750  
1751  Example:
1752
1753    Plot the test surface with its knot vector
1754
1755    nrbkntplot(nrbtestsrf)
1756
1757  See also:
1758  
1759    nrbctrlplot
1760
1761     Copyright (C) 2011 Rafael Vazquez
1762
1763     This program is free software: you can redistribute it and/or modify
1764     it under the terms of the GNU General Public License as published by
1765     the Free Software Foundation, either version 2 of the License, or
1766     (at your option) any later version.
1767
1768
1769
1770 # name: <cell-element>
1771 # type: sq_string
1772 # elements: 1
1773 # length: 60
1774  NRBKNTPLOT: Plot a NURBS entity with the knots subdivision.
1775
1776
1777
1778 # name: <cell-element>
1779 # type: sq_string
1780 # elements: 1
1781 # length: 7
1782 nrbline
1783
1784
1785 # name: <cell-element>
1786 # type: sq_string
1787 # elements: 1
1788 # length: 762
1789  
1790  NRBLINE: Construct a straight line.
1791  
1792  Calling Sequence:
1793  
1794    crv = nrbline()
1795    crv = nrbline(p1,p2)
1796  
1797  INPUT:
1798  
1799  p1             : 2D or 3D cartesian coordinate of the start point.
1800  
1801  p2            : 2D or 3D cartesian coordinate of the end point.
1802
1803  OUTPUT:
1804  
1805  crv            : NURBS curve for a straight line.
1806  
1807  Description:
1808  
1809    Constructs NURBS data structure for a straight line. If no rhs 
1810    coordinates are included the function returns a unit straight
1811    line along the x-axis.
1812
1813     Copyright (C) 2000 Mark Spink
1814
1815     This program is free software: you can redistribute it and/or modify
1816     it under the terms of the GNU General Public License as published by
1817     the Free Software Foundation, either version 2 of the License, or
1818     (at your option) any later version.
1819
1820
1821
1822 # name: <cell-element>
1823 # type: sq_string
1824 # elements: 1
1825 # length: 38
1826  
1827  NRBLINE: Construct a straight line.
1828
1829
1830
1831 # name: <cell-element>
1832 # type: sq_string
1833 # elements: 1
1834 # length: 6
1835 nrbmak
1836
1837
1838 # name: <cell-element>
1839 # type: sq_string
1840 # elements: 1
1841 # length: 3867
1842
1843  NRBMAK: Construct the NURBS structure given the control points
1844             and the knots.
1845  
1846  Calling Sequence:
1847  
1848    nurbs   = nrbmak(cntrl,knots);
1849  
1850  INPUT:
1851  
1852    cntrl       : Control points, these can be either Cartesian or
1853                 homogeneous coordinates.
1854  
1855                 For a curve the control points are represented by a
1856                 matrix of size (dim,nu), for a surface a multidimensional
1857                 array of size (dim,nu,nv), for a volume a multidimensional array
1858                 of size (dim,nu,nv,nw). Where nu is number of points along
1859                 the parametric U direction, nv the number of points along
1860                 the V direction and nw the number of points along the W direction. 
1861                 dim is the dimension. Valid options
1862                 are
1863                 2 .... (x,y)        2D Cartesian coordinates
1864                 3 .... (x,y,z)      3D Cartesian coordinates
1865                 4 .... (wx,wy,wz,w) 4D homogeneous coordinates
1866  
1867    knots        : Non-decreasing knot sequence spanning the interval
1868                [0.0,1.0]. It's assumed that the geometric entities
1869                are clamped to the start and end control points by knot
1870                multiplicities equal to the spline order (open knot vector).
1871                For curve knots form a vector and for surfaces (volumes)
1872                the knots are stored by two (three) vectors for U and V (and W)
1873                in a cell structure {uknots vknots} ({uknots vknots wknots}).
1874                
1875  OUTPUT:
1876  
1877    nurbs        : Data structure for representing a NURBS entity
1878  
1879  NURBS Structure:
1880  
1881    Both curves and surfaces are represented by a structure that is
1882    compatible with the Spline Toolbox from Mathworks
1883  
1884         nurbs.form   .... Type name 'B-NURBS'
1885         nurbs.dim    .... Dimension of the control points
1886         nurbs.number .... Number of Control points
1887        nurbs.coefs  .... Control Points
1888        nurbs.order  .... Order of the spline
1889        nurbs.knots  .... Knot sequence
1890  
1891    Note: the control points are always converted and stored within the
1892    NURBS structure as 4D homogeneous coordinates. A curve is always stored 
1893    along the U direction, and the vknots element is an empty matrix. For
1894    a surface the spline order is a vector [du,dv] containing the order
1895    along the U and V directions respectively. For a volume the order is
1896    a vector [du dv dw]. Recall that order = degree + 1.
1897  
1898  Description:
1899  
1900    This function is used as a convenient means of constructing the NURBS
1901    data structure. Many of the other functions in the toolbox rely on the 
1902    NURBS structure been correctly defined as shown above. The nrbmak not
1903    only constructs the proper structure, but also checks for consistency.
1904    The user is still free to build his own structure, in fact a few
1905    functions in the toolbox do this for convenience.
1906  
1907  Examples:
1908  
1909    Construct a 2D line from (0.0,0.0) to (1.5,3.0).
1910    For a straight line a spline of order 2 is required.
1911    Note that the knot sequence has a multiplicity of 2 at the
1912    start (0.0,0.0) and end (1.0 1.0) in order to clamp the ends.
1913  
1914    line = nrbmak([0.0 1.5; 0.0 3.0],[0.0 0.0 1.0 1.0]);
1915    nrbplot(line, 2);
1916  
1917    Construct a surface in the x-y plane i.e
1918      
1919      ^  (0.0,1.0) ------------ (1.0,1.0)
1920      |      |                      |
1921      | V    |                      |
1922      |      |      Surface         |
1923      |      |                      |
1924      |      |                      |
1925      |  (0.0,0.0) ------------ (1.0,0.0)
1926      |
1927      |------------------------------------>
1928                                        U 
1929
1930    coefs = cat(3,[0 0; 0 1],[1 1; 0 1]);
1931    knots = {[0 0 1 1]  [0 0 1 1]}
1932    plane = nrbmak(coefs,knots);
1933    nrbplot(plane, [2 2]);
1934
1935     Copyright (C) 2000 Mark Spink, 2010 Rafael Vazquez
1936
1937     This program is free software: you can redistribute it and/or modify
1938     it under the terms of the GNU General Public License as published by
1939     the Free Software Foundation, either version 2 of the License, or
1940     (at your option) any later version.
1941
1942
1943
1944 # name: <cell-element>
1945 # type: sq_string
1946 # elements: 1
1947 # length: 80
1948
1949  NRBMAK: Construct the NURBS structure given the control points
1950             and
1951
1952
1953
1954 # name: <cell-element>
1955 # type: sq_string
1956 # elements: 1
1957 # length: 14
1958 nrbnumbasisfun
1959
1960
1961 # name: <cell-element>
1962 # type: sq_string
1963 # elements: 1
1964 # length: 797
1965
1966  NRBNUMBASISFUN:  Numbering of basis functions for NURBS
1967
1968  Calling Sequence:
1969  
1970    N      = nrbnumbasisfun (u, crv)
1971    N      = nrbnumbasisfun ({u, v}, srf)
1972    N      = nrbnumbasisfun (p, srf)
1973
1974     INPUT:
1975    
1976       u or p(1,:,:)  - parametric points along u direction
1977       v or p(2,:,:)  - parametric points along v direction
1978       crv - NURBS curve
1979       srf - NURBS surface
1980    
1981     OUTPUT:
1982
1983       N - Indices of the basis functions that are nonvanishing at each
1984           point. size(N) == size(B)
1985
1986     Copyright (C) 2009 Carlo de Falco
1987
1988     This program is free software: you can redistribute it and/or modify
1989     it under the terms of the GNU General Public License as published by
1990     the Free Software Foundation, either version 2 of the License, or
1991     (at your option) any later version.
1992
1993
1994
1995 # name: <cell-element>
1996 # type: sq_string
1997 # elements: 1
1998 # length: 58
1999
2000  NRBNUMBASISFUN:  Numbering of basis functions for NURBS
2001
2002
2003
2004
2005 # name: <cell-element>
2006 # type: sq_string
2007 # elements: 1
2008 # length: 7
2009 nrbplot
2010
2011
2012 # name: <cell-element>
2013 # type: sq_string
2014 # elements: 1
2015 # length: 1117
2016  
2017  NRBPLOT: Plot a NURBS curve or surface, or the boundary of a NURBS volume.
2018  
2019  Calling Sequence:
2020  
2021    nrbplot (nrb, subd)
2022    nrbplot (nrb, subd, p, v)
2023  
2024  INPUT:
2025  
2026    nrb          : NURBS curve, surface or volume, see nrbmak.
2027  
2028    npnts        : Number of evaluation points, for a surface or volume, a row 
2029        vector with the number of points along each direction.
2030  
2031    [p,v]       : property/value options
2032
2033                Valid property/value pairs include:
2034
2035                Property        Value/{Default}
2036                -----------------------------------
2037                light           {off} | on
2038                colormap        {'copper'}
2039
2040  Example:
2041
2042    Plot the test surface with 20 points along the U direction
2043    and 30 along the V direction
2044
2045    nrbplot(nrbtestsrf, [20 30])
2046
2047     Copyright (C) 2000 Mark Spink
2048     Copyright (C) 2010 Carlo de Falco, Rafael Vazquez
2049
2050     This program is free software: you can redistribute it and/or modify
2051     it under the terms of the GNU General Public License as published by
2052     the Free Software Foundation, either version 2 of the License, or
2053     (at your option) any later version.
2054
2055
2056
2057 # name: <cell-element>
2058 # type: sq_string
2059 # elements: 1
2060 # length: 77
2061  
2062  NRBPLOT: Plot a NURBS curve or surface, or the boundary of a NURBS volume.
2063
2064
2065
2066 # name: <cell-element>
2067 # type: sq_string
2068 # elements: 1
2069 # length: 7
2070 nrbrect
2071
2072
2073 # name: <cell-element>
2074 # type: sq_string
2075 # elements: 1
2076 # length: 854
2077  
2078  NRBRECT: Construct NURBS representation of a rectangular curve.
2079  
2080  Calling Sequence:
2081  
2082    crv = nrbrect()
2083    crv = nrbrect(size)
2084    crv = nrbrect(width, height)
2085  
2086  INPUT:
2087  
2088    size : Size of the square (width = height).
2089  
2090    width        : Width of the rectangle (along x-axis).
2091  
2092    height       : Height of the rectangle (along y-axis).
2093
2094  OUTPUT:
2095
2096    crv          : NURBS curve, see nrbmak. 
2097   
2098  
2099  Description:
2100  
2101    Construct a rectangle or square in the x-y plane with the bottom
2102    lhs corner at (0,0,0). If no rhs arguments provided the function
2103    constructs a unit square.
2104
2105     Copyright (C) 2000 Mark Spink
2106
2107     This program is free software: you can redistribute it and/or modify
2108     it under the terms of the GNU General Public License as published by
2109     the Free Software Foundation, either version 2 of the License, or
2110     (at your option) any later version.
2111
2112
2113
2114 # name: <cell-element>
2115 # type: sq_string
2116 # elements: 1
2117 # length: 66
2118  
2119  NRBRECT: Construct NURBS representation of a rectangular curve.
2120
2121
2122
2123 # name: <cell-element>
2124 # type: sq_string
2125 # elements: 1
2126 # length: 10
2127 nrbreverse
2128
2129
2130 # name: <cell-element>
2131 # type: sq_string
2132 # elements: 1
2133 # length: 618
2134
2135  NRBREVERSE: Reverse the evaluation direction of a NURBS curve or surface.
2136  
2137  Calling Sequence:
2138  
2139    rnrb = nrbreverse(nrb);
2140  
2141  INPUT:
2142  
2143    nrb          : NURBS data structure, see nrbmak.
2144
2145  OUTPUT:
2146  
2147    rnrb : Reversed NURBS.
2148  
2149  Description:
2150  
2151    Utility function to reverse the evaluation direction of a NURBS
2152    curve or surface.
2153
2154     Copyright (C) 2000 Mark Spink
2155
2156     This program is free software: you can redistribute it and/or modify
2157     it under the terms of the GNU General Public License as published by
2158     the Free Software Foundation, either version 2 of the License, or
2159     (at your option) any later version.
2160
2161
2162
2163 # name: <cell-element>
2164 # type: sq_string
2165 # elements: 1
2166 # length: 75
2167
2168  NRBREVERSE: Reverse the evaluation direction of a NURBS curve or surface.
2169
2170
2171
2172 # name: <cell-element>
2173 # type: sq_string
2174 # elements: 1
2175 # length: 10
2176 nrbrevolve
2177
2178
2179 # name: <cell-element>
2180 # type: sq_string
2181 # elements: 1
2182 # length: 1710
2183  
2184  NRBREVOLVE: Construct a NURBS surface by revolving a NURBS curve, or
2185   construct a NURBS volume by revolving a NURBS surface.
2186  
2187  Calling Sequence:
2188  
2189    srf = nrbrevolve(crv,pnt,vec[,ang])
2190  
2191  INPUT:
2192  
2193    crv          : NURBS curve or surface to revolve, see nrbmak.
2194  
2195    pnt          : Coordinates of the point used to define the axis
2196                of rotation.
2197  
2198    vec          : Vector defining the direction of the rotation axis.
2199  
2200    ang          : Angle to revolve the curve, default 2*pi
2201
2202  OUTPUT:
2203
2204    srf          : constructed surface or volume
2205  
2206  Description:
2207  
2208    Construct a NURBS surface by revolving the profile NURBS curve around
2209    an axis defined by a point and vector.
2210  
2211  Examples:
2212  
2213    Construct a sphere by rotating a semicircle around a x-axis.
2214
2215    crv = nrbcirc(1.0,[0 0 0],0,pi);
2216    srf = nrbrevolve(crv,[0 0 0],[1 0 0]);
2217    nrbplot(srf,[20 20]);
2218
2219  NOTE:
2220
2221    The algorithm:
2222
2223      1) vectrans the point to the origin (0,0,0)
2224      2) rotate the vector into alignment with the z-axis
2225
2226      for each control point along the curve
2227
2228      3) determine the radius and angle of control
2229         point to the z-axis
2230      4) construct a circular arc in the x-y plane with 
2231         this radius and start angle and sweep angle theta 
2232      5) combine the arc and profile, coefs and weights.
2233   
2234      next control point
2235
2236      6) rotate and vectrans the surface back into position
2237         by reversing 1 and 2.
2238
2239
2240     Copyright (C) 2000 Mark Spink
2241     Copyright (C) 2010 Rafael Vazquez
2242
2243     This program is free software: you can redistribute it and/or modify
2244     it under the terms of the GNU General Public License as published by
2245     the Free Software Foundation, either version 2 of the License, or
2246     (at your option) any later version.
2247
2248
2249
2250 # name: <cell-element>
2251 # type: sq_string
2252 # elements: 1
2253 # length: 80
2254  
2255  NRBREVOLVE: Construct a NURBS surface by revolving a NURBS curve, or
2256   constr
2257
2258
2259
2260 # name: <cell-element>
2261 # type: sq_string
2262 # elements: 1
2263 # length: 8
2264 nrbruled
2265
2266
2267 # name: <cell-element>
2268 # type: sq_string
2269 # elements: 1
2270 # length: 892
2271  NRBRULED: Construct a ruled surface between two NURBS curves.
2272  
2273  Calling Sequence:
2274  
2275    srf = nrbruled(crv1, crv2)
2276  
2277  INPUT:
2278  
2279    crv1 : First NURBS curve, see nrbmak.
2280  
2281    crv2 : Second NURBS curve, see nrbmak.
2282
2283  OUTPUT:
2284  
2285    srf          : Ruled NURBS surface.
2286  
2287  Description:
2288  
2289    Constructs a ruled surface between two NURBS curves. The ruled surface is
2290    ruled along the V direction.
2291  
2292  Examples:
2293  
2294    Construct a ruled surface between a semicircle and a straight line.
2295  
2296    cir = nrbcirc(1,[0 0 0],0,pi);
2297    line = nrbline([-1 0.5 1],[1 0.5 1]);
2298    srf = nrbruled(cir,line);
2299    nrbplot(srf,[20 20]);
2300
2301     Copyright (C) 2000 Mark Spink
2302
2303     This program is free software: you can redistribute it and/or modify
2304     it under the terms of the GNU General Public License as published by
2305     the Free Software Foundation, either version 2 of the License, or
2306     (at your option) any later version.
2307
2308
2309
2310 # name: <cell-element>
2311 # type: sq_string
2312 # elements: 1
2313 # length: 62
2314  NRBRULED: Construct a ruled surface between two NURBS curves.
2315
2316
2317
2318 # name: <cell-element>
2319 # type: sq_string
2320 # elements: 1
2321 # length: 16
2322 nrbsurfderiveval
2323
2324
2325 # name: <cell-element>
2326 # type: sq_string
2327 # elements: 1
2328 # length: 772
2329
2330  NRBSURFDERIVEVAL: Evaluate n-th order derivatives of a NURBS surface
2331
2332  usage: skl = nrbsurfderiveval (srf, [u; v], d) 
2333
2334    INPUT:
2335
2336    srf   : NURBS surface structure, see nrbmak
2337
2338    u, v  : parametric coordinates of the point where we compute the
2339       derivatives
2340
2341    d     : number of partial derivatives to compute
2342
2343
2344    OUTPUT: 
2345
2346    skl (i, j, k, l) = i-th component derived j-1,k-1 times at the
2347      l-th point.
2348
2349  Adaptation of algorithm A4.4 from the NURBS book, pg137
2350
2351     Copyright (C) 2009 Carlo de Falco
2352
2353     This program is free software: you can redistribute it and/or modify
2354     it under the terms of the GNU General Public License as published by
2355     the Free Software Foundation, either version 2 of the License, or
2356     (at your option) any later version.
2357
2358
2359
2360 # name: <cell-element>
2361 # type: sq_string
2362 # elements: 1
2363 # length: 71
2364
2365  NRBSURFDERIVEVAL: Evaluate n-th order derivatives of a NURBS surface
2366
2367
2368
2369
2370 # name: <cell-element>
2371 # type: sq_string
2372 # elements: 1
2373 # length: 10
2374 nrbtestcrv
2375
2376
2377 # name: <cell-element>
2378 # type: sq_string
2379 # elements: 1
2380 # length: 338
2381  NRBTESTCRV: Constructs a simple test curve. 
2382
2383     Copyright (C) 2000 Mark Spink
2384
2385     This program is free software: you can redistribute it and/or modify
2386     it under the terms of the GNU General Public License as published by
2387     the Free Software Foundation, either version 2 of the License, or
2388     (at your option) any later version.
2389
2390
2391
2392 # name: <cell-element>
2393 # type: sq_string
2394 # elements: 1
2395 # length: 44
2396  NRBTESTCRV: Constructs a simple test curve.
2397
2398
2399
2400 # name: <cell-element>
2401 # type: sq_string
2402 # elements: 1
2403 # length: 10
2404 nrbtestsrf
2405
2406
2407 # name: <cell-element>
2408 # type: sq_string
2409 # elements: 1
2410 # length: 339
2411  NRBTESTSRF: Constructs a simple test surface.
2412
2413     Copyright (C) 2000 Mark Spink
2414
2415     This program is free software: you can redistribute it and/or modify
2416     it under the terms of the GNU General Public License as published by
2417     the Free Software Foundation, either version 2 of the License, or
2418     (at your option) any later version.
2419
2420
2421
2422 # name: <cell-element>
2423 # type: sq_string
2424 # elements: 1
2425 # length: 46
2426  NRBTESTSRF: Constructs a simple test surface.
2427
2428
2429
2430 # name: <cell-element>
2431 # type: sq_string
2432 # elements: 1
2433 # length: 8
2434 nrbtform
2435
2436
2437 # name: <cell-element>
2438 # type: sq_string
2439 # elements: 1
2440 # length: 1287
2441  
2442  NRBTFORM: Apply transformation matrix to the NURBS.
2443  
2444  Calling Sequence:
2445  
2446    tnurbs = nrbtform(nurbs,tmatrix);
2447  
2448  INPUT:
2449  
2450    nurbs        : NURBS data structure (see nrbmak for details).
2451  
2452    tmatrix     : Transformation matrix, a matrix of size (4,4) defining
2453                  a single or multiple transformations.
2454
2455  OUTPUT:
2456
2457    tnurbs       : The return transformed NURBS data structure.
2458  
2459  Description:
2460  
2461    The NURBS is transform as defined a transformation matrix of size (4,4),
2462    such as a rotation, translation or change in scale. The transformation
2463    matrix can define a single transformation or multiple series of
2464    transformations. The matrix can be simple constructed by the functions
2465    vecscale, vectrans, vecrotx, vecroty, and vecrotz.
2466      
2467  Examples:
2468  
2469    Rotate a square by 45 degrees about the z axis.
2470
2471    rsqr = nrbtform(nrbrect(), vecrotz(deg2rad(45)));
2472    nrbplot(rsqr, 1000);
2473  
2474  See also:
2475  
2476    vecscale, vectrans, vecrotx, vecroty, vecrotz
2477
2478     Copyright (C) 2000 Mark Spink
2479     Copyright (C) 2010 Rafael Vazquez
2480
2481     This program is free software: you can redistribute it and/or modify
2482     it under the terms of the GNU General Public License as published by
2483     the Free Software Foundation, either version 2 of the License, or
2484     (at your option) any later version.
2485
2486
2487
2488 # name: <cell-element>
2489 # type: sq_string
2490 # elements: 1
2491 # length: 54
2492  
2493  NRBTFORM: Apply transformation matrix to the NURBS.
2494
2495
2496
2497 # name: <cell-element>
2498 # type: sq_string
2499 # elements: 1
2500 # length: 9
2501 nrbtransp
2502
2503
2504 # name: <cell-element>
2505 # type: sq_string
2506 # elements: 1
2507 # length: 673
2508  
2509  NRBTRANSP: Transpose a NURBS surface, by swapping U and V directions.
2510  
2511  Calling Sequence:
2512  
2513    tsrf = nrbtransp(srf)
2514
2515  INPUT:
2516  
2517    srf          : NURBS surface, see nrbmak.
2518
2519  OUTPUT:
2520  
2521    tsrf : NURBS surface with U and V diretions transposed.
2522  
2523  Description:
2524  
2525    Utility function that transposes a NURBS surface, by swapping U and
2526    V directions. NURBS curves cannot be transposed.
2527
2528     Copyright (C) 2000 Mark Spink
2529
2530     This program is free software: you can redistribute it and/or modify
2531     it under the terms of the GNU General Public License as published by
2532     the Free Software Foundation, either version 2 of the License, or
2533     (at your option) any later version.
2534
2535
2536
2537 # name: <cell-element>
2538 # type: sq_string
2539 # elements: 1
2540 # length: 72
2541  
2542  NRBTRANSP: Transpose a NURBS surface, by swapping U and V directions.
2543
2544
2545
2546 # name: <cell-element>
2547 # type: sq_string
2548 # elements: 1
2549 # length: 11
2550 numbasisfun
2551
2552
2553 # name: <cell-element>
2554 # type: sq_string
2555 # elements: 1
2556 # length: 626
2557  NUMBASISFUN:  List non-zero Basis functions for B-Spline in a given knot-span
2558
2559  Calling Sequence:
2560  
2561    N = numbasisfun(i,u,p,U)
2562    
2563     INPUT:
2564    
2565       i - knot span  ( from FindSpan() )
2566       u - parametric point
2567       p - spline degree
2568       U - knot sequence
2569    
2570     OUTPUT:
2571    
2572       N - Basis functions (numel(u)x(p+1))
2573    
2574     Copyright (C) 2009 Carlo de Falco
2575
2576     This program is free software: you can redistribute it and/or modify
2577     it under the terms of the GNU General Public License as published by
2578     the Free Software Foundation, either version 2 of the License, or
2579     (at your option) any later version.
2580
2581
2582
2583 # name: <cell-element>
2584 # type: sq_string
2585 # elements: 1
2586 # length: 79
2587  NUMBASISFUN:  List non-zero Basis functions for B-Spline in a given knot-span
2588
2589
2590
2591
2592 # name: <cell-element>
2593 # type: sq_string
2594 # elements: 1
2595 # length: 7
2596 rad2deg
2597
2598
2599 # name: <cell-element>
2600 # type: sq_string
2601 # elements: 1
2602 # length: 697
2603  
2604  RAD2DEG: Convert radians to degrees.
2605  
2606  Calling Sequence:
2607  
2608    rad = rad2deg(deg);
2609  
2610  INPUT:
2611  
2612    rad          : Angle in radians.
2613
2614  OUTPUT:
2615
2616    deg          : Angle in degrees.
2617  
2618  Description:
2619  
2620    Convenient utility function for converting radians to degrees, which are
2621    often the required angular units for functions in the NURBS toolbox.
2622  
2623  Examples:
2624  
2625    Convert 0.3 radians to degrees
2626  
2627    rad = deg2rad(0.3);
2628
2629     Copyright (C) 2000 Mark Spink
2630
2631     This program is free software: you can redistribute it and/or modify
2632     it under the terms of the GNU General Public License as published by
2633     the Free Software Foundation, either version 2 of the License, or
2634     (at your option) any later version.
2635
2636
2637
2638 # name: <cell-element>
2639 # type: sq_string
2640 # elements: 1
2641 # length: 39
2642  
2643  RAD2DEG: Convert radians to degrees.
2644
2645
2646
2647 # name: <cell-element>
2648 # type: sq_string
2649 # elements: 1
2650 # length: 13
2651 surfderivcpts
2652
2653
2654 # name: <cell-element>
2655 # type: sq_string
2656 # elements: 1
2657 # length: 933
2658
2659  SURFDERIVCPTS: Compute control points of n-th derivatives of a NURBS surface.
2660  
2661  usage: pkl = surfderivcpts (n, p, U, m, q, V, P, d) 
2662
2663   INPUT: 
2664
2665         n+1, m+1 = number of control points
2666         p, q     = spline order
2667         U, V     = knots
2668         P        = control points
2669         d        = derivative order
2670
2671   OUTPUT:
2672
2673         pkl (k+1, l+1, i+1, j+1) = i,jth control point
2674                                    of the surface differentiated k
2675                                    times in the u direction and l
2676                                    times in the v direction
2677
2678  Adaptation of algorithm A3.7 from the NURBS book, pg114
2679
2680     Copyright (C) 2009 Carlo de Falco
2681
2682     This program is free software: you can redistribute it and/or modify
2683     it under the terms of the GNU General Public License as published by
2684     the Free Software Foundation, either version 2 of the License, or
2685     (at your option) any later version.
2686
2687
2688
2689 # name: <cell-element>
2690 # type: sq_string
2691 # elements: 1
2692 # length: 79
2693
2694  SURFDERIVCPTS: Compute control points of n-th derivatives of a NURBS surface.
2695
2696
2697
2698 # name: <cell-element>
2699 # type: sq_string
2700 # elements: 1
2701 # length: 13
2702 surfderiveval
2703
2704
2705 # name: <cell-element>
2706 # type: sq_string
2707 # elements: 1
2708 # length: 870
2709
2710  SURFDERIVEVAL: Compute the derivatives of a B-spline surface
2711  
2712  usage: skl = surfderiveval (n, p, U, m, q, V, P, u, v, d) 
2713
2714   INPUT: 
2715
2716         n+1, m+1 = number of control points
2717         p, q     = spline order
2718         U, V     = knots
2719         P        = control points
2720         u,v      = evaluation points
2721         d        = derivative order
2722
2723   OUTPUT:
2724
2725         skl (k+1, l+1) =  surface differentiated k
2726                           times in the u direction and l
2727                           times in the v direction
2728
2729  Adaptation of algorithm A3.8 from the NURBS book, pg115
2730
2731     Copyright (C) 2009 Carlo de Falco
2732
2733     This program is free software: you can redistribute it and/or modify
2734     it under the terms of the GNU General Public License as published by
2735     the Free Software Foundation, either version 2 of the License, or
2736     (at your option) any later version.
2737
2738
2739
2740 # name: <cell-element>
2741 # type: sq_string
2742 # elements: 1
2743 # length: 80
2744
2745  SURFDERIVEVAL: Compute the derivatives of a B-spline surface
2746  
2747  usage: skl = s
2748
2749
2750
2751 # name: <cell-element>
2752 # type: sq_string
2753 # elements: 1
2754 # length: 9
2755 tbasisfun
2756
2757
2758 # name: <cell-element>
2759 # type: sq_string
2760 # elements: 1
2761 # length: 925
2762
2763  TBASISFUN: Compute a B- or T-Spline basis function, and its derivatives, from its local knot vector.
2764
2765  usage:
2766
2767  [N, Nder] = tbasisfun (u, p, U)
2768  [N, Nder] = tbasisfun ([u; v], [p q], {U, V})
2769  [N, Nder] = tbasisfun ([u; v; w], [p q r], {U, V, W})
2770  
2771  INPUT:
2772
2773   u or [u; v] : points in parameter space where the basis function is to be
2774   evaluated 
2775   
2776   U or {U, V} : local knot vector
2777
2778  p or [p q] : polynomial order of the basis function
2779
2780  OUTPUT:
2781
2782   N    : basis function evaluated at the given parametric points 
2783   Nder : basis function gradient evaluated at the given parametric points 
2784
2785     Copyright (C) 2009 Carlo de Falco
2786     Copyright (C) 2012 Rafael Vazquez
2787
2788     This program is free software: you can redistribute it and/or modify
2789     it under the terms of the GNU General Public License as published by
2790     the Free Software Foundation, either version 2 of the License, or
2791     (at your option) any later version.
2792
2793
2794
2795 # name: <cell-element>
2796 # type: sq_string
2797 # elements: 1
2798 # length: 80
2799
2800  TBASISFUN: Compute a B- or T-Spline basis function, and its derivatives, from 
2801
2802
2803
2804 # name: <cell-element>
2805 # type: sq_string
2806 # elements: 1
2807 # length: 8
2808 vecangle
2809
2810
2811 # name: <cell-element>
2812 # type: sq_string
2813 # elements: 1
2814 # length: 920
2815  
2816  VECANGLE: An alternative to atan, returning an arctangent in the 
2817              range 0 to 2*pi.
2818  
2819  Calling Sequence:
2820  
2821    ang = vecmag2(num,dum)
2822  
2823  INPUT:
2824  
2825    num          : Numerator, vector of size (1,nv).
2826    dem          : Denominator, vector of size (1,nv).
2827
2828  OUTPUT:
2829    ang          : Arctangents, row vector of angles.
2830  
2831  Description:
2832  
2833    The components of the vector ang are the arctangent of the corresponding
2834    enties of num./dem. This function is an alternative for 
2835    atan, returning an angle in the range 0 to 2*pi.
2836  
2837  Examples:
2838  
2839    Find the atan(1.2,2.0) and atan(1.5,3.4) using vecangle
2840  
2841    ang = vecangle([1.2 1.5], [2.0 3.4]);
2842
2843     Copyright (C) 2000 Mark Spink
2844
2845     This program is free software: you can redistribute it and/or modify
2846     it under the terms of the GNU General Public License as published by
2847     the Free Software Foundation, either version 2 of the License, or
2848     (at your option) any later version.
2849
2850
2851
2852 # name: <cell-element>
2853 # type: sq_string
2854 # elements: 1
2855 # length: 80
2856  
2857  VECANGLE: An alternative to atan, returning an arctangent in the 
2858            
2859
2860
2861
2862 # name: <cell-element>
2863 # type: sq_string
2864 # elements: 1
2865 # length: 8
2866 veccross
2867
2868
2869 # name: <cell-element>
2870 # type: sq_string
2871 # elements: 1
2872 # length: 967
2873  
2874  VECCROSS: The cross product of two vectors.
2875  
2876  Calling Sequence:
2877  
2878    cross = veccross(vec1,vec2);
2879  
2880  INPUT:
2881  
2882    vec1 : An array of column vectors represented by a matrix of
2883    vec2 size (dim,nv), where is the dimension of the vector and
2884                 nv the number of vectors.
2885
2886  OUTPUT:
2887  
2888    cross        : Array of column vectors, each element is corresponding
2889                 to the cross product of the respective components in vec1
2890                 and vec2.
2891  
2892  Description:
2893  
2894    Cross product of two vectors.
2895  
2896  Examples:
2897  
2898    Determine the cross products of:
2899    (2.3,3.4,5.6) and (1.2,4.5,1.2)
2900    (5.1,0.0,2.3) and (2.5,3.2,4.0)
2901  
2902    cross = veccross([2.3 5.1; 3.4 0.0; 5.6 2.3],[1.2 2.5; 4.5 3.2; 1.2 4.0]);
2903
2904     Copyright (C) 2000 Mark Spink
2905
2906     This program is free software: you can redistribute it and/or modify
2907     it under the terms of the GNU General Public License as published by
2908     the Free Software Foundation, either version 2 of the License, or
2909     (at your option) any later version.
2910
2911
2912
2913 # name: <cell-element>
2914 # type: sq_string
2915 # elements: 1
2916 # length: 46
2917  
2918  VECCROSS: The cross product of two vectors.
2919
2920
2921
2922 # name: <cell-element>
2923 # type: sq_string
2924 # elements: 1
2925 # length: 6
2926 vecdot
2927
2928
2929 # name: <cell-element>
2930 # type: sq_string
2931 # elements: 1
2932 # length: 946
2933  
2934  VECDOT: The dot product of two vectors.
2935  
2936  Calling Sequence:
2937  
2938    dot = vecdot(vec1,vec2);
2939  
2940  INPUT:
2941  
2942    vec1 : An array of column vectors represented by a matrix of
2943    vec2 size (dim,nv), where is the dimension of the vector and
2944                 nv the number of vectors.
2945
2946  OUTPUT:
2947
2948    dot          : Row vector of scalars, each element corresponding to
2949                 the dot product of the respective components in vec1 and
2950                 vec2.
2951  
2952  Description:
2953  
2954    Scalar dot product of two vectors.
2955  
2956  Examples:
2957  
2958    Determine the dot product of
2959    (2.3,3.4,5.6) and (1.2,4.5,1.2)
2960    (5.1,0.0,2.3) and (2.5,3.2,4.0)
2961
2962    dot = vecdot([2.3 5.1; 3.4 0.0; 5.6 2.3],[1.2 2.5; 4.5 3.2; 1.2 4.0]);
2963
2964     Copyright (C) 2000 Mark Spink
2965
2966     This program is free software: you can redistribute it and/or modify
2967     it under the terms of the GNU General Public License as published by
2968     the Free Software Foundation, either version 2 of the License, or
2969     (at your option) any later version.
2970
2971
2972
2973 # name: <cell-element>
2974 # type: sq_string
2975 # elements: 1
2976 # length: 42
2977  
2978  VECDOT: The dot product of two vectors.
2979
2980
2981
2982 # name: <cell-element>
2983 # type: sq_string
2984 # elements: 1
2985 # length: 6
2986 vecmag
2987
2988
2989 # name: <cell-element>
2990 # type: sq_string
2991 # elements: 1
2992 # length: 807
2993  
2994  VECMAG: Magnitude of the vectors.
2995  
2996  Calling Sequence:
2997  
2998    mvec = vecmag(vec)
2999  
3000  INPUT:
3001  
3002    vec          : An array of column vectors represented by a matrix of
3003                 size (dim,nv), where is the dimension of the vector and
3004                 nv the number of vectors.
3005
3006  OUTPUT:
3007
3008    mvec : Magnitude of the vectors, vector of size (1,nv).
3009  
3010  Description:
3011  
3012    Determines the magnitude of the vectors.
3013  
3014  Examples:
3015  
3016    Find the magnitude of the two vectors (0.0,2.0,1.3) and (1.5,3.4,2.3)
3017  
3018    mvec = vecmag([0.0 1.5; 2.0 3.4; 1.3 2.3]);
3019
3020     Copyright (C) 2000 Mark Spink
3021
3022     This program is free software: you can redistribute it and/or modify
3023     it under the terms of the GNU General Public License as published by
3024     the Free Software Foundation, either version 2 of the License, or
3025     (at your option) any later version.
3026
3027
3028
3029 # name: <cell-element>
3030 # type: sq_string
3031 # elements: 1
3032 # length: 36
3033  
3034  VECMAG: Magnitude of the vectors.
3035
3036
3037
3038 # name: <cell-element>
3039 # type: sq_string
3040 # elements: 1
3041 # length: 7
3042 vecmag2
3043
3044
3045 # name: <cell-element>
3046 # type: sq_string
3047 # elements: 1
3048 # length: 855
3049  
3050  VECMAG2: Squared magnitude of a set of vectors.
3051  
3052  Calling Sequence:
3053  
3054    mvec = vecmag2(vec)
3055  
3056  INPUT:
3057  
3058    vec          : An array of column vectors represented by a matrix of
3059                 size (dim,nv), where dim is the dimension of the vector and
3060                 nv the number of vectors.
3061
3062  OUTPUT:
3063  
3064    mvec : Squared magnitude of the vectors, vector of size (1,nv).
3065  
3066  Description:
3067  
3068    Determines the squared magnitude of the vectors.
3069  
3070  Examples:
3071  
3072    Find the squared magnitude of the two vectors (0.0,2.0,1.3)
3073    and (1.5,3.4,2.3)
3074  
3075    mvec = vecmag2([0.0 1.5; 2.0 3.4; 1.3 2.3]);
3076
3077     Copyright (C) 2000 Mark Spink
3078
3079     This program is free software: you can redistribute it and/or modify
3080     it under the terms of the GNU General Public License as published by
3081     the Free Software Foundation, either version 2 of the License, or
3082     (at your option) any later version.
3083
3084
3085
3086 # name: <cell-element>
3087 # type: sq_string
3088 # elements: 1
3089 # length: 50
3090  
3091  VECMAG2: Squared magnitude of a set of vectors.
3092
3093
3094
3095 # name: <cell-element>
3096 # type: sq_string
3097 # elements: 1
3098 # length: 7
3099 vecnorm
3100
3101
3102 # name: <cell-element>
3103 # type: sq_string
3104 # elements: 1
3105 # length: 817
3106  
3107  VECNORM: Normalise the vectors.
3108  
3109  Calling Sequence:
3110  
3111    nvec = vecnorn(vec);
3112  
3113  INPUT:
3114  
3115    vec          : An array of column vectors represented by a matrix of
3116                 size (dim,nv), where is the dimension of the vector and
3117                 nv the number of vectors.
3118
3119  OUTPUT:
3120  
3121    nvec         : Normalised vectors, matrix the smae size as vec.
3122  
3123  Description:
3124  
3125    Normalises the array of vectors, returning the unit vectors.
3126  
3127  Examples:
3128  
3129    Normalise the two vectors (0.0,2.0,1.3) and (1.5,3.4,2.3)
3130
3131    nvec = vecnorm([0.0 1.5; 2.0 3.4; 1.3 2.3]);
3132
3133     Copyright (C) 2000 Mark Spink
3134
3135     This program is free software: you can redistribute it and/or modify
3136     it under the terms of the GNU General Public License as published by
3137     the Free Software Foundation, either version 2 of the License, or
3138     (at your option) any later version.
3139
3140
3141
3142 # name: <cell-element>
3143 # type: sq_string
3144 # elements: 1
3145 # length: 34
3146  
3147  VECNORM: Normalise the vectors.
3148
3149
3150
3151 # name: <cell-element>
3152 # type: sq_string
3153 # elements: 1
3154 # length: 6
3155 vecrot
3156
3157
3158 # name: <cell-element>
3159 # type: sq_string
3160 # elements: 1
3161 # length: 737
3162  
3163  VECROT: Transformation matrix for a rotation around the axis given by a vector. 
3164  
3165  Calling Sequence:
3166  
3167    rx = vecrot (angle, vector);
3168  
3169  INPUT:
3170  
3171    angle                : rotation angle defined in radians
3172    vector               : vector defining the rotation axis
3173
3174  OUTPUT:
3175  
3176    rx           : (4x4) Transformation matrix.
3177  
3178  
3179  Description:
3180  
3181    Return the (4x4) Transformation matrix for a rotation about the x axis
3182    by the defined angle.
3183  
3184  See also:
3185  
3186     nrbtform
3187
3188     Copyright (C) 2011 Rafael Vazquez
3189
3190     This program is free software: you can redistribute it and/or modify
3191     it under the terms of the GNU General Public License as published by
3192     the Free Software Foundation, either version 2 of the License, or
3193     (at your option) any later version.
3194
3195
3196
3197 # name: <cell-element>
3198 # type: sq_string
3199 # elements: 1
3200 # length: 80
3201  
3202  VECROT: Transformation matrix for a rotation around the axis given by a vecto
3203
3204
3205
3206 # name: <cell-element>
3207 # type: sq_string
3208 # elements: 1
3209 # length: 7
3210 vecrotx
3211
3212
3213 # name: <cell-element>
3214 # type: sq_string
3215 # elements: 1
3216 # length: 1098
3217  
3218  VECROTX: Transformation matrix for a rotation around the x axis. 
3219  
3220  Calling Sequence:
3221  
3222    rx = vecrotx(angle);
3223  
3224  INPUT:
3225  
3226    angle                : rotation angle defined in radians
3227
3228  OUTPUT:
3229  
3230    rx           : (4x4) Transformation matrix.
3231  
3232  
3233  Description:
3234  
3235    Return the (4x4) Transformation matrix for a rotation about the x axis
3236    by the defined angle.
3237  
3238    The matrix is:
3239  
3240          [ 1         0            0          0]
3241          [ 0     cos(angle)  -sin(angle)     0]
3242          [ 0     sin(angle)   cos(angle)     0]
3243          [ 0         0            0          1]
3244  
3245  Examples:
3246  
3247     Rotate the NURBS line (0.0 0.0 0.0) - (3.0 3.0 3.0) by 45 degrees
3248     around the x-axis
3249  
3250     line = nrbline([0.0 0.0 0.0],[3.0 3.0 3.0]);
3251     trans = vecrotx(%pi/4);
3252     rline = nrbtform(line, trans);
3253  
3254  See also:
3255  
3256     nrbtform
3257
3258     Copyright (C) 2000 Mark Spink
3259
3260     This program is free software: you can redistribute it and/or modify
3261     it under the terms of the GNU General Public License as published by
3262     the Free Software Foundation, either version 2 of the License, or
3263     (at your option) any later version.
3264
3265
3266
3267 # name: <cell-element>
3268 # type: sq_string
3269 # elements: 1
3270 # length: 67
3271  
3272  VECROTX: Transformation matrix for a rotation around the x axis.
3273
3274
3275
3276 # name: <cell-element>
3277 # type: sq_string
3278 # elements: 1
3279 # length: 7
3280 vecroty
3281
3282
3283 # name: <cell-element>
3284 # type: sq_string
3285 # elements: 1
3286 # length: 1138
3287  
3288  VECROTY: Transformation matrix for a rotation around the y axis. 
3289  
3290  Calling Sequence:
3291  
3292    ry = vecroty(angle);
3293  
3294  INPUT:
3295  
3296    angle                : rotation angle defined in radians
3297  
3298  OUTPUT:
3299
3300    ry           : (4x4) Transformation matrix.
3301  
3302  
3303  Description:
3304  
3305    Return the (4x4) Transformation matrix for a rotation about the y axis
3306    by the defined angle.
3307  
3308    The matrix is:
3309  
3310          [  cos(angle)       0        sin(angle)       0]
3311          [      0            1            0            0]
3312          [ -sin(angle)       0        cos(angle)       0]
3313          [      0            0            0            1]
3314  
3315  Examples:
3316  
3317     Rotate the NURBS line (0.0 0.0 0.0) - (3.0 3.0 3.0) by 45 degrees
3318     around the y-axis
3319  
3320     line = nrbline([0.0 0.0 0.0],[3.0 3.0 3.0]);
3321     trans = vecroty(%pi/4);
3322     rline = nrbtform(line, trans);
3323  
3324  See also:
3325  
3326     nrbtform
3327
3328     Copyright (C) 2000 Mark Spink
3329
3330     This program is free software: you can redistribute it and/or modify
3331     it under the terms of the GNU General Public License as published by
3332     the Free Software Foundation, either version 2 of the License, or
3333     (at your option) any later version.
3334
3335
3336
3337 # name: <cell-element>
3338 # type: sq_string
3339 # elements: 1
3340 # length: 67
3341  
3342  VECROTY: Transformation matrix for a rotation around the y axis.
3343
3344
3345
3346 # name: <cell-element>
3347 # type: sq_string
3348 # elements: 1
3349 # length: 7
3350 vecrotz
3351
3352
3353 # name: <cell-element>
3354 # type: sq_string
3355 # elements: 1
3356 # length: 1125
3357  
3358  VECROTZ: Transformation matrix for a rotation around the z axis. 
3359  
3360  Calling Sequence:
3361  
3362    rz = vecrotz(angle);
3363  
3364  INPUT:
3365  
3366    angle        : rotation angle defined in radians
3367
3368  OUTPUT:
3369  
3370    rz           : (4x4) Transformation matrix.
3371  
3372  
3373  Description:
3374  
3375    Return the (4x4) Transformation matrix for a rotation about the z axis
3376    by the defined angle.
3377  
3378    The matrix is:
3379  
3380          [  cos(angle)  -sin(angle)       0          0]
3381          [ -sin(angle)   cos(angle)       0          0]
3382          [      0            0            1          0]
3383          [      0            0            0          1]
3384  
3385  Examples:
3386  
3387   Rotate the NURBS line (0.0 0.0 0.0) - (3.0 3.0 3.0) by 45 degrees
3388   around the z-axis
3389  
3390     line = nrbline([0.0 0.0 0.0],[3.0 3.0 3.0]);
3391     trans = vecrotz(%pi/4);
3392     rline = nrbtform(line, trans);
3393  
3394  See also:
3395  
3396     nrbtform
3397
3398     Copyright (C) 2000 Mark Spink
3399
3400     This program is free software: you can redistribute it and/or modify
3401     it under the terms of the GNU General Public License as published by
3402     the Free Software Foundation, either version 2 of the License, or
3403     (at your option) any later version.
3404
3405
3406
3407 # name: <cell-element>
3408 # type: sq_string
3409 # elements: 1
3410 # length: 67
3411  
3412  VECROTZ: Transformation matrix for a rotation around the z axis.
3413
3414
3415
3416 # name: <cell-element>
3417 # type: sq_string
3418 # elements: 1
3419 # length: 8
3420 vecscale
3421
3422
3423 # name: <cell-element>
3424 # type: sq_string
3425 # elements: 1
3426 # length: 1061
3427
3428  VECSCALE: Transformation matrix for a scaling.
3429  
3430  Calling Sequence:
3431  
3432    ss = vecscale(svec)
3433  
3434  INPUT:
3435  
3436    svec    : A vectors defining the scaling along the x,y and z axes.
3437              i.e. [sx, sy, sy]
3438
3439  OUTPUT:
3440  
3441    ss       : Scaling Transformation Matrix
3442  
3443  Description:
3444  
3445    Returns a (4x4) Transformation matrix for scaling.
3446  
3447    The matrix is:
3448  
3449          [ sx  0   0   0]
3450          [ 0   sy  0   0]
3451          [ 0   0   sz  0]
3452          [ 0   0   0   1]
3453  
3454  Example:
3455  
3456    Scale up the NURBS line (0.0,0.0,0.0) - (1.0,1.0,1.0) by 3 along
3457    the x-axis, 2 along the y-axis and 4 along the z-axis.
3458  
3459    line = nrbline([0.0 0.0 0.0],[1.0 1.0 1.0]);
3460    trans = vecscale([3.0 2.0 4.0]);
3461    sline = nrbtform(line, trans);
3462  
3463  See also:
3464  
3465     nrbtform
3466
3467     Copyright (C) 2000 Mark Spink, 2007 Daniel Claxton
3468
3469     This program is free software: you can redistribute it and/or modify
3470     it under the terms of the GNU General Public License as published by
3471     the Free Software Foundation, either version 2 of the License, or
3472     (at your option) any later version.
3473
3474
3475
3476 # name: <cell-element>
3477 # type: sq_string
3478 # elements: 1
3479 # length: 48
3480
3481  VECSCALE: Transformation matrix for a scaling.
3482
3483
3484
3485 # name: <cell-element>
3486 # type: sq_string
3487 # elements: 1
3488 # length: 8
3489 vectrans
3490
3491
3492 # name: <cell-element>
3493 # type: sq_string
3494 # elements: 1
3495 # length: 1066
3496  
3497  VECTRANS: Transformation matrix for a translation.
3498  
3499  Calling Sequence:
3500  
3501    st = vectrans(tvec)
3502  
3503  INPUT:
3504  
3505    tvec : A vectors defining the translation along the x,y and
3506                    z axes. i.e. [tx, ty, ty]
3507
3508  OUTPUT:
3509  
3510    st           : Translation Transformation Matrix
3511  
3512  Description:
3513  
3514    Returns a (4x4) Transformation matrix for translation.
3515  
3516    The matrix is:
3517  
3518          [ 1   0   0   tx ]
3519          [ 0   1   0   ty ]
3520          [ 0   0   1   tz ]
3521          [ 0   0   0   1  ]
3522  
3523  Examples:
3524  
3525    Translate the NURBS line (0.0,0.0,0.0) - (1.0,1.0,1.0) by 3 along
3526    the x-axis, 2 along the y-axis and 4 along the z-axis.
3527
3528    line = nrbline([0.0 0.0 0.0],[1.0 1.0 1.0]);
3529    trans = vectrans([3.0 2.0 4.0]);
3530    tline = nrbtform(line, trans);
3531  
3532  See also:
3533  
3534     nrbtform
3535
3536     Copyright (C) 2000 Mark Spink
3537
3538     This program is free software: you can redistribute it and/or modify
3539     it under the terms of the GNU General Public License as published by
3540     the Free Software Foundation, either version 2 of the License, or
3541     (at your option) any later version.
3542
3543
3544
3545 # name: <cell-element>
3546 # type: sq_string
3547 # elements: 1
3548 # length: 53
3549  
3550  VECTRANS: Transformation matrix for a translation.
3551
3552
3553
3554
3555