I have a task for my Computer Graphics classes. I have to create an application with the following features:
- There is a dolphin floating on the screen, the user can move it around,
- The dolphin is filled with some pattern;
- At the bottom, there are water waves, filled with some color, they move right and left;
- When the dolphin gets under the waves, the intersection of the dolphin and waves should be filled with some different color.
The task is about clipping. I should have my own functions: myFill
, which takes as arguments Color
and Polygon
, and myClip
, which takes two Polygon
s and returns their intersection. In myFill
I should use scanlines this function has complexity O(1).
The main problem for me is - where to start? Should I use Windows Forms or WPF for this task? If I use WPF, Canvas (InkCanvas?) with some polygons how do I fill them then line by line? What classes will be helpful?