Answers for "determine how much space is left on screen"
http://answers.unity.com/questions/25681/determine-how-much-space-is-left-on-screen.html
The latest answers for the question "determine how much space is left on screen"Answer by Wolfram
http://answers.unity.com/answers/25687/view.html
<p>Does is have to be pixel-precise? If so, I guess you'd have to count pixels one way or another. For example, instead of just drawing on the screen, also "draw" into a 2D array mask. You can stop if every entry of that array has been set (if you scan linearly for entries that haven't been set yet, note you can bail out at the first unset entry you find, and don't need to process the complete array everytime).</p>
<p>It is very likely that there are GPU/Shader functions to help you with that (i.e., determining whether all pixels of a mask have been set/reset), but I haven't looked into that.</p>
<p>If your result doesn't need to be pixel-precise, you can use an analytical method - but since that would have to be determined over all circles drawn so far, it is likely to be more expensive. Start with the surface area of your display, width*height in pixels. If you draw a circle, subtract its area from that value (take care of clipping near the borders by re-adding the area of the clipped circle segments). If you now move the mouse/finger (and maybe change the radius), you can compute the area difference between two consecutive frames by computing the area of the resulting crescent between these two circles. However, you would need to clip any new circle that is to be drawn against <em>all</em> other circles that have been drawn already, to determine the overlap and only subtract the area that's actually "new". This last step makes the analytical method probably not feasible.</p>Mon, 23 Aug 2010 14:56:38 GMTWolfram