Skip to main content
added 230 characters in body
Source Link
Subho
  • 1.5k
  • 1
  • 9
  • 18

Suppose, I have a closed 2D region of data points.

 𝓡 = 
  DiscretizeRegion[
   ImplicitRegion[(x - 2)^2 + (y - 3)^2 <= 1 && z == 5, {x, y, z}], 
   MaxCellMeasure -> 0.0001];
  points = RandomPoint[𝓡, 500];

enter image description here

Now, I want to compute the solid angle subtended by the region so covered at the origin. The formula is: $$\int\int_{\mathcal{R}}\sin \theta \;d\theta\;d \phi$$

I tried three ways:

pointsInPolar = ToPolarCoordinates[#] & /@ points;    
Integrate[Sin[θ], 
 Element[{r, θ, ϕ}, 
  MeshRegion[pointsInPolar, Point[Range[500]]]]]
   (*472.178*)
Integrate[Sqrt[x^2 + y^2]/
 Sqrt[x^2 + y^2 + z^2], {x, y, z} ∈ MeshRegion[points, Point[Range[500]]]]
   (*291.617*)
Integrate[Sqrt[x^2 + y^2]/
 Sqrt[x^2 + y^2 + z^2], {x, y, z} ∈ ConvexHullMesh[points]]

The last one flags an error.

None of them is closeHow to go about doing it?

Edit 1: Here is a little better region, in the expected value ofsense that I can easily determine its solid angle:

Integrate[Sqrt[x^2𝓡 += y^2]/Sqrt[x^2
  DiscretizeRegion[
   ImplicitRegion[x^2 + y^2 +<= z^2]1/2 && z == 1/Sqrt[2], {x, y, z}], 𝓡]

Out[54]= 1  MaxCellMeasure -> 0.837070001];
  points = RandomPoint[𝓡, 500000];

HowThe exact answer is $2 \pi (1-\cos \theta)$ which in this case evaluates to go about doing it?1.8403.

Suppose, I have a closed 2D region of data points.

 𝓡 = 
  DiscretizeRegion[
   ImplicitRegion[(x - 2)^2 + (y - 3)^2 <= 1 && z == 5, {x, y, z}], 
   MaxCellMeasure -> 0.0001];
  points = RandomPoint[𝓡, 500];

enter image description here

Now, I want to compute the solid angle subtended by the region so covered at the origin. The formula is: $$\int\int_{\mathcal{R}}\sin \theta \;d\theta\;d \phi$$

I tried three ways:

pointsInPolar = ToPolarCoordinates[#] & /@ points;    
Integrate[Sin[θ], 
 Element[{r, θ, ϕ}, 
  MeshRegion[pointsInPolar, Point[Range[500]]]]]
   (*472.178*)
Integrate[Sqrt[x^2 + y^2]/
 Sqrt[x^2 + y^2 + z^2], {x, y, z} ∈ MeshRegion[points, Point[Range[500]]]]
   (*291.617*)
Integrate[Sqrt[x^2 + y^2]/
 Sqrt[x^2 + y^2 + z^2], {x, y, z} ∈ ConvexHullMesh[points]]

The last one flags an error.

None of them is close to the expected value of:

Integrate[Sqrt[x^2 + y^2]/Sqrt[x^2 + y^2 + z^2], {x, y, z} 𝓡]

Out[54]= 1.83707

How to go about doing it?

Suppose, I have a closed 2D region of data points.

 𝓡 = 
  DiscretizeRegion[
   ImplicitRegion[(x - 2)^2 + (y - 3)^2 <= 1 && z == 5, {x, y, z}], 
   MaxCellMeasure -> 0.0001];
  points = RandomPoint[𝓡, 500];

enter image description here

Now, I want to compute the solid angle subtended by the region so covered at the origin. The formula is: $$\int\int_{\mathcal{R}}\sin \theta \;d\theta\;d \phi$$

I tried three ways:

pointsInPolar = ToPolarCoordinates[#] & /@ points;    
Integrate[Sin[θ], 
 Element[{r, θ, ϕ}, 
  MeshRegion[pointsInPolar, Point[Range[500]]]]]
   (*472.178*)
Integrate[Sqrt[x^2 + y^2]/
 Sqrt[x^2 + y^2 + z^2], {x, y, z} ∈ MeshRegion[points, Point[Range[500]]]]
   (*291.617*)
Integrate[Sqrt[x^2 + y^2]/
 Sqrt[x^2 + y^2 + z^2], {x, y, z} ∈ ConvexHullMesh[points]]

The last one flags an error.

How to go about doing it?

Edit 1: Here is a little better region, in the sense that I can easily determine its solid angle:

𝓡 = 
  DiscretizeRegion[
   ImplicitRegion[x^2 + y^2 <= 1/2 && z == 1/Sqrt[2], {x, y, z}], 
   MaxCellMeasure -> 0.0001];
  points = RandomPoint[𝓡, 500000];

The exact answer is $2 \pi (1-\cos \theta)$ which in this case evaluates to 1.8403.

Fixed grammar
Source Link
Michael E2
  • 244.7k
  • 18
  • 351
  • 774

Findng Finding the solid angle subtended by a closed 2D surface of data points in 3D space

Suppose, I have a closed 2D region of data points.

 𝓡 = 
  DiscretizeRegion[
   ImplicitRegion[(x - 2)^2 + (y - 3)^2 <= 1 && z == 5, {x, y, z}], 
   MaxCellMeasure -> 0.0001];
  points = RandomPoint[𝓡, 500];

enter image description here

Now, I want to compute the solid angle subtended by the region so covered at the origin. The formula is: $$\int\int_{\mathcal{R}}\sin \theta \;d\theta\;d \phi$$

I tried three ways:

  pointsInPolar = ToPolarCoordinates[#] & /@ points;    
  Integrate[Sin[\[Theta]]Integrate[Sin[θ], 
 Element[{r, \[Theta]θ, \[Phi]ϕ}, 
  MeshRegion[pointsInPolar, Point[Range[500]]]]]
   (*472.178*)
Integrate[Sqrt[x^2 + y^2]/
 Sqrt[x^2 + y^2 + z^2], {x, y, z} \[Element] 
  MeshRegion[points, Point[Range[500]]]]
   (*291.617*)
Integrate[Sqrt[x^2 + y^2]/
 Sqrt[x^2 + y^2 + z^2], {x, y, z} \[Element] ConvexHullMesh[points]]

The last one flags an error.

None of them is close to the expected value of:

In[54]:= Integrate[Sqrt[x^2 + y^2]/
 Sqrt[x^2 + y^2 + z^2], {x, y, z} \[Element] 𝓡]

Out[54]= 1.83707

How to go about doing it?

Findng solid angle subtended by a closed 2D surface of data points in 3D space

Suppose, I have a closed 2D region of data points.

 𝓡 = 
  DiscretizeRegion[
   ImplicitRegion[(x - 2)^2 + (y - 3)^2 <= 1 && z == 5, {x, y, z}], 
   MaxCellMeasure -> 0.0001];
  points = RandomPoint[𝓡, 500];

enter image description here

Now, I want to compute the solid angle subtended by the region so covered at the origin. The formula is: $$\int\int_{\mathcal{R}}\sin \theta \;d\theta\;d \phi$$

I tried three ways:

  pointsInPolar = ToPolarCoordinates[#] & /@ points;    
  Integrate[Sin[\[Theta]], 
 Element[{r, \[Theta], \[Phi]}, 
  MeshRegion[pointsInPolar, Point[Range[500]]]]]
 (*472.178*)
Integrate[Sqrt[x^2 + y^2]/
 Sqrt[x^2 + y^2 + z^2], {x, y, z} \[Element] 
  MeshRegion[points, Point[Range[500]]]]
   (*291.617*)
Integrate[Sqrt[x^2 + y^2]/
 Sqrt[x^2 + y^2 + z^2], {x, y, z} \[Element] ConvexHullMesh[points]]

The last one flags an error.

None of them is close to the expected value of:

In[54]:= Integrate[Sqrt[x^2 + y^2]/
 Sqrt[x^2 + y^2 + z^2], {x, y, z} \[Element] 𝓡]

Out[54]= 1.83707

How to go about doing it?

Finding the solid angle subtended by a closed surface of data points in 3D space

Suppose, I have a closed 2D region of data points.

 𝓡 = 
  DiscretizeRegion[
   ImplicitRegion[(x - 2)^2 + (y - 3)^2 <= 1 && z == 5, {x, y, z}], 
   MaxCellMeasure -> 0.0001];
  points = RandomPoint[𝓡, 500];

enter image description here

Now, I want to compute the solid angle subtended by the region so covered at the origin. The formula is: $$\int\int_{\mathcal{R}}\sin \theta \;d\theta\;d \phi$$

I tried three ways:

pointsInPolar = ToPolarCoordinates[#] & /@ points;    
Integrate[Sin[θ], 
 Element[{r, θ, ϕ}, 
  MeshRegion[pointsInPolar, Point[Range[500]]]]]
   (*472.178*)
Integrate[Sqrt[x^2 + y^2]/
 Sqrt[x^2 + y^2 + z^2], {x, y, z}  MeshRegion[points, Point[Range[500]]]]
   (*291.617*)
Integrate[Sqrt[x^2 + y^2]/
 Sqrt[x^2 + y^2 + z^2], {x, y, z}  ConvexHullMesh[points]]

The last one flags an error.

None of them is close to the expected value of:

Integrate[Sqrt[x^2 + y^2]/Sqrt[x^2 + y^2 + z^2], {x, y, z}  𝓡]

Out[54]= 1.83707

How to go about doing it?

added 23 characters in body
Source Link
Subho
  • 1.5k
  • 1
  • 9
  • 18

Suppose, I have a closed 2D region of data points.

 𝓡 = 
  DiscretizeRegion[
   ImplicitRegion[(x - 2)^2 + (y - 3)^2 <= 1 && z == 5, {x, y, z}], 
   MaxCellMeasure -> 0.0001];
  points = RandomPoint[𝓡, 500];

enter image description here

Now, I want to compute the solid angle subtended by the region so covered at the origin. The formula is: $$\int\int_{\mathcal{R}}\sin \theta \;d\theta\;d \phi$$

I tried three ways:

  pointsInPolar = ToPolarCoordinates[#] & /@ points;    
  Integrate[Sin[\[Theta]], 
 Element[{r, \[Theta], \[Phi]}, 
  MeshRegion[pointsInPolar, Point[Range[500]]]]]
 (*472.178*)
Integrate[Sqrt[x^2 + y^2]/
 Sqrt[x^2 + y^2 + z^2], {x, y, z} \[Element] 
  MeshRegion[points, Point[Range[500]]]]
   (*291.617*)
Integrate[Sqrt[x^2 + y^2]/
 Sqrt[x^2 + y^2 + z^2], {x, y, z} \[Element] ConvexHullMesh[points]]

The last one flags an error.

None of them is close to the expected value of:

In[54]:= Integrate[Sqrt[x^2 + y^2]/
 Sqrt[x^2 + y^2 + z^2], {x, y, z} \[Element] \[ScriptCapitalR]]𝓡]

Out[54]= 1.83707

How to go about doing it?

Suppose, I have a closed 2D region of data points.

 𝓡 = 
  DiscretizeRegion[
   ImplicitRegion[(x - 2)^2 + (y - 3)^2 <= 1 && z == 5, {x, y, z}], 
   MaxCellMeasure -> 0.0001];

enter image description here

Now, I want to compute the solid angle subtended by the region so covered at the origin. The formula is: $$\int\int_{\mathcal{R}}\sin \theta \;d\theta\;d \phi$$

I tried three ways:

  pointsInPolar = ToPolarCoordinates[#] & /@ points;    
  Integrate[Sin[\[Theta]], 
 Element[{r, \[Theta], \[Phi]}, 
  MeshRegion[pointsInPolar, Point[Range[500]]]]]
 (*472.178*)
Integrate[Sqrt[x^2 + y^2]/
 Sqrt[x^2 + y^2 + z^2], {x, y, z} \[Element] 
  MeshRegion[points, Point[Range[500]]]]
   (*291.617*)
Integrate[Sqrt[x^2 + y^2]/
 Sqrt[x^2 + y^2 + z^2], {x, y, z} \[Element] ConvexHullMesh[points]]

The last one flags an error.

None of them is close to the expected value of:

In[54]:= Integrate[Sqrt[x^2 + y^2]/
 Sqrt[x^2 + y^2 + z^2], {x, y, z} \[Element] \[ScriptCapitalR]]

Out[54]= 1.83707

How to go about doing it?

Suppose, I have a closed 2D region of data points.

 𝓡 = 
  DiscretizeRegion[
   ImplicitRegion[(x - 2)^2 + (y - 3)^2 <= 1 && z == 5, {x, y, z}], 
   MaxCellMeasure -> 0.0001];
  points = RandomPoint[𝓡, 500];

enter image description here

Now, I want to compute the solid angle subtended by the region so covered at the origin. The formula is: $$\int\int_{\mathcal{R}}\sin \theta \;d\theta\;d \phi$$

I tried three ways:

  pointsInPolar = ToPolarCoordinates[#] & /@ points;    
  Integrate[Sin[\[Theta]], 
 Element[{r, \[Theta], \[Phi]}, 
  MeshRegion[pointsInPolar, Point[Range[500]]]]]
 (*472.178*)
Integrate[Sqrt[x^2 + y^2]/
 Sqrt[x^2 + y^2 + z^2], {x, y, z} \[Element] 
  MeshRegion[points, Point[Range[500]]]]
   (*291.617*)
Integrate[Sqrt[x^2 + y^2]/
 Sqrt[x^2 + y^2 + z^2], {x, y, z} \[Element] ConvexHullMesh[points]]

The last one flags an error.

None of them is close to the expected value of:

In[54]:= Integrate[Sqrt[x^2 + y^2]/
 Sqrt[x^2 + y^2 + z^2], {x, y, z} \[Element] 𝓡]

Out[54]= 1.83707

How to go about doing it?

added 64 characters in body
Source Link
Subho
  • 1.5k
  • 1
  • 9
  • 18
Loading
Source Link
Subho
  • 1.5k
  • 1
  • 9
  • 18
Loading