Quantcast
Channel: 3D Graphics - Programmers Heaven
Viewing all articles
Browse latest Browse all 87

Assignment help

$
0
0
Does anyone have a solution or approach for this?

1) Create a 500x500 window.
2) Draw a 10x10 grid (by default) that spans the window.
3) Allow the user to select a point at any position in the window and move
the point freely.
4) The grid must be redrawn to simulate a rubber-sheet transformation.
5) Implement this transformation by using a cosine function to simulate
the displacement fall-off for all grid nodes that are a distance x
away from the selected point. For instance, a displacement table can
be implemented as follows:
for(x=0; x < r*r; x++)
table[x] = (1 + cos(PII * sqrt((double) x) / r)) / 2.0;
where r is the radius of influence around the moved point.
6) Enforce frozen edges on the border of the image (they can't move).

Viewing all articles
Browse latest Browse all 87

Latest Images

Trending Articles





Latest Images