openglES - 给一个弯曲的效果在墙上的图片弯曲、墙上、效果、图片

2023-09-08 10:53:09 作者:此用户不存在

我开始与openglES(在Android)。

I am starting with openglES (on android).

我在我的应用程序在墙上的照片。我已经做了一个简单的瓷砖墙在那里我可以用转换和缩放浏览,并实现了一个简单的分拣系统。

I have in my app a wall of pictures. I have already made a simple tiled wall where I can browse with translations and zooms, and implemented a simple picking system.

现在我想给这面墙弯曲的效果就像我们经常可以看到(如在野生动物园,看到我的图片)

Now I would like to give this wall a curved effect like we can see often (like in safari, see my images)

你觉得我可以通过应用simples做(幼稚..)Y-旋转和Z-翻译为每一分?

Do you think i can do it by applying simples (naive..) Y-rotations and Z-translations on each tile?

我的第一个为例,似乎这样做wheras我的第二个看起来更为复杂。

My first exemple seems to do that wheras my second looks more complicated.

您能给我一些想法或一个解决方案,如果你已经做到了为您的项目?

Can you give me some ideas or a solution if you already did it for one of your project??

。例1:摩托罗拉Xoom

Exemple 1 : motorola xoom

。例2:野生动物园热门网站

Exemple 2 : safari top sites

推荐答案

只是把它写在纸上。启动与任何半径你想你的照片奠定了在一个圆圈,然后找出数学计算每个物体沿着圆圈的位置和平移/旋转每个图像/多边形它的正确位置。然后,你可以做其余的两种方法之一,你可以有旋转所有图像绕垂直轴旋转的变量,或者你可以旋转你的相机看你的照片墙上的不同点。如果你想获得真正看中的,您可以将您的图像应用到曲面,这样,而不是一堆扁平多边形,你实际上可以看弯曲的图像。

Just write it out on paper. Start with a circle of whatever radius you want your pictures laid out in, then figure out the math to calculate a position along that circle for each object and translate/rotate each image/polygon to it's correct location. Then you could do the rest in one of two ways, you could have a rotation variable that rotates all your images around the vertical axis, or you could rotate your camera to look at a different spot on your picture wall. If you wanted to get really fancy, you could apply your images to curved surfaces so that rather than being a bunch of flat polygons, you could actually be looking at the curved images.