Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Assignment help

principalprincipal Member Posts: 15
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).


  • CroWCroW Member Posts: 348
    what language do you writing for?writing graphics based applications for win32 is very simple,even with can use c/c++ and VB or java aswell.start with an empty window(createwindow command under win32).then use the gdi (or opengl) for line/grid drawing.

    you need to map mouse to screen-coordinates to get the position of the point.hope this helps to get you started.ask questions on more specific problems.
Sign In or Register to comment.