immeen Posted December 9, 2020 Share Posted December 9, 2020 (edited) How should I make a pattern that spreads like a flower around the point in the video and image? mandala Pattern 546.mp4 Edited December 9, 2020 by immeen Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted December 9, 2020 Share Posted December 9, 2020 Hi chougimmeen, the edge transport-node measures distances across connected points you could ramp-animate. edge_spreading.hipnc Quote Link to comment Share on other sites More sharing options...
Librarian Posted December 26, 2020 Share Posted December 26, 2020 @immeen Only thing that you need to make those patterns its this Code Found on Sidefx Forum + this File Have Fun + you can combine that with file from @konstantin magnus , for shiny effect search Glow Run on Primitives // Construct center point vector center = 0; // Get the points of our primitive int srcpts[] = primpoints(0, @primnum); int srcvtx[] = primvertices(0, @primnum); float weights[]; // Create our attributes to store our origin points. // Note the last parameter determines type and defaults // (which is irrelevant for arrays) addpointattrib(0, 'sourcept_num', srcpts); addpointattrib(0, 'sourcept_weights', weights); addvertexattrib(0, 'sourcevtx_num', srcvtx); addvertexattrib(0, 'sourcevtx_weights', weights); addprimattrib(0, 'sourceprim_num', int(-1)); addprimattrib(0, 'sourceprim_uvw', vector(0)); foreach (int pt; srcpts) { center += point(0, 'P', pt); append(weights, 1.0 / len(srcpts)); } center /= len(srcpts); int centerpt = addpoint(0, center); setpointattrib(0, 'sourcept_num', centerpt, srcpts); setpointattrib(0, 'sourcept_weights', centerpt, weights); float singleweight[] = { 1.0 }; for (int subface = 0; subface < @numvtx; subface++) { // Set the point weights for single-sourced points setpointattrib(0, 'sourcept_num', srcpts[subface], srcpts[subface:subface+1]); setpointattrib(0, 'sourcept_weights', srcpts[subface], singleweight); // Create our triangle. int tri = addprim(0, 'poly'); setprimattrib(0, 'sourceprim_num', tri, @primnum); int vtxidx = subface; int v1 = addvertex(0, tri, primpoint(0, @primnum, vtxidx)); setvertexattrib(0, 'sourcevtx_num', v1, -1, srcvtx[vtxidx:vtxidx+1]); setvertexattrib(0, 'sourcevtx_weights', v1, -1, singleweight); vtxidx = (subface+1) % @numvtx; int v2 = addvertex(0, tri, primpoint(0, @primnum, vtxidx)); setvertexattrib(0, 'sourcevtx_num', v2, -1, srcvtx[vtxidx:vtxidx+1]); setvertexattrib(0, 'sourcevtx_weights', v2, -1, singleweight); int v3 = addvertex(0, tri, centerpt); setvertexattrib(0, 'sourcevtx_num', v3, -1, srcvtx); setvertexattrib(0, 'sourcevtx_weights', v3, -1, weights); } removeprim(0, @primnum, 0); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.