它不改变顺序在x方向剪切变换 [英] Shear transformation which doesn't change the order in x-direction

查看:214
本文介绍了它不改变顺序在x方向剪切变换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

给定一组具有不等的x坐标的点,我希望计算值v> 0,使得剪切变换(X,Y) - >(X + V * Y,Y)不改变顺序在x方向上。

Given a set of points with unequal x-coordinates, I want to calculate the value v > 0 such that the shear transformation (x, y) -> (x + v*y, y) doesn't change the order in the x-direction.

推荐答案

这并不困难。订购点,他们的x轴。由于剪切变换的连续性,这是足以让你找到的最大的信息v两个连续的点(在X级)不改变顺序。设(X,Y)和(x',y')的是连续的两个点中的排序。用v> 0,在x坐标变化为x - > X + VY和X' - > X'+ VY'。现在,作为X'> X,你想找到的最大v的X'+ VY'> = X + VY。通过线性度,它足以解决

This isn't difficult. Order the points by their x-axis. Because of the continuity of the shear transformation, it's enough for you to find a maximum v that two consecutive points (in x-order) do not change order. Let (x,y) and (x',y') be two consecutive points in your ordering. with v>0, the x coordinates change as x -> x + vy and x' -> x' + vy'. Now as x'>x, you want to find maximum v such that x' + vy' >= x + vy. By linearity, it's enough to solve

x' + vy' = x + vy

x' - x = vy - vy' = v(y - y')

这样

v = (x' - x)/(y - y')

如果结果是否定的,则v的任何值的推移(点被移动推远);如果结果是肯定的,就是这样的一对(X,Y),(X',Y')可以容忍的最大值。现在,所有的连续对计算这个最大的,并采取了最低。

If the result is negative, then any value of v goes (the points are moving farther away); if the result is positive, that's the maximum value that the pair (x,y), (x',y') can tolerate. Now calculate this maximum for all consecutive pairs and take their minimum.

请注意,如果Y = Y',V是不确定的。在这种情况下,点位于在上Y轴的同一点和剪切变换不改变他们的距离。

Note that if y = y', v becomes undefined. In this case the points lie at the same point on y-axis and the shear transformation doesn't change their distance.

这篇关于它不改变顺序在x方向剪切变换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆