Jump to content

# Helix Along Curve

## Recommended Posts

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

#### Share this post

##### Share on other sites

May I suggest different approach.

Edited by SreckoM

#### Share this 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

##### Share on other sites

wire capture wire deform etc

#### Share this post

##### Share on other sites

Thanks f1480187This looks like a really good solution! And something to learn from. Thank you

#### Share this 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

#### Share this 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.

Thank you this is amazing

• 1

#### Share this post

##### Share on other sites

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

#### Share this 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

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

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

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

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

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

×
• Donations

• Leaderboard