Jun 24, 2019 19:23:13

Yesterday I wrote about a problem I had with bezier curves. I needed to divide a bezier curve into segments of equal length. This is a tricky mathematical problem  and there are a lot of different solutions. Some solutions are slower but more accurate, others are less accurate but faster. I implemented a solution from the interactive bezier curves guide and it works well but it's rather slow. It's not the most accurate solution too.

I studied the code and understood the problem quite well now so what I might do is find my own solution that would work for my special case. Today I thought about this problem a lot and I think I found something that would work quite well. I need to solve a couple of geometric equations. The current solution is quite accurate — at least it always puts objects exactly on the curve. My solution won't be that accurate but I feel that it should be quick and accurate enough to beat the current algorithm for my problem. It probably won't be as janky as the current one too which is a pretty good thing!

The current solution finds a lot of points on the curve and then finds the ones that fit that distance good enough. I'm probably going to write about my solution here too when I will implement it.

• 1

@zyumbik - I like how you used the word 'janky' here. It stirs up my thoughts because one, it's slang, two, it's not in any way a precision term -- rather communicating some sort of distaste at the cobbled result - but yet, you're applying it to a mathematical solution. Cool.

Brian Ball | Jun 24, 2019 09:13:20
contact: email - twitter / Terms / Privacy