Your first goal is to create two 2d shapes that lie on a plane that is perpendicular to the light direction vector. You can do this by multiplying the world coordinates of each point by a transformation or 3D rotation matrix.
You can get a description of the rotation matrix here. Note, for your task:
z0 = 0,0,-1 z1 = light ray vector
For example, point A in the light ray coordinate system would be:
pointAL = pointA * R (R = the rotation matrix)
pointBL = pointB * R
To get the projection of these shapes onto the plane perpendicular to the light vector simply ignore the z coordinate! For example,
pointAL2D = pointAL(x), pointAL(y), 0
Now that you have two 2D shapes you need to determine how they overlap. You can do a web search for a solution or consider creating two regions from the two 2D shapes and use the AutoCAD Boolean Intersect command to create a region of the overlap.
...
lee.minardi