Filling a Complex Polygon

  scripts
  sprites
See inside
Instructions

There is 2 modes : Edit Mode & Fill Mode. You start in the Edit Mode and you switch from one mode to another by pressing space.

Edit Mode:
This is where you design your complex polygon.
- "E": create a new vertex, and place it with your mouse
- "D": delete the selectionned vertex (the one you are hovering)
- "C": erase all the vertices
- Drag a point with your mouse to change its position

Fill Mode:
The polygon is filled with a color of your choice.
- "R": refresh
- Definition: the tickness and the speed of the filling algorithm.
- Dynamic Update: update every frame (may cause some lag).
Also, you can see informations about your polygon. For now, these informations are:
- If the mouse is inside the polygon
- X & Y coordinates of the mouse
- Min and max Y of the polygon
- Time for the fill to complete

More to come!

Notes and Credits

This is a place for my experimentations with complex polygons. For now, you can see if your mouse is inside the polygon you create. More to come!

Uses this sorting method: http://scratch.mit.edu/projects/11574555/

Shared: 22 Jul 2013 Modified: 30 Jan 2014
Favorite this project 12
Love this project 18
Total views 296
View the remix tree  1
  
More projects by Mister_Guacamole