just make a simple applet that do texture mapping
int[[]][[]] texmap = { { 0x00FF ,0xFF00 , 0x00FF , 0xFF00 } , { 0xFF00, 0x00FF , 0xFF00, 0x00FF } , { 0x00FF ,0xFF00 , 0x00FF , 0xFF00 } , { 0xFF00, 0x00FF , 0xFF00, 0x00FF } , };
int[[]][[]] image = { .... }
/** * T Top * Source: /\ /| Destination * / .\ Middle Middle / | * /. \ | * Bottom \| Botom **/
public void paintTriangleMapping ( Graphics, float dtx, float dty, float dmx, float dmy, float dbx, float dby, float stx, float sty, float smx, float smy, float sbx, float sby ) { // top middle bottom // src @ dest }
Let use a generated checkerboard first.
look at this bugged source code :