forum.alglib.net
http://forum.alglib.net/

Graphic texture coords
http://forum.alglib.net/viewtopic.php?f=2&t=422
Page 1 of 1

Author:  eagleoriginal [ Sat Aug 27, 2011 12:10 pm ]
Post subject:  Graphic texture coords

Hellow mans.

How do you determine a match, the texture coordinates in the space of hydrocarbons in the plane of the triangle. Ie each point of the triangle correspond to the coordinate of U / V. question.
As an arbitrary point lying inside the triangle to determine the value of U / V.
And vice versa respectively from the known coordinates to determine the UV coordinates of a point on the plane.

The task of converting from one coordinate system to another with take into account the perspective distortion. Prior to that used by the parties pending the coefficients, but they give a large error.
Required algorithm described above is used in video cards for texturing. They laid there in hardware. But as it is clear that the algorithm should be accurate. What sort of interpolation is used for?

Thanks.
-----------------------------------
Оригинал на русском.


Как определяется соотвествие текстурных координат УВ в пространстве треугольника на плоскости. Т.е. каждой точек треугольника соответсвует координата U / В. Вопрос.
Как в произвольной точке лежащей внутри треугольника определить значение U / В.
Ну и соответсвенно наоборот по известной УВ координате определить координаты точки на плоскости.

Задача в преобразовании из одной системы координат в другую с учтем перспективных искажений. До этого использовались коэффициенты отложенные на стороны, но они дают большую погрешность.
Требуемый алгоритм описанный выше применяется в видеокартах, для текстурирования. Они там заложены аппаратно. Но как понятно тот алгоритм должн быть точен. Какая там интерполяция применяется?

Attachments:
File comment: Triangle (but on 3d space) with information on it vertex. I Need for 2d without Z coords. but if has method for 3d iwould use it with zero Z coord.
1221[1].jpg
1221[1].jpg [ 13.7 KiB | Viewed 3704 times ]

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/