Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {a Cos[t] Cos[Theta] - b Sin[t] Sin[Theta], a Cos[t] Sin[Theta] + b Sin[t] Cos[Theta]}
- {u Cos[phi]+v Sin[phi]-xe,−u Sin[phi]+v Cos[phi]-ye}
- Solve[k (u Cos[t] + v Sin[t] - xe) + d - ye == -u Sin[t] +
- v Cos[t], v][[1, 1]] /. {u -> x, v -> y, t -> -ArcTan[k]} // Simplify
- yl=(d - k xe - ye)/Sqrt[1 + k^2]
- phi=ArcTan[x2 - x1, y2 - y1]=ArcTan[k]
- {a Cos[t] Cos[Theta-phi] - b Sin[t] Sin[Theta-phi],
- a Cos[t] Sin[Theta-phi] + b Sin[t] Cos[Theta-phi]}
- Solve[a Cos[t] Sin[Theta-phi] + b Sin[t] Cos[Theta-phi] == yl, t] /. C[1] -> 0 // Simplify
- Integrate[ Sqrt[(a Cos[t] Cos[Theta-phi] - b Sin[t] Sin[Theta-phi])^2 +
- (a Cos[t] Sin[Theta-phi] + b Sin[t] Cos[Theta-phi])^2] // Evaluate, {t, t1, t2},
- Assumptions -> {{a, b, t1, t2, Theta, phi} [Element] Reals, t2 > t1,a>0,b>0}]
- a (-EllipticE[t1, 1 - b^2/a^2] + EllipticE[t2, 1 - b^2/a^2]) - yl L /2
- ellipse = TransformedRegion[
- Ellipsoid[{14, 14}, {5, 2}],
- RotationTransform[[Pi]/3]
- ];
- {p1, p2} = {{-2, 17}, {-8, 16}};
- Graphics[{Red, ellipse, Black, Line@{p1, p2}, Green, PointSize[Large],
- Point@{p1, p2}}, Frame -> True]
- ArcLength@RegionIntersection[InfiniteLine[{p1, p2}], ellipse]
- N@%
- (* (40 Sqrt[259 (-6425 + 3828 Sqrt[3])])/(2881 - 252 Sqrt[3]) *)
- (* 3.77312 *)
- Graphics[{Red, ellipse, Black, Opacity[0.5],
- HalfPlane[{p1, p2}, {0, -1}]}, Frame -> True]
- N@
- Area@RegionIntersection[HalfPlane[{p1, p2}, {0, -1}], ellipse]
- (* 3.81495 *)
Add Comment
Please, Sign In to add comment