On 5/16/06, Tavmjong Bah <tavmjong@...8...> wrote:
It would be nice to be able to specify how the nodes are displaced. The current algorithm appears to be based on displacing a node as a Gaussian (Bell curve) function of the distance along the path from the dragged node. This works nicely in adjusting small sections of a path (or spirals). It is not quite as effective in sculpting text (try sculpting just a few letters). One could imagine other useful algorithms:
- Displacement as a function of linear distance from dragged node.
Added yesterday. So far it's a hidden preference that you can enable, we just need to decide where to put the UI for it (controls bar or prefs dialog?)
- Displacement as a function of perpendicular distance from a line
through the dragged node and parallel to the direction of the drag.
Interesting, yes, can be added too.
- Displacement as a function of closest distance along path for closed
paths. This would avoid a discontinuity in the displacement between the first and last points of a closed path.
It already works this way. More precisely, there are two modes of measuring distance: linear and spatial. Linear mode measures distances along the path; it is used when all selected nodes are on the same subpath (i.e. are connected). In that mode there should be no discontinuities ever. Spatial mode measures distance directly along a straight line to the node, and it is used when selection is on more than one subpath. In that mode, unfortunately, there may be discontinuities - though I have an idea of how to minimize them (this needs more research). Apart from the possible discontinuities, the two modes look and feel very similar to the user, so I don't think we need to tell the user anything about them. They should "just work" as you expect them to.
- Displacement proportional to 1 - x^2/x'^2, where x is the
perpendicular distance from the dragged node and x' the perpendicular distance of the end selected nodes. This would allow "wrapping" an object around a can given #2 is implemented. (OK, this is really a parabolic displacement and one should also move points in the perpendicular direction to wrap an object around a can, but this would be a good enough approximation in many cases.)
I'm not sure I understand this, can you draw an illustration?
- When more than one path or sub-path is selected (as in selecting a
few characters or parts of a few characters), use the end nodes of the first and last path as the reference points. Currently the first and last points of the sub-path with the dragged node are used.
Currently the reference point in this case is the _farthest_ selected node no matter where it is, and this is what may cause discontinuities. But, as I said above, I already have an idea of how to fix it: basically, instead of a single farthest (reference) point, we should have one such point in each direction, and for each direction calculate the displacement based on how far the selection reaches in that direction. In a simpler way, this is already done in the linear mode: the two directions from the dragged node on the path each have its own farthest node, so each half of selection is bent smoothly within its own range and there are no discontinuities (except when you drag the first/last node of selection, of course, but then you have only yourself to blame).
- Choosing the reference points (other than the selected end nodes)
where the displacement is zero.
I think the UI for that would be too cumbersome for the user. We just need to make it work automagically in most if not all cases :)
Trying to sculpt text exposes two problems. The first is that the Object->Path function creates two overlapping end points for each closed path. I think that these two points should be merged. The second is that "Add Nodes" creates two extra overlapping nodes at the beginning/end of a close path.
Can you please submit bug reports (with examples) for that?