Thanks for the "show original" tip. Makes a big difference.
If the shape has a known number of blocks (that is, we can calculate
the total enclosed area), then we can begin testing line of sight rays
toward the perimeter. If the individual ray can reach the perimeter, we
include it in the visible area. If the ray intersects a part of the
perimeter other than the part it was intended to hit (it was cut off),
then the area after that is part of the unseen area.
Then subtracting the seen area, from the total enclosed area, gives us
our unseen area.
But if the number of blocks, (that is, the total enclosed area), is
unknown, then I believe you can't calculate it.
Theoretically, there are an infinite number of rays that can emanate
from any point, however we can take our first rays in definite steps
more appropriate to the size of the total structure, until a ray is
blocked prematurely, and then backtrack with a finer degree of
angle/minute/second to nail down the area better.
If we know the size of the block which is partially unseen, I'm sure
there is a geometric method of calculation that could be used, seeing
the angle that is formed from the point which is blocking the ray, the
perimeter nearest the point of reference (or star), and the angle of
the block perimeter which is nearest to the unseen blocking point,
relative to the perimeter (line) leading back to the star.
Indeed, if we know the point where the ray intersects the wall again
after being blocked by a corner, we can simply use pythagorian theorem
to learn the length A-C of that triangle (and it will always be a
triangle if you're dealing with blocks, won't it?).
I doubt if we acutally need the lenght A-C, in this way, but it's nice
to know what "handles" you can use on a problem.
========================================
| B C
|
|
======= A
|
| *
For extra credit, figure out the relationship between the triange
formed by the * to point A, and back along the perimeter to the point
nearest the star, and the unseen area's triangle, ABC.
I'm no mathematician but the lenght from the * to the wall, compared to
the length of AB, and the length of the * to point A and the length
from point A to point C, appear to be directly related.
This appears so promising at the moment, I would scap the "ray" idea,
and concentrate on the geometrical relationship of these two triangles.
My geometry is certainly NOT up for it, just now, but if you have your
geometry books still around or post this question on the math board (or
perhaps ask Dr. Math on the net), I'm sure it could be well addressed.
Adak
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/algogeeks
-~----------~----~----~----~------~----~------~--~---