把正方形映射为圆

本文介绍了如何将正方形中的所有点映射到单位圆上,保持坐标轴上的点不变,同时归一化角落。通过考虑恒定的x和y线映射到圆内的椭圆,作者推导出相应的椭圆方程,确保圆顶曲线上的点都被覆盖。最后,展示了这种映射对不同网格线的效果,并表达了对将立方体映射到单位球面的兴趣。

把正方形映射为圆

翻译自:Mapping a Square to a Circle

  • 全部机器翻译, 看看能不能读

I wanted to come up with a nice way to map all the points in the square

我想以一种精密的方式来映射一个正方形中的所有点.

截图1:

to the points in the unit circle, such that the points along the axes are unchanged, and the corners get normalized. The way I went about this was to think of a line of constant x (as well as a line of constant y) getting mapped to an ellipse in the circle. So for our first requirement to hold true, the ellipse for some constant x has the equation

对于单位圆中的点来说, 沿着坐标轴的那些点是不变的, 角被归一化了. 在这方面我的办法是认为行的恒定 x (以及不断 y 线) 获取映射到椭圆的圈子。所以我们举行真正的第一要求,一些常量 x 椭圆有方程

截图2:

输入图片说明

Now we want to make sure that points along the curve at the top of the circle (from 45 degrees to 135 degrees) are all accounted for. So for x between -1 and 1, we want the ellipse to pass through the point

现在我们想要确保,点沿曲线顶部的圈子 (从 45 度到 135 度) 都占。所以 x-1 和 1 之间,我们想要通过点的椭圆

截图3:

输入图片说明

So we'll plug that in, and that should give us the b coefficient for our ellipse

所以我们将它打开,和那应该给我们为我们的椭圆的 b 系数

截图4:

输入图片说明

So the ellipse for constant x is

所以为常数 x 椭圆

截图5:

输入图片说明

Similarly, for a line of constant y, we get the ellipse

同样,对于恒定 y 的线条,我们得到椭圆

截图6:

输入图片说明

Solving the first for x', we get

解决第一个为 x',我们得到

截图7:

输入图片说明

Plugging this into the second equation gives

这插入第二个方程给出了

截图8:

输入图片说明

and by symmetry we can see that the mapping

由对称性,我们可以看到,映射

截图9:

输入图片说明

takes the square from -1 to 1 on the x and y axes, to the unit circle. Here's a demonstration of that mapping, which shows its effect on various grid lines.

以广场从-1 到 1 的 x 和 y 轴,到单位圆。这里是示范该映射,显示其对各种网格线的影响。

截图10:

输入图片说明

I'd like to find a way to map a cube to the unit sphere. Hopefully I can get that ready for the next post.

我想找到某种映射到单位球面的多维数据集。但愿我能,准备接下来的文章。

转载于:https://my.oschina.net/freeblues/blog/715850

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值