Need help with "-knot" in command "curve"


#1

Hi, everyone,
I am working on the command “curve” recently. Using “-p” and “-d”, i have been able to create beelines and curves.
But i find it difficulte to comprehend ‘flag “-k”’.
I wonder if anyone can help me. A simple example will be much useful.
Thanks!


#2

knots are needed in the construction of NURBS curves to define how the shape of the curve is calculated between the control points. A curve needs degree+cvs-1 knots when it is defined.

you can read about them here

http://devworld.apple.com/dev/techsupport/develop/issue25/schneider.html

these curves have the same control points but the shapes are different cos they have different knot values.

curve -d 3 -p 0 0 0
-p 0.666667 0 1.151515
-p 2 0 3.454545
-p 4 0 -1.818182
-p 6 0 3.818182
-p 8 0 -1.454545
-p 9.333333 0 0.848485
-p 10 0 2
-k 0 -k 0 -k 0 -k 1 -k 2 -k 3 -k 4 -k 5 -k 5 -k 5 ;

curve -d 3 -p 0 0 0
-p 0.666667 0 1.151515
-p 2 0 3.454545
-p 4 0 -1.818182
-p 6 0 3.818182
-p 8 0 -1.454545
-p 9.333333 0 0.848485
-p 10 0 2
-k 0 -k 0 -k 0 -k 0 -k 0 -k 0 -k 0 -k 0 -k 0 -k 0 ;

Notice that it doesnt matter what the not values are, it is their spacing which affects the shape of the curve. The knot values on these curves are the different, but their spacing is the same so the curves are the same.

curve -d 3 -p 0 0 0
-p 0.666667 0 1.151515
-p 2 0 3.454545
-p 4 0 -1.818182
-p 6 0 3.818182
-p 8 0 -1.454545
-p 9.333333 0 0.848485
-p 10 0 2
-k 0 -k 1 -k 2 -k 3 -k 4 -k 5 -k 6 -k 7 -k 8 -k 9 ;

curve -d 3 -p 0 0 0
-p 0.666667 0 1.151515
-p 2 0 3.454545
-p 4 0 -1.818182
-p 6 0 3.818182
-p 8 0 -1.454545
-p 9.333333 0 0.848485
-p 10 0 2
-k 0 -k 2 -k 4 -k 6 -k 8 -k 10 -k 12 -k 14 -k 16 -k 18 ;

If in doubt, just space your knots equally


#3

Thanks Sam, that’s really good and informative reference. Maya’s docs have an awful explanation of what knots are and I’ve never understood them, but now I think I get it… :slight_smile:
cheers!
:nathaN


#4

Good example and Useful LINK.:arteest:


#5

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.