Helix

A Helix/Spring creating spline that allows for adjusting the spacing of the knots on the spline.

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Anubis's picture

is i miss something... the

is i miss something... the circle shape has 4 knots and you can divide it segments, or if create circle with addKnot need to supply amount of knots and angle, and the same is for the spiral/helix. in the example code - 12 knots with angle 30 end with full turn (12*30=360).

my recent MAXScripts RSS (archive here)

JokerMartini's picture

Anubis

Hey Anubis, You got it 100% right.
That is what i wanted. Great work!
Thanks!

John Martini
Digital Artist
http://www.JokerMartini.com (new site)

JokerMartini's picture

yeah

Yeah just like that. But have the option to choose the amount of knots in the spline. Like when you make a circle you can adjust that.

John Martini
Digital Artist
http://www.JokerMartini.com (new site)

Anubis's picture

somthing like this?... (

somthing like this?...

(
  spline = splineShape() 
  addNewSpline spline
  addKnot spline 1 #smooth #curve [0,0,0]
  numK = 12 -- num.knots
  incr = pi -- increment
  rad = for i = 1 to numK collect i * incr
  ang = 30 -- angle
  points = for i = 1 to numK collect [rad[i]*(sin(i*ang)),rad[i]*(cos(i*ang)),0]
  for p in points do addKnot spline 1 #smooth #curve p
  updateShape spline
)

my recent MAXScripts RSS (archive here)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.