Welcome to od|forum

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

sessionbeer

Helix Along Curve

Hello,

Could any one please help me with getting this helix to follow the input curve?

I have a vop that generates a helix from the input curve which is great, I just need to make it follow the input curve as a guide now which is where I'm stuck.

Appreciate any help offered,

Thanks

Helix_AlongCurve_01.hip

helix along curve.png

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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

:)

2 people like this

Share this post


Link to post
Share on other sites
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

1 person likes this

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now