
sessionbeer
Members-
Posts
89 -
Joined
-
Last visited
Personal Information
-
Name
small
-
Location
Spain
Recent Profile Visitors
2,569 profile views
sessionbeer's Achievements
Newbie (1/14)
10
Reputation
-
Thanks, Konstantin. I actually tried your mycelium set up initially, but couldn't find a way to manipulate it to look more like the desired effect. It's a very interesting setup though.
-
sessionbeer started following Circle tagents , Line tracer infection , Python callback button trigger every frame and 2 others
-
I'm trying to recreate this cool effect I came across. It looks like an infection system that's getting traced so I started to go down that path. With a basic infection step-up, I got the leading edge of the infection so I could trace it. I actually don't think that's going to work having had a look at the set up now and wondered if anyone else had any ideas of how to achieve something like this? grow_lines.mp4 infection.mov Infection_Lines_02.hip
-
Python callback button trigger every frame
sessionbeer replied to sessionbeer's topic in General Houdini Questions
Thanks, Atom! -
Python callback button trigger every frame
sessionbeer replied to sessionbeer's topic in General Houdini Questions
Thanks Atom. I'm unsure how to piece together what you've suggested and the callback script that's on node above? Where do you put a script on the playbar? -
-
Thanks @Aizatulin That's really helpful in understanding!
-
Is there a way to reverse engineer this so a Circle primitive rotates on the Z axis to point toward prim pt 1 and then work out the arc over to prim pt 2? prim pt 0 is always the center of the circle. I've mocked it up roughly here but the numbers aren't correct. arc_from_pts.hip
-
-
Getting no more errors but seems like the results are incorrect. I've made a @common attribute to hold the results which I'm expecting to be (a,b,c) but instead, I'm getting a lot more float values. Attached a hip file too to show all the errors in my ways. function float[] common_tangent_line(float x1, y1, r1, x2, y2, r2) { // Compute the common tangent line of two circles: (x1, y1) - r1 and (x2, y2) - r2 // Return in the form of line equation: ax + by + c == 0 float delta1 = (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2) - (r1 + r2) * (r1 + r2); float delta2 = (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2) - (r1 - r2) * (r1 - r2); float p1 = r1 * (x1 * x2 + y1 * y2 - x2 * x2 - y2 * y2); float p2 = r2 * (x1 * x1 + y1 * y1 - x1 * x2 - y1 * y2); float q = x1 * y2 - x2 * y1; float results[]; if(delta1 >= 0) { float a = (x2 - x1) * (r1 + r2) + (y1 - y2) * sqrt(delta1); float b = (y2 - y1) * (r1 + r2) + (x2 - x1) * sqrt(delta1); float c = p1 + p2 + q * sqrt(delta1); float l11[]; l11 = array(a,b,c); float a2 = (x2 - x1) * (r1 + r2) - (y1 - y2) * sqrt(delta1); float b2 = (y2 - y1) * (r1 + r2) - (x2 - x1) * sqrt(delta1); float c2 = p1 + p2 - q * sqrt(delta1); float l12[]; l12 = array(a,b,c); push(results, l11); push(results, l12); }; if(delta2 >= 0) { float a = (x2 - x1) * (r1 - r2) + (y1 - y2) * sqrt(delta2); float b = (y2 - y1) * (r1 - r2) + (x2 - x1) * sqrt(delta2); float c = p1 - p2 + q * sqrt(delta2); float l21[]; l21 = array(a,b,c); float a2 = (x2 - x1) * (r1 - r2) - (y1 - y2) * sqrt(delta2); float b2 = (y2 - y1) * (r1 - r2) - (x2 - x1) * sqrt(delta2); float c2 = p1 - p2 - q * sqrt(delta2); float l22[]; l22 = array(a,b,c); push(results, l21); push(results, l22); } return results; } vector point1 = @P;; vector point2 = (0,"P",1); f[]@common = common_tangent_line(point1.x, point1.y, 1.5, point2.x, point2.y, 1); Circle_Tangents_03.hip
-
Really hard to do the right homework when you don't know the right questions to ask
-
Great, thank you. Last one: How do I correct the error for a: ? if(delta1 >= 0) { l11 = { a: = (x2 - x1) * (r1 + r2) + (y1 - y2) * sqrt(delta1), b: (y2 - y1) * (r1 + r2) + (x2 - x1) * sqrt(delta1), c: p1 + p2 + q * sqrt(delta1) };
-
Thanks! I'm getting an error with the first line: function float[] common_tangent_line(x1, y1, r1, x2, y2, r2) { .... } Error: Syntax error, unexpected ',', expecting identifies (1,40).
-
Goal: Looking into tangent lines between two circles and trying to convert this function into vex. The code is originally in Java but looks like it should be easily converted to vex but I'm getting errors with my attempt below. function float[] common_tangent_line(x1, y1, r1, x2, y2, r2) { // Compute the common tangent line of two circles: (x1, y1) - r1 and (x2, y2) - r2 // Return in the form of line equation: ax + by + c == 0 delta1 = (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2) - (r1 + r2) * (r1 + r2); delta2 = (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2) - (r1 - r2) * (r1 - r2); p1 = r1 * (x1 * x2 + y1 * y2 - x2 * x2 - y2 * y2); p2 = r2 * (x1 * x1 + y1 * y1 - x1 * x2 - y1 * y2); q = x1 * y2 - x2 * y1; results = []; if(delta1 >= 0) { l11 = { a: (x2 - x1) * (r1 + r2) + (y1 - y2) * Math.sqrt(delta1), b: (y2 - y1) * (r1 + r2) + (x2 - x1) * Math.sqrt(delta1), c: p1 + p2 + q * Math.sqrt(delta1) }; l12 = { a: (x2 - x1) * (r1 + r2) - (y1 - y2) * Math.sqrt(delta1), b: (y2 - y1) * (r1 + r2) - (x2 - x1) * Math.sqrt(delta1), c: p1 + p2 - q * Math.sqrt(delta1) }; results.push(l11); results.push(l12); } if(delta2 >= 0) { l21 = { a: (x2 - x1) * (r1 - r2) + (y1 - y2) * Math.sqrt(delta2), b: (y2 - y1) * (r1 - r2) + (x2 - x1) * Math.sqrt(delta2), c: p1 - p2 + q * Math.sqrt(delta2) }; l22 = { a: (x2 - x1) * (r1 - r2) - (y1 - y2) * Math.sqrt(delta2), b: (y2 - y1) * (r1 - r2) - (x2 - x1) * Math.sqrt(delta2), c: p1 - p2 - q * Math.sqrt(delta2) }; results.push(l21); results.push(l22); } return results; }
-