Jump to content

Helix Along Curve


Recommended Posts

Thanks for your suggestion SreckoM,

Unfortunately the reason why I didn't go down that route (by using a sweep sop), was because I need to apply this system to a lot of multiple curves at once, the sweep sop will simply be to much of an over head to keep the scene usable. This is why I tried to keep it to vop's or vex to get the speed gains.

Link to comment
Share on other sites

1 hour ago, f1480187 said:

// Point wrangle.

#define PI 3.1415926535897932384

float u = fit01(@u, -PI, PI) * ch("revolutions");
vector pos = set(sin(u), cos(u), 0) * ch("radius");
matrix3 t = set(v@tangentu, v@N, v@tangentv);

@P += pos * t;

Where tangents and normal was computed by PolyFrame SOP, and @u is 0..1 point's position on curve.

 

Edit > Aliases and Variables > Variables ....PI

:)

  • Like 4
Link to comment
Share on other sites

  • 5 months later...
On 5/6/2016 at 6:35 AM, f1480187 said:

// Point wrangle.

#define PI 3.1415926535897932384

float u = fit01(@u, -PI, PI) * ch("revolutions");
vector pos = set(sin(u), cos(u), 0) * ch("radius");
matrix3 t = set(v@tangentu, v@N, v@tangentv);

@P += pos * t;

Where tangents and normal was computed by PolyFrame SOP, and @u is 0..1 point's position on curve.

spiralize.gif

 

spiralize.hipnc

Thank you this is amazing

  • Like 1
Link to comment
Share on other sites

17 hours ago, haputka said:

Hi! Please take a look at an asset I've made some time ago exastly for the same purpose. You can use pscale attribute on input curve to control spiral radius alongway (see attached scene file).

Best regards

goryu_Simple_Spiral.hda

spiral_along_curve.hipnc

spiral.jpg

Thank you I will check it out, I ended up doing something similar with the example given above, added a ramp to control the radius along the curve as well

thanks again

Link to comment
Share on other sites

  • 6 months later...
20 hours ago, lazza79 said:

Hi Guys,

these are excellent examples, but if I try to do the spiral for a curve with direction 0,1,0 the spiral is not happening...

I am sure it has something to do with the trigonometry of the thing but I don't know how to solve it... Any idea?

Cheers!
Andrea

spiralize_vertical.hipnc

The Polyframe isn't calculating any vectors from the line. You can make a cheap N on the line like {1,0,0} and it will work. I've also attached a method using Entagmas sweep sop framing trick. You can switch between the 2 at the bottom to see how the different framing changes how the curve wraps (Do this on the curve, not on the line, no point there really). You can see how it holds up better especially at the top of the curve. This method works for the line without an incoming N too. Be sure to switch on the scene visualizers for point normal, tangentu and tangentv so you can see the differences in the vectors themselves, rather than just the end result. 

 

 

 

spiralize_sweep.hipnc

Link to comment
Share on other sites

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...