Archived post by lwwwwwws

usual way to measure colour difference is just distance in a perceptually uniform space – YUV/HSV are terrible for this but houdini can convert to L\*a\*b* which is better, it’s what the “delta-E” difference in monitor calibration uses it sorta works just doing the obvious thing with Unrefine like this but idk how you’d better take into account the position of each key… it’s kinda like camera smoothing where you want to smooth the path it takes but also the speed along that path, so maybe CHOPs-type filtering could work if you don’t mind ending up with regularly spaced keys 🔑

Attachments in this post:
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20235511/02/23/ramprefine.mp4
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20235511/02/23/Ls_Ramprefine_v01.hiplc

Archived post by WhileRomeBurns

example: www.shadertoy.com/view/Dst3D2

click to rotate through hue cycle

if you want a non linear distribution, change line 53 to something like `return pow(min(distToCenter / spokeLength, 1.0), 3.0);` or `return pow(min(distToCenter / spokeLength, 1.0), 0.25);`

the simpler version which is linked on the shadertoy comments, if you change line 63 on that bad boy you can see the distance from the offset center to the boundary parameterized to 0-1

“the spokes”

Attachments in this post:
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20234103/03/23/example_circle_rings.gif.gif
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20234103/03/23/image.png

Archived post by ajk48n

For future reference, here’s a tridiagonal solver in vex (very much not optimised, but it’s based on some Mathematica code) @jake rice 😮
“` #include #include
function complex cdiv(complex a, b) { complex conjB = conj(b); complex num = cmult(a, conjB); complex den = cmult(b, conjB); complex ans = cmult(num, CMPLX(1.0/den.real, 0)); return ans; }
function complex[] TDMAsolver(complex a[], b[], c[], d[]) { int nf = len(d); // number of equations complex p[]; complex q[]; for (int i=0;i=0; i–) { q[i] = csub(q[i], cmult(p[i], q[i+1])); } return q; } “`

Archived post by SniperJake945

I donno how many people here have every tried converting to and from barycentric coordinates, but assuming you can project your triangle so that all points lie on the x and y axis (this is easy peasy with dihedral), this is my favorite method of finding where a point is within a triangle:
“`c //pts is the three points in your triangle matrix3 gen_bary_mat(vector pts[]){ matrix3 m = set( pts[0].x, pts[0].y, 1, pts[1].x, pts[1].y, 1, pts[2].x, pts[2].y, 1); return m; } vector tri_pts[] = array({10, 4, 1}, {3,2,1}, {0, 10, 1}); vector test_pt = {6, 5, 1}; matrix3 bary_matrix = gen_bary_mat(tri_pts); vector bary_pt = test_pt * invert(bary_matrix); //solution by inversion, this is big brain printf(“bary coords: %g \n”, bary_pt); “`

this means u can pre-compute the transformation needed to project a point into bary coords

which is realllllllllllllllllllllllllllllllllllly fuckin nice if u need to do that a bunch

this also extends to tets as well, but it’d be a 4×4 matrix instead of a 3×3

it helps if everything is actually aligned to the z-1 axis, so if z is set to 1, then you can invert the solution as well to convert back to cartesian coordinates

i like to do my triangle projection with dihedral so u don’t have to worry about any kind of scaling being applied to the triangle, like so:
“`c //this would gooooooooooooo in a prim wrangle, and then ud call the resulting trs matrix in a point wrangle to apply the positional changes //big brain matrix3 m = dihedral(v@N, set(0,0,1)); matrix trs = m; matrix mov_to_orig = ident(); matrix mov_z = ident();
translate(mov_to_orig, v@P); translate(mov_z, set(0,0,1));
trs = invert(mov_to_orig) * m * mov_z; “`

iono how useful this is, but ive had to do this kind of stuff a lot on one of the projects im working on

so i thought id share it

en.wikipedia.org/wiki/Barycentric_coordinate_system#Conversion_between_barycentric_and_Cartesian_coordinates the matrix form comes from the bottom of this section. solution by inversion is just the easiest way of solving that system in houdini currently. especially since it’s a 3×3

Archived post by TOADSTORM

it’s hard to find a single sheet that covers every area of math

i found this one that has most of what i’ve seen on whitepapers

there’s also this one for set theory

Attachments in this post:
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20193609/27/19/04bb3acb0e7fa71fb47b168431c97b02.jpg
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20193609/27/19/113d4693d4edf453430927b4558f6640.jpg