Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
Tweeted twitter.com/StackMma/status/1056969285824843776
Routine clean-up
Source Link
m_goldberg
  • 108.1k
  • 16
  • 104
  • 259

Issue generating spherical Having trouble visualizing a polygon on a sphere

I'm trying to generate a spherical polygon on a unit-sphere from a set of points, but I'm running into some trouble. I've looked through previous answers to questions similar to/identical to mine:

Fast spherical polygon

An efficient circular arc primitive for Graphics3D

Geodesics on a sphere

butHowever, I am struggling to implement any of these methods myself. My problem is straightforward. Given a set of points lying on a sphere, I simply want to draw a spherical polygon by connecting the points with geodesics and then fill the area the polygon encloses with some color. I'm also trying to plot a curve that the polygon approximates and have that fillfilled with a different color on a different plot as well.

For example, the points given by:

pts = Table[{Sin[t], Sin[t]*Cos[t], Cos[t]^2}, {t, 0, Pi, .1}]
Show[ContourPlot3D[

enter image description here

Show[
x^2  ContourPlot3D[x^2 + y^2 + z^2 == 1, {x, -1, 1}, {y, -1, 1}, {z, -1, 1}, 
    ContourStyle -> Opacity[0.3], Mesh -> None], 
  ListPointPlot3D[pts], 
  Boxed -> False, Axes -> False]

[![enter image description here][1]][1] [![enter image description here][2]][2] Andenter image description here

And the curve:

Show[ContourPlot3D[Show[
x^2  ContourPlot3D[x^2 + y^2 + z^2 == 1, {x, -1, 1}, {y, -1, 1}, {z, -1, 1}, 
    ContourStyle -> Opacity[0.3], Mesh -> None], 
 ParametricPlot3D[{Sin[t], Sin[t]*Cos[t], Cos[t]^2}, {t, 0, Pi}], 
 Boxed -> False, Axes -> False
]False]

[![enter image description here][3]][3]enter image description here

These problems appear to be answered in the links I've included, but I can't implement my own set of points for some reason. I've tried replicating Joseph O'Rourke's result from Geodesics on a sphere, which is what I'm trying to make in the first place, but to no avail. [1]: https://i.sstatic.net/zuytg.png [2]: https://i.sstatic.net/n2pIA.png [3]: https://i.sstatic.net/Xqh4R.png

Issue generating spherical polygon

I'm trying to generate a spherical polygon on a unit-sphere from a set of points, but I'm running into some trouble. I've looked through previous answers to questions similar to/identical to mine:

Fast spherical polygon

An efficient circular arc primitive for Graphics3D

Geodesics on a sphere

but I am struggling to implement any of these methods myself. My problem is straightforward. Given a set of points lying on a sphere, I simply want to draw a spherical polygon by connecting the points with geodesics and then fill the area the polygon encloses with some color. I'm also trying to plot a curve that the polygon approximates and have that fill with a different color on a different plot as well.

For example, the points given by:

pts = Table[{Sin[t], Sin[t]*Cos[t], Cos[t]^2}, {t, 0, Pi, .1}]
Show[ContourPlot3D[
x^2 + y^2 + z^2 == 1, {x, -1, 1}, {y, -1, 1}, {z, -1, 1}, 
ContourStyle -> Opacity[0.3], Mesh -> None], ListPointPlot3D[pts], 
Boxed -> False, Axes -> False]

[![enter image description here][1]][1] [![enter image description here][2]][2] And the curve:

Show[ContourPlot3D[
x^2 + y^2 + z^2 == 1, {x, -1, 1}, {y, -1, 1}, {z, -1, 1}, 
ContourStyle -> Opacity[0.3], Mesh -> None], 
ParametricPlot3D[{Sin[t], Sin[t]*Cos[t], Cos[t]^2}, {t, 0, Pi}], 
Boxed -> False, Axes -> False
]

[![enter image description here][3]][3]

These problems appear to be answered in the links I've included, but I can't implement my own set of points for some reason. I've tried replicating Joseph O'Rourke's result from Geodesics on a sphere which is what I'm trying to make in the first place but to no avail. [1]: https://i.sstatic.net/zuytg.png [2]: https://i.sstatic.net/n2pIA.png [3]: https://i.sstatic.net/Xqh4R.png

Having trouble visualizing a polygon on a sphere

I'm trying to generate a spherical polygon on a unit-sphere from a set of points, but I'm running into some trouble. I've looked through previous answers to questions similar to/identical to mine:

Fast spherical polygon

An efficient circular arc primitive for Graphics3D

Geodesics on a sphere

However, I am struggling to implement any of these methods myself. My problem is straightforward. Given a set of points lying on a sphere, I simply want to draw a spherical polygon by connecting the points with geodesics and then fill the area the polygon encloses with some color. I'm also trying to plot a curve that the polygon approximates and have that filled with a different color on a different plot as well.

For example, the points given by:

pts = Table[{Sin[t], Sin[t]*Cos[t], Cos[t]^2}, {t, 0, Pi, .1}]

enter image description here

Show[
  ContourPlot3D[x^2 + y^2 + z^2 == 1, {x, -1, 1}, {y, -1, 1}, {z, -1, 1}, 
    ContourStyle -> Opacity[0.3], Mesh -> None], 
  ListPointPlot3D[pts], 
  Boxed -> False, Axes -> False]

enter image description here

And the curve:

Show[
  ContourPlot3D[x^2 + y^2 + z^2 == 1, {x, -1, 1}, {y, -1, 1}, {z, -1, 1}, 
    ContourStyle -> Opacity[0.3], Mesh -> None], 
 ParametricPlot3D[{Sin[t], Sin[t]*Cos[t], Cos[t]^2}, {t, 0, Pi}], 
 Boxed -> False, Axes -> False]

enter image description here

These problems appear to be answered in the links I've included, but I can't implement my own set of points for some reason. I've tried replicating Joseph O'Rourke's result from Geodesics on a sphere, which is what I'm trying to make in the first place, but to no avail.

edited tags
Link
m_goldberg
  • 108.1k
  • 16
  • 104
  • 259
Source Link
Ztan
  • 193
  • 5

Issue generating spherical polygon

I'm trying to generate a spherical polygon on a unit-sphere from a set of points, but I'm running into some trouble. I've looked through previous answers to questions similar to/identical to mine:

Fast spherical polygon

An efficient circular arc primitive for Graphics3D

Geodesics on a sphere

but I am struggling to implement any of these methods myself. My problem is straightforward. Given a set of points lying on a sphere, I simply want to draw a spherical polygon by connecting the points with geodesics and then fill the area the polygon encloses with some color. I'm also trying to plot a curve that the polygon approximates and have that fill with a different color on a different plot as well.

For example, the points given by:

pts = Table[{Sin[t], Sin[t]*Cos[t], Cos[t]^2}, {t, 0, Pi, .1}]
Show[ContourPlot3D[
x^2 + y^2 + z^2 == 1, {x, -1, 1}, {y, -1, 1}, {z, -1, 1}, 
ContourStyle -> Opacity[0.3], Mesh -> None], ListPointPlot3D[pts], 
Boxed -> False, Axes -> False]

[![enter image description here][1]][1] [![enter image description here][2]][2] And the curve:

Show[ContourPlot3D[
x^2 + y^2 + z^2 == 1, {x, -1, 1}, {y, -1, 1}, {z, -1, 1}, 
ContourStyle -> Opacity[0.3], Mesh -> None], 
ParametricPlot3D[{Sin[t], Sin[t]*Cos[t], Cos[t]^2}, {t, 0, Pi}], 
Boxed -> False, Axes -> False
]

[![enter image description here][3]][3]

These problems appear to be answered in the links I've included, but I can't implement my own set of points for some reason. I've tried replicating Joseph O'Rourke's result from Geodesics on a sphere which is what I'm trying to make in the first place but to no avail. [1]: https://i.sstatic.net/zuytg.png [2]: https://i.sstatic.net/n2pIA.png [3]: https://i.sstatic.net/Xqh4R.png