Results 59 comments of Andrew Hunter
trafficstars

It looks like the scaling algorithm starts to break down the larger the difference in offsets: I think there's probably a critical ratio between the start and the end points...

All that said, I just realised I was using the wrong scale factors for the control points when the offsets were changing. I've fixed this issue too, so the error...

Hi, I've now added a function that can do this: `distort_curve`. It's not quite the same as what you've asked for here, as it just allows for arbitrary displacement along...

I've added `nearest_t()`, `nearest_point()` and `distance_to()` functions to do this in the v0.7 branch. These all find the closest point using a Newton-Raphson search. Note that `t_for_point()` and `curve_intersects_ray()` are...

Hm, yes, I think a value of 2e-12 for the threshold for the `divisor` value does work in `ray_intersects_ray`. Not sure if there is a good way to choose this...

An arc length function is definitely something I've been meaning to add. I think a subdivision algorithm is a fine place to start, as it'll likely be fairly straightforward. For...

It does appear to be something left in from when I was testing this, and it appears to mask a bug, as removing it doesn't go well: Seems to be...

This could probably do with being moved to the main documentation, but the README file has instructions for this: ```Rust use flo_curves::*; use flo_curves::bezier; let curve = bezier::Curve::from_points(Coord2(1.0, 2.0), (Coord2(2.0,...

I'm happy for you to work on this. Yes, this would work: this section of the original does exactly what you want here. I think this would need to be...

Ah, the algorithm uses Newton-Raphson to find the closest point, and the 'gaps' effect you're seeing here is what happens if it starts from a bad guess. The algorithm only...