Archived post by sniperjake945

yeah i mean the problem itself is slightly underdefined because there are two possible solves, one where you rotate down and one where u rotate up

but it’s actually solved with a quadratic equation so u end up with both points of intersection

here are all the intersections visualized

here’s the file that has all the math for u

and like sure this could all be done with trig but this seemed cooler

🙂

Attachments in this post:
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20232312/15/23/image.png
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20232312/15/23/Calculate_When_It_Connects_JR.hiplc

Archived post by mattiasmalmer

sometimes xyzdist() is not really what you want when you want to get distance from the edge of a font and so on because you get all these rounded corners. i wrote a quick wrangle that gives you the same type of sharp distance that an inset would give you:

“` int numprims=nprimitives(1);
float dist=10000000000000000000; for (int i=0; ipp=v@P-p0; if (dot(normalize(-normalize(p3-p1)+normalize(p0-p1)),v@P-p1)>=0) { if (dot(normalize(-normalize(p2-p0)+normalize(p1-p0)),pp)>=0) { dist=min(dist,(length(cross(pp,dir))/length(dir))); } }
}
@dist=dist; “`

(the second input is a “convertline” of the font)

Attachments in this post:
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20233912/04/23/houdinifx_CuEDfyQLMW.gif

Archived post by mattiasmalmer

sometimes xyzdist() is not really what you want when you want to get distance from the edge of a font and so on because you get all these rounded corners. i wrote a quick wrangle that gives you the same type of sharp distance that an inset would give you:

“` int numprims=nprimitives(1);
float dist=10000000000000000000; for (int i=0; ipp=v@P-p0; if (dot(normalize(-normalize(p3-p1)+normalize(p0-p1)),v@P-p1)>=0) { if (dot(normalize(-normalize(p2-p0)+normalize(p1-p0)),pp)>=0) { dist=min(dist,(length(cross(pp,dir))/length(dir))); } }
}
@dist=dist; “`

(the second input is a “convertline” of the font)

Attachments in this post:
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20232412/04/23/houdinifx_CuEDfyQLMW.gif

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