Jump to content

Spiral around arbitrary angle


Rudinie

Recommended Posts

I could use some help to get a spiral shape around a line i made between two points.

I've got two add nodes that make two points that describe a straight line.

I can easily make a spiral in either x y or z axis with some sin and cosin expressions or a vopsop. But i want this spiral to be oriented in the direction of the line i have.

To achieve this i've tried several different approaches but without succes so far.

The easiest way would be (i guess) to make the spiral in y-axis and then rotate the whole thing to match the angle of the line but i can't get this to work. I've tried to get my head around the lookat vex function but i guess i just don't get it...

If anyone could help me a bit that would be great.

Link to comment
Share on other sites

dont forget to create correct "up" attribute as well, so the copy SOP knows exactly how to rotate the spiral

otherwise it would spin freely (randomly) around the line as you move the end points

Link to comment
Share on other sites

you don't need a copy sop to do this, here's doing everything in a vop sop.

the vector between the two ctrl points is used to build a rotation matrix, the distance between them to make a scale matrix, and the position of the first ctrl point to build a translation matrix. a unit spiral is multiplied by the combined xform matrix to do the positioning.

fun stuff for sure.

spiral_between_two_points.hip

post-4364-130894152744_thumb.jpg

Link to comment
Share on other sites

you don't need a copy sop to do this, here's doing everything in a vop sop.

the vector between the two ctrl points is used to build a rotation matrix, the distance between them to make a scale matrix, and the position of the first ctrl point to build a translation matrix. a unit spiral is multiplied by the combined xform matrix to do the positioning.

fun stuff for sure.

Wow, thanks a lot for your reply, your vopsop has definatelly got some material for further study for me.

It's more fun than a copy sop that's for sure.

The results from my earlier approach can be seen in action here by the way: http://www.vimeo.com/25565418

Edited by Rudinie
Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...