Guest User

Untitled

a guest
Mar 24th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. {a Cos[t] Cos[Theta] - b Sin[t] Sin[Theta], a Cos[t] Sin[Theta] + b Sin[t] Cos[Theta]}
  2.  
  3. {u Cos[phi]+v Sin[phi]-xe,−u Sin[phi]+v Cos[phi]-ye}
  4.  
  5. Solve[k (u Cos[t] + v Sin[t] - xe) + d - ye == -u Sin[t] +
  6. v Cos[t], v][[1, 1]] /. {u -> x, v -> y, t -> -ArcTan[k]} // Simplify
  7.  
  8. yl=(d - k xe - ye)/Sqrt[1 + k^2]
  9.  
  10. phi=ArcTan[x2 - x1, y2 - y1]=ArcTan[k]
  11.  
  12. {a Cos[t] Cos[Theta-phi] - b Sin[t] Sin[Theta-phi],
  13. a Cos[t] Sin[Theta-phi] + b Sin[t] Cos[Theta-phi]}
  14.  
  15. Solve[a Cos[t] Sin[Theta-phi] + b Sin[t] Cos[Theta-phi] == yl, t] /. C[1] -> 0 // Simplify
  16.  
  17. Integrate[ Sqrt[(a Cos[t] Cos[Theta-phi] - b Sin[t] Sin[Theta-phi])^2 +
  18. (a Cos[t] Sin[Theta-phi] + b Sin[t] Cos[Theta-phi])^2] // Evaluate, {t, t1, t2},
  19. Assumptions -> {{a, b, t1, t2, Theta, phi} [Element] Reals, t2 > t1,a>0,b>0}]
  20.  
  21. a (-EllipticE[t1, 1 - b^2/a^2] + EllipticE[t2, 1 - b^2/a^2]) - yl L /2
  22.  
  23. ellipse = TransformedRegion[
  24. Ellipsoid[{14, 14}, {5, 2}],
  25. RotationTransform[[Pi]/3]
  26. ];
  27. {p1, p2} = {{-2, 17}, {-8, 16}};
  28. Graphics[{Red, ellipse, Black, Line@{p1, p2}, Green, PointSize[Large],
  29. Point@{p1, p2}}, Frame -> True]
  30.  
  31. ArcLength@RegionIntersection[InfiniteLine[{p1, p2}], ellipse]
  32. N@%
  33. (* (40 Sqrt[259 (-6425 + 3828 Sqrt[3])])/(2881 - 252 Sqrt[3]) *)
  34. (* 3.77312 *)
  35.  
  36. Graphics[{Red, ellipse, Black, Opacity[0.5],
  37. HalfPlane[{p1, p2}, {0, -1}]}, Frame -> True]
  38.  
  39. N@
  40. Area@RegionIntersection[HalfPlane[{p1, p2}, {0, -1}], ellipse]
  41. (* 3.81495 *)
Add Comment
Please, Sign In to add comment