Home > Enterprise >  Area of Coplanar Rectangle Segment From Line Intersection
Area of Coplanar Rectangle Segment From Line Intersection

Time:06-16

I know a lot of adjacent questions like this have been answered, but none match my current requirements.

I'm trying to determine the area of a polygon made by a coplanar rectangle-line intersection, using only the below information.

Problem Description

Does anybody know of some way to determine the area of the segment (A1) based off the distance to the intersection line and angle between (r,u)? My intuition tells me there should be some some general function A1 = f(d,r,u,c), similar to (https://mathworld.wolfram.com/CircularSegment.html) but everything i've found seems to rely on finding the points where the line segments intersect. The env. i'm using only has trig functions, and no linear algebra modules, so some predefined function would make a world of difference...

Thanks in advance.

CodePudding user response:

Hints:

Let c be the cosine of the angle between r and u, and s the sine. In a frame centered at C and aligned with r, the equation of the line is

s.X - c.Y = d

It intersects the lines X=±W/2 and Y=±L/2 at the points

X = (d ± c.L/2) / s, Y=±L/2

and

Y = (± s.W/2 - d) / c, X=±W/2

If you draw s from c as √(1-c²), you see that the functional relation between c and the sides of the triangle or trapezoid to be removed is an algebraic fraction. So the function after which you are is a piecewise algebraic fraction of the cosine. You can delimit the pieces by finding the critical angles, i.e. those for which the line passes through a corner. They respond to the equations

± s.W ± c.L = 2d

There are eight solutions. You can do all computations with the four basic operations and the square root.

  • Related