Quantcast
Channel: How to generate a random point inside this region/discretize it? - Mathematica Stack Exchange
Viewing all articles
Browse latest Browse all 2

How to generate a random point inside this region/discretize it?

$
0
0

Consider the following region:

theta[\[Eta]_] = 2*ArcTan[Exp[-\[Eta]]];zConicalFrustum[z1_, z2_, \[Theta]_] :=  ConvexHullMesh[  Join @@ (Map[Append[#],        CirclePoints[# Tan[\[Theta]], 100]] & /@ {z1, z2})]fout = zConicalFrustum[10, 18, theta[2.]];fin = zConicalFrustum[10, 18, theta[5.]];Dvol = RegionDifference[fout, fin];Region[Style[Dvol, Opacity[0.1]], BoxRatios -> {1, 1, 1}, Boxed -> True, Axes -> True]

enter image description here

Its intersection with the plane

plane = Polygon[{{3/2, -3/2, 18}, {3/2, 3/2, 18}, {-3/2, 3/2, 18}, {-3/2, -3/2, 18}}];

is

regInt=RegionIntersection[Dvol, plane]

Next, I want either to discretize it or generate random points belonging to it. However, I fail both of these tasks:

DiscretizeRegion[regInt, MaxCellMeasure -> MaxCellMeasureVal]]

DiscretizeRegion was unable to discretize the region BooleanRegion

RandomPoint[regInt, 3*10^4]

Argument RegionMeshCrossingCount at position 1 should be a rank 1 tensor of machine-size integers

Could you please help me with either of these tasks?


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images