Jump to content
Sign in to follow this  
mike_

Infinite knot

Recommended Posts

Helloo, i try to replicate this shape , i tought it will be easy with the sweep node but the result is not as pleasing as the exemple .. Any tips are welcome !  thanks

59f99255869dc8f5fd33cd78ae17b087.gif

Share this post


Link to post
Share on other sites

@mike_Just rotate .. with this you have endless possibility ...Have Fun ..use after add SOP or skin or copy to points that Star Shape.
 

//detail
int u = chi('u_num');
int v = chi('v_num');
float inner = chf('inner');
float outer = chf('outer');
float pi = $PI *2;

for(int i=0; i<u; i++){
    for(int j=0;j<v;j++){
        float centerX = inner +(outer -inner)*0.5;
        float torusRad = (outer -inner)*0.5;
        float X = centerX +torusRad *cos(pi / u *i);
        float Y = torusRad *sin(pi / u *i);
        vector pos = set(X*cos(pi / v*j),Y,X *sin(pi /v *j));
        
        int pt = addpoint(0,pos);
        setpointattrib(0,'u',pt,i);
        setpointattrib(0,'v',pt,j);
        
        vector centerPt = set(centerX *cos(pi / v *j), 0,centerX *sin(pi /v *j));
        vector normal = normalize(pos -centerPt);
        setpointattrib(0,'N',pt,normal);
        }
   }
int ucount = chi('ucount');
int vcount = chi('vcouont');
float height = chf('height');
float waveslid = chf('waveslid');

int uWaveCount = chi('uWaveCount');
int vWaveCount = chi('vWaveCount');

int u = point(0,'u',@ptnum);
int v = point (0,'v',@ptnum);

vector nor =v@N;

float uRatio = u /float(ucount);
float vRatio = v /float(vcount);
float pi = $PI * 2;

vector newPos = @P + nor *height * sin(pi * vRatio *vWaveCount + pi * uRatio *uWaveCount + pi * waveslid);
@P = newPos;


sec wrangle


 

sec.jpg

jk665f.gif

kni.jpg

jk665fdd.gif

Edited by Librarian
  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

I installed the two wrangle, and I'm getting some action, but it doesn't really look like my supplied heart shape. Can you recommend any settings for the two wrangles?

infinite_knot.gif

ap_lib_infinite_knot.hiplc

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
Sign in to follow this  

×