MFEK / math.rlib

A library which supplies mathematics and algorithms for manipulating beziers.
Apache License 2.0
7 stars 4 forks source link

Create bezier #23

Closed prajwalprabhu closed 2 years ago

prajwalprabhu commented 2 years ago

Returns the control points if you pass knot(end) points of bezier. the control points will form an smooth cubic bezier curve

ctrlcctrlv commented 2 years ago

Woah, what's with the big patch to src/glyphbuilder/mod.rs? Is this just rustfmt? That'd be dangerous to merge if it will change existing behavior.

prajwalprabhu commented 2 years ago

Woah, what's with the big patch to src/glyphbuilder/mod.rs? Is this just rustfmt? That'd be dangerous to merge if it will change existing behavior.

ya it is just rustfmt

prajwalprabhu commented 2 years ago

Removed some of the unwanted commit messages

ctrlcctrlv commented 2 years ago

Does this code respect PointType::Line yet

prajwalprabhu commented 2 years ago

Ya it respects PointType::Line ,we don't need a control point for it,So it only calculates control points for PointType::Curve

ctrlcctrlv commented 2 years ago

Thanks for your contribution…what name should go in AUTHORS file? T. Prajwal Prabhu? T stand for anything, or would you prefer it just to be T.? :)

ctrlcctrlv commented 2 years ago

(Sorry for my ignorance, but if T. has a meaning similar to Dr/Ms/… then please tell me that too because it shouldn't be there in that case)

prajwalprabhu commented 2 years ago

(Sorry for my ignorance, but if T. has a meaning similar to Dr/Ms/… then please tell me that too because it shouldn't be there in that case)

T is part of my name which refers to my family.

ctrlcctrlv commented 2 years ago

Thanks :) I merged this, fixed the merge conflict in #21, merged #21, and added you to AUTHORS/README in https://github.com/MFEK/math.rlib/commit/08b002c939f2167e27e724b84e455c4e49855993. Hope to see more useful work from you :D when will we have simplify do you think?

prajwalprabhu commented 2 years ago

Thanks :) I merged this, fixed the merge conflict in #21, merged #21, and added you to AUTHORS/README in 08b002c. Hope to see more useful work from you :D when will we have simplify do you think?

Thank you for the merge. Regarding simplify , We have to make decision whether we could remove the knot point or not ,So I'm still struggling in that part . Do you have any idea about it ?(as you have contributed to fontforge)

Then we will have : starting point ending point old control points and slope of the line on which the new CP should be , *and we could use the old end point as a point on the curve Then we could go with kind off trial and error ,we will increase or decrease the y on line joining CP and endpoint ,and we will get the curve and we will check whether the point exist or not on the curve with that CP.