11676 - Deadly Attack
Posted: Wed Jul 20, 2011 9:14 pm
Anyone who has solved this problem has critical input?? i don't catch my mistake, here's my algo:
1. With the direction angle and the spread get the two lines.
2. Test with cross product where they are from the circle
3. If they cover the entire circle return pi * r^2
4. if they cover nothing from the circle return 0
5. At least one of them intersects the circle so find the areas using line circle intersection
Need critical input please, thanks
1. With the direction angle and the spread get the two lines.
2. Test with cross product where they are from the circle
3. If they cover the entire circle return pi * r^2
4. if they cover nothing from the circle return 0
5. At least one of them intersects the circle so find the areas using line circle intersection
Need critical input please, thanks
