0

I know that to scale verticies I simply have to multiply by a scale factor. But I noticed that most vector drawing applications show the shapes bounding box and by dragging one of the edge it will scale the geometry toward the opposite edge, then if you go past this edge it will end up mirroring the geometry on that axis. How is scaling toward an edge done? Ex: If you select the topmost edge of a circle, it will scale toward the bottom edge of its bounding box until it looks like nothing, sort of like a raindrop that collapses when it hits the ground. I hope this is clear enough. Thanks

4

1 回答 1

2

跟踪两条边之间的原始距离,并在移动时计算新的边距。将每个点缩放到原始/新点的比例,并使用不移动的边缘作为零点,即在缩放之前从每个坐标中减去该值,然后在缩放之后将其添加回来。当两条边相遇且距离变为零时,请注意不要崩溃。

于 2010-07-14T18:36:09.387 回答