bulia byak wrote:
On 11/1/05, Hibbs, Phil <phil.hibbs@...1056...> wrote:
I'm guessing that you mean "nodes tool". Do you mean move a node to a different place on the line without affecting the shape of the line? I don't think this is directly possible. It may not be possible, after all, to represent the same shaped curve with nodes in different places. You could add a new node (select two nodes, press Ins, and a new node appears half way in between them), but when you delete one of the original nodes, the shape of the line changes dramatically.
There was a proposal to delete nodes without changing shape as much as possible, and Aaron started looking into it (I think). Hopefully this will be implemented soon.
I haven't started looking at this yet. Since I don't know or understand the complex math is trying to guess at the best approximation, I had planned to sample the two curve segments adjacent to the node in a configureable number of places and send that list of points to the bezier fitting functions in bezier-utils.cpp to have it find the best fitting single segment approximation (I think that it has the ability to do this with end tangent constraints). Does this sound like a reasonable idea to the people in the know?
Aaron Spike
On 11/1/05, Aaron and Sarah Spike <spike@...749...> wrote:
I haven't started looking at this yet. Since I don't know or understand the complex math is trying to guess at the best approximation, I had planned to sample the two curve segments adjacent to the node in a configureable number of places and send that list of points to the bezier fitting functions in bezier-utils.cpp to have it find the best fitting single segment approximation (I think that it has the ability to do this with end tangent constraints). Does this sound like a reasonable idea to the people in the know?
Yes - initially I was doubtful about this approach, but after some thinking I now consider it the only practical mehtod, easily working for any number of deleted nodes.
-- bulia byak Inkscape. Draw Freely. http://www.inkscape.org
bulia byak wrote:
On 11/1/05, Aaron and Sarah Spike <spike@...749...> wrote:
I haven't started looking at this yet. Since I don't know or understand the complex math is trying to guess at the best approximation, I had planned to sample the two curve segments adjacent to the node in a configureable number of places and send that list of points to the bezier fitting functions in bezier-utils.cpp to have it find the best fitting single segment approximation (I think that it has the ability to do this with end tangent constraints). Does this sound like a reasonable idea to the people in the know?
Yes - initially I was doubtful about this approach, but after some thinking I now consider it the only practical mehtod, easily working for any number of deleted nodes.
I have no idea how good it is, but a friend of mine implemented a relatively straightforward way of deleting a node from a bezier curve in the following program (license is GPL): http://magicseteditor.sourceforge.net/ As far as I understand he uses de Casteljau's subdivision algorithm backwards to obtain a reasonably approximation.
For convenience, the relevant file can be viewed here: http://cvs.sourceforge.net/viewcvs.py/magicseteditor/mse/src/Action/SymbolAc...
The relevant method is the "construct" method in the ControlPointAddAction class. (It's in a custom language btw, but it's very much like C++, so it shouldn't be too hard to understand.)
participants (3)
-
Aaron and Sarah Spike
-
bulia byak
-
Jasper van de Gronde