Answer to Question #206868 in Java | JSP | JSF for mooooo

Question #206868

Use composition of transformations to find the composite matrix to convert the    

       object With the points               :     (2,1),       (4,1),     (4,3),       (2,3)

       into the object with the points  :   ( -3,11),    (-2,10),      (2,14),    (0,15)

 


1
Expert's answer
2021-06-15T01:28:35-0400


public float[] transformX(float[] a, float[] b, int n) {
    float[] nX = new float[n];
    for(int i = 0; i < n; i ++) {
        nX[i] = (a[i] * transformation[0][0]) + (b[i] * transformation[0][1]) + transformation[0][2];
    }
    return nX;
}


public float[] transformY(float[] a, float[] b, int n) {
    float[] nY = new float[n];
    for(int i = 0; i < n; i ++) {
        nY[i] = (a[i] * transformation[1][0]) + (b[i] * transformation[1][1]) + transformation[1][2];
    }
    return nY;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS