haki Posted May 15, 2020 Share Posted May 15, 2020 (edited) Hey everybody, I want to get better at maths and houdini seems like a fun way to do that. So, (ocean) waves are interesting and I want to make a tool that can draw stylized waves. Alright, I think I got the a classic cycloid: float x = @P.x + cos(2 * PI / wave_length * @P.x) * scale; float y = sin(2 * PI / wave_length * @P.x) * amplitude; float z = @P.z; @P = set(x, y, z); And now it gets interesting: Well, how about barrel waves? What should I be looking at to make the peaks curl, parametrically? Fourier? - which I find fascinating, but know nothing in practice. I graphed a squared cosine and my intuition is that if the blue line function were to be known... (and here it gets fuzzy) do something to the wave. Done. :)) Wave and trigonometry experts out there? A little help? Cheers! Edited June 7, 2020 by haki Quote Link to comment Share on other sites More sharing options...
Librarian Posted May 15, 2020 Share Posted May 15, 2020 (edited) I Have this In mine Collection Maybe you can just rewrite to (Wrangle ) . Hope it Helps. breaking_wave.hipnc Edited May 16, 2020 by Librarian 3 Quote Link to comment Share on other sites More sharing options...
haki Posted May 19, 2020 Author Share Posted May 19, 2020 Very interesting! Thanks for the hip. I'm looking at the VOP and to be honest I'm not good at 'reading' vop networks. I'll convert it to a wrangle see if I can get a better understanding of what's going on. The wavy lines aren't coming out of that vop, are they? Cheers! Quote Link to comment Share on other sites More sharing options...
Librarian Posted May 19, 2020 Share Posted May 19, 2020 That its just attribute transfer and some Play with Spiral and combining with this technique . Just having Fun. 1 Quote Link to comment Share on other sites More sharing options...
haki Posted May 29, 2020 Author Share Posted May 29, 2020 On 19/05/2020 at 3:25 PM, Librarian said: this technique . Insane! Thanks! Wrote the vop sop to a wrangle: matrix xform = detail(1, "xform"); matrix rot = ident(); float z_bias = chf("z_bias"); float range = chf("range"); float angle = radians(chf("angle")); @P *= invert(xform); vector domain = set(@P.x, @P.y, @P.z * z_bias); float dangle = length(domain) / range; dangle = exp(-dangle) * angle; rotate(rot, dangle, 4); @P *= rot; @P *= xform; I'll see how to build on top of that. wavelike_deform.hiplc 1 Quote Link to comment Share on other sites More sharing options...
Aizatulin Posted May 29, 2020 Share Posted May 29, 2020 Hi, just if interested, you can also capture the geometry along a curve an perform rotations using the captured attributes (like distance to curve and curve u). The results are smilar to the previous examples. Here is a file. curve_wave.hipnc 1 Quote Link to comment Share on other sites More sharing options...
haki Posted June 7, 2020 Author Share Posted June 7, 2020 I love the curve capture idea! I adapted your VEX a bit to control front and back of the wave. Do you know how to stack those rotations? I mean, chain them so that you get 2-3 waves with 2-3 extra curves? See my v1 geo - I do like the xform matrix approach there although matrices confuse me to hell most of the time. Anyway, I appreciate you help. Cheers! wavelike_deform.hiplc Quote Link to comment Share on other sites More sharing options...
Aizatulin Posted June 7, 2020 Share Posted June 7, 2020 Hi, you can capture every curve independently for example and store all attributes into arrays, but I'm not sure, if this working well. I've substituted the nearpoint values of your example by the xyzdist() values, because it can use the primgroup restriction directly. All attributes are used as arrays in a for loop. wavelike_deformA.hipnc 1 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.