我该如何实现纹理映射在OpenGL汽缸?汽缸、纹理、我该、如何实现

2023-09-07 13:58:01 作者:薄情。(寒心)

我知道该怎么做四边形,那是pretty的直观与U,V纹理坐标,但我有一个很难搞清楚了这一点。任何帮助是AP preciated。

I know how to do quads and that was pretty intuitive with the u,v texture coordinates but I'm having a hard time figuring this out. Any help is appreciated.

推荐答案

试想一个圆柱体的参数重新presentation

Try to think about the parametric representation of a cylinder

cylinder(u, v):
    x = r * cos(u * 2*pi)
    y = r * sin(u * 2*pi)
    z = v

U 和 v 正是那些你为纹理坐标使用的值。

u and v are exactly those values you'd use as texture coordinates.