[[Template core/front/profile/profileHeader is throwing an error. This theme may be out of date. Run the support tool in the AdminCP to restore the default theme.]]
Community Reputation
10 GoodAbout sessionbeer

Rank
Peon
Personal Information

Name
small
Recent Profile Visitors
2,451 profile views

Thanks @Aizatulin That's really helpful in understanding!

sessionbeer started following Keyboard nudge, arc from three points (vex), Circle tagents and and 2 others

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

Thanks for all the helpful tips, I got it working finally

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; }

Thanks, @Aizatulin How would you get it to loop through more than 4 points?

Wish there were some example files on Houdinigubbins, be amazing to explore all of those curve examples.

Has anyone done a biarc interpolation of a curve in Houdini? https://www.ryanjuckett.com/biarcinterpolation/

Looking for a more interactive solution in the viewer. I have 50+ objects in the scene seen from a Front camera. Need to select one of the objects and move in Z to layer the objects over one another.

Is it possible to script or set something to use the keyboard arrows to nudge the position of an object by a set distance? Example: User selects a geometry in the scene and presses shift+up arrow to move the object up by 0.1 in Z

@Alain2131 Thank you for your detailed reply, extremely grateful for how you broke everything down! You should become a teacher