Rudinie Posted June 24, 2011 Share Posted June 24, 2011 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. Quote Link to comment Share on other sites More sharing options...
Rudinie Posted June 24, 2011 Author Share Posted June 24, 2011 I found a solution by calculating the normal of the line, and copying the spiral to that normal. Don't know why i didn't think of this before. Note to self: drink more coffee. Quote Link to comment Share on other sites More sharing options...
anim Posted June 24, 2011 Share Posted June 24, 2011 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 Quote Link to comment Share on other sites More sharing options...
brianburke Posted June 24, 2011 Share Posted June 24, 2011 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 Quote Link to comment Share on other sites More sharing options...
Rudinie Posted June 24, 2011 Author Share Posted June 24, 2011 (edited) 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 June 24, 2011 by Rudinie Quote Link to comment Share on other sites More sharing options...
brianburke Posted June 24, 2011 Share Posted June 24, 2011 The results from my earlier approach can be seen in action here by the way: http://www.vimeo.com/25565418 sweet. that's really cool. Quote Link to comment Share on other sites More sharing options...
zarti Posted June 27, 2011 Share Posted June 27, 2011 liked the video , .. esp 'the end' =) Quote Link to comment Share on other sites More sharing options...
GallenWolf Posted July 6, 2011 Share Posted July 6, 2011 @Rudinie: That is one nice fun sim Is it all cloth? Alvin Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.