Email or username:

Password:

Forgot your password?
Luci ‘O Lantern

this ridiculous math problem i’ve been working on for 10 years, i’ve finally solved it.

It’s not an “unsolved” problem, just unsolved for me, and all the material i could find on it was over my head. Now i am here and I learned heaps along the way and made a lot of beautiful messes in desmos.

the problem was, i wanted something like a bezier spline, with control points for start and end, and two more for the angles going in.

I may do a full write up

now what was I making this for?

8 comments
Deborah Pickett

@zens Great work, beyond my ken I’m afraid.

Luci ‘O Lantern

@futzle mine too, for 10 years. now that i’ve figured it out though the solution is ridiculously simple, it was just too buried under maths jargon for me to understand.

the two lines you see in the diagram project out from the end points, and where they intersect is where the join point needs to go.

and i can calculate the angle of those lines because they’re just half way between the angle i want for each point, and the tangent angle for the join. and… done. ?! that’s it? that’s it

Luci ‘O Lantern

@futzle where i kept getting stuck is trig functions that only operate under specific angle ranges, and bits of the math that divide by zero breaking everything

because, there’s places you can put the points that result in a circle of infinite radius.

also known as a “line”

Luci ‘O Lantern

next things i’d like it to do:
- a “smoothing” paramater to make the joins c2 or c3 continuous (for squircles or motion paths that don’t want sudden changes of speed)
- a parameter to alter the tangent of the join point (sometimes referred to as ptt in the literature for some reason that is over my head). and bonus points for controlling that angle with the length of the end controls to approximate how a bezier works

Mike Lynch

@zens damn I feel this *looks at a pile of JavaScript which can partition the vertices of a 120-cell*

Go Up