Tag Info

New answers tagged

1

Well, since you bragged about computing power... Clear@findIntersections; findIntersections[polyGroup__] := Module[{reg}, reg = RegionIntersection[ Sequence @@ DiscretizeRegion[#, PerformanceGoal -> "Quality", Method -> "DiscretizeGraphics", AccuracyGoal -> 10, PrecisionGoal -> 10] & /@ polygons[[polyGroup]]]; ...


3

polys = {Polygon[{{989, 1080}, {568, 1080}, {834, 711}}], Polygon[{{1184, 1080}, {989, 1080}, {834, 711}, {958, 541}}], Polygon[{{1379, 1080}, {1184, 1080}, {958, 541}, {1082, 370}}], Polygon[{{1470, 1080}, {1379, 1080}, {1082, 370}, {1140, 291}}], Polygon[{{1665, 1080}, {1470, 1080}, {1140, 291}, {1263, 120}}], Polygon[{{1756, 1080}, {1665, ...


3

your plot is ok. actually all polygons are plotted but because the EdgeForm & FaceForm, the plot is not clear. check this: poly = {Polygon[{{989, 1080}, {568, 1080}, {834, 711}}], Polygon[{{1184, 1080}, {989, 1080}, {834, 711}, {958, 541}}], Polygon[{{1379, 1080}, {1184, 1080}, {958, 541}, {1082, 370}}], Polygon[{{1470, 1080}, {1379, 1080}, ...


2

DensityPlot[EuclideanDistance[{x, y, 0}, {0, 0, 12}], {x, -15, 15}, {y, -4, 4}, AspectRatio -> Automatic] NIntegrate[EuclideanDistance[{x, y, 0}, {0, 0, 12}], {x, -15, 15}, {y, -4, 4}]/(30 8) (* 14.8171 *) {a, b, c, d, e} = {{0, 0, 12}, {-15, -4, 0}, {-15, 4, 0}, {15, 4, 0}, {15, -4, 0}}; coords = {{b, c, d, e}, {a, b, c}, {a, c, d}, ...


4

dist = UniformDistribution[{{-15, 15}, {-4, 4}}]; avgdist = NExpectation[Norm[{x, y, 12}], {x, y} \[Distributed] dist] (* or NExpectation[EuclideanDistance[{x, y, 0}, {0, 0, 12}], {x, y} \[Distributed] dist] *) (* 14.8171 *) Update: You can also obtain the average distance symbolically using Integrate[Sqrt[c^2 + x^2 + y^2] Boole[-a < x < a ...



Top 50 recent answers are included