Jump to content

How to create a spiral curve in SOP?


hopbin9

Recommended Posts

  • 3 years later...
  • 10 months later...

Thanks!  Another satisfied customer!

 

 

D'oh - is it screwing up the tumbling in the perspective viewport?   Now that I have the spiral in my scene, it seems like the space bar-middle-mouse motion is 90 degrees off from what it should be.  Is there a quick-fix for that?  Still, nice spiral.  :)

Edited by johnLIC
Link to comment
Share on other sites

  • 3 years later...

vex version

  • create attribute wrangle , connect nothing
  • run over > detail(only once)
  • add below code
//create parameters;
float turns  = ch("turns");
float length = ch("length");
int   count  = chi("point_count");
vector pos;
float mask;
float rad;
float radRamp;
float radmult = ch("rad");

pos = 0;

for (int n; n<count ; n++){
    mask = (n/float(count));
    radRamp = chramp("radius_ramp",mask);
    radRamp = fit(radRamp,0,count,0,1);
    rad = radRamp * radmult * 1000;
    pos = set(sin(mask*turns)*rad,-cos(mask*turns)*rad,mask*length);
    addpoint(0,pos);
}

 

  • create add sop set to polygon > by group

Thanks!

  • Like 3
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...