G-Shark icon indicating copy to clipboard operation
G-Shark copied to clipboard

Subdivide by equal chord length

Open cesarecaoduro opened this issue 3 years ago • 5 comments

Subdivide a curve in equally spaced segments using the chord length

cesarecaoduro avatar Sep 13 '21 07:09 cesarecaoduro

@cesarecaoduro can you give an example of desired functionality? From the description it is the same as DivideByCount. since it produces equal spacing and therefore results in equal chord lengths between the points at the equally spaced params. Should it be DivideByMaxChordLength (akin to DivideByMaxSpacing)?

d3ssy avatar Oct 04 '21 13:10 d3ssy

@d3ssy and @cesarecaoduro, what do we want to do with this issue?

sonomirco avatar Jan 06 '23 00:01 sonomirco

If the divide by count is calculated along the curve, it is not the same distance. For the chord length, di distance between two consecutive points has to be the same. This is the secant of the obscurant circle defined by the 2 points.

image

cesarecaoduro avatar Jan 06 '23 01:01 cesarecaoduro

In the current implementation we have ParameterAtChordLength (returns a param t' from a starting param t given a chord length l), and DivideByChordLength which returns parameters along the curve spaced at equal chord lengths with whatever length is left over at the end of the curve.

Are you asking for a method that takes a COUNT and divides the curve into count-1 segments such that the chord lengths of all segments are equal?

d3ssy avatar Jan 06 '23 08:01 d3ssy

Correct

cesarecaoduro avatar Jan 09 '23 04:01 cesarecaoduro