cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

Partitioning a Sphere

MoeSzyslak
4-Participant

Partitioning a Sphere

All --

This isn't exactly a Mathcad question, but I do intend to use Mathcad for the calculations if I can figure out the geometry. I am interested in partitioning a unit sphere into similarly-sized curvilinear regions as shown in the attached figure. Anybody have any ideas?

I note that recent work by Paul Leopardi (http://tinyurl.com/mttg32, PDF) has resulted in a MATLAB script (http://eqsp.sourceforge.net/) that can partition the sphere into N regions of exactly the same size, but the circular regions at the poles cause problems in my specific application.

Thanks in advance.

Matt
17 REPLIES 17

I can map a rectangular grid to a hemisphere with equal areas (constant Jacobian). The shapes are somewhat variable. And there is a circular region at the pole. What is the problem with the circular region?
__________________
� � � � Tom Gutman
MoeSzyslak
4-Participant
(To:TomGutman)

I'm using the partitioned sphere to generate spherical histograms (this is a problem we have discussed here before). My fear is that because the direction of anisotropy of the histograms (which is important to me) is often "close" to the pole of the histogram, I might lose the ability to define it well if I have these circular regions (which is what I have used in the past).

Why are the circular regions necessary? Is it more difficult to create the mapping that is shown in the previous figure?

I have attached the mapping that I am currently using, though it is only in the form of an array -- I also have not figured out a very good way to present it.

Thanks.

Matt

Yes, we have discussed spherical histograms. Indeed, that is why I have this equi-area mapping.

I still don't see why a circular region is any more of a problem than any other shape region. A circular region is actually the ideal, being completely uniform. Other shapes have corners and/or aspect ratios. These can cause problems.

A sphere does not have a pole. Only the imposed coordinate system has poles. If the polar singularities fall at inconvenient locations, change the coordinate system to put the poles somewhere where they are less troublesome.

IIRC your data actually define only an orientation, not a direction. Hence a hemisphere is the proper representation. You can plot the hemisphere and its reflection to show the symmetry, if you wish.
__________________
� � � � Tom Gutman
MoeSzyslak
4-Participant
(To:TomGutman)

Tom -- excellent points. So, if I can live with the circular regions, I still have to figure out how to bin the histogram efficiently and plot the results.

I have not seen the mapping algorithm that you mentioned -- did you ever post it? Does it help with visualization?

As I type this, another possible issue with the circular regions....I can envision a plotting algorithm that creates solid bars centered at the origin and having a face defined by theta1, theta2, phi1, and phi2. It would be bulky, but I think I could code it. This would break down if I had two circular regions.

Matt
MoeSzyslak
4-Participant
(To:MoeSzyslak)

OK, so here is an updated file. The histogram function is close, but it is brute-force (i.e., slow) and more importantly, has an error. I will need to look at it a bit more closely. I still have a problem with presentation, though. Thoughts?

Thanks.

The problem with the histogram has to do with the partitioning table. It does not restrict longitudes to being between 0 and 2π, but has some entries that wrap over the 2π boundary. I don't know how the starting point for the partition of each zone is chosen, it's not the prime meridian (as one might expect).
__________________
� � � � Tom Gutman

Here is the file that includes the hemispherical mapping. Binning is easy -- Smap is invertible, you just apply the inverse and then bin the resulting rectangular coordinates.

Thing to watch for is the handling of the boundaries when reducing the sphere of directions to the hemisphere of orientations.
__________________
� � � � Tom Gutman
MoeSzyslak
4-Participant
(To:TomGutman)

Tom -- as always, a very nice worksheet. Interestingly, MC13 broke it, but it works like a charm in MC14. I'm not sure I've run across that before.

The question I still have, however, is how to make the jump from the partitioned sphere to the spherical histogram -- not logically or mathematically (you've done that quite well), but visually. What I have done in the past is to simply use a spherical stem plot. While this contains all of the necessary information, it is neither visually appealing nor intuitive to interpret. Ideally, I would have (solid?) bars extending from the center such that "fuller" bins would have correspondingly larger surface areas.

Any thoughts?

Thanks.

Ah, MC13's incorrect "correction". Bit of a nuisance, that. If one needs to one can break up the offending assignment into two parts, which MC13 can handle.

You can't draw actual bars in the spherical plot. They would have to be a pyramidal construct. You could, for each cell in the histogram, define a square centered in the cell with an area proportional to the count in that cell, and then map these squares onto the sphere. These figures would connect through the point at the origin. But since the shapes are a bit irregular, I'm not sure how visually compelling that would be.

You can interpolate a surface through the counts. That would result in a figure logically similar to the stem graph you've been using, but as a continuous surface. The biggest issue is at the borders, where the two hemispheres meet with reversals. That has to be taken into account when doing the interpolation. I would start with the counts (suitably scaled) at the center of the grid boxes, then interpolate the grid points. After that it's a simple grid and further interpolation is simple (if needed).
__________________
� � � � Tom Gutman
MoeSzyslak
4-Participant
(To:TomGutman)

Tom -- thanks a ton. For reference, here is an example of the plots I am generating and also of what I am trying to generate. I think you can see my problem.

Matt

>Here is the file that includes the hemispherical mapping<<br> __________________________

Gorgeous ! tanks

jmG
MoeSzyslak
4-Participant
(To:MoeSzyslak)

Is it possible to "automatically" interpolate a surface from a locus of points?

See attached.

On 7/29/2009 2:57:36 PM, Moe_Szyslak wrote:
>Is it possible to
>"automatically" interpolate a
>surface from a locus of
>points?
>
>See attached.
______________________________

Has it got something to do with the "partitioning of the sphere" ? It rather looks a new subject. You should specify the source of the data set ... why ? because as supplied it plots only and to "Is it possible to "automatically" interpolate a surface from a locus of points" ?

The immediate answer is YES, via construct !

Mathcad 11 plots 3D 4 ways:

1. Matrix level [array or function]
2. Nested [array or function]
3. Scatter defined on X, Y planes and Z as level
4. Scatter on point coordinates

Type 4 is what you have. A similar project was done "The project was given in the Mathcad collab June 2009". The nearest to your project is (in the work sheet I passed) Project 2: Meshing a scatter for export.

"What is a locus of points" ?

"The locus of point" if that's what you mean is the locus of point ... You can point at any indexed row and get the interpolated values [vx, vy, vz] against the interpolant "vinterp" and at any "valued proportional part on vinterp". From the demo, it would be easy to populate linearly a new data set... that will do nothing or worst for the 3D plot, but you would have an export. The matter is to compact the demo in a piece of program running over the 510 points and meshed... let's say 10.

jmG



Yes, you can interpolate a surface from a set of points (given as three vectors). But ... the surface is interpolated by an interpolation of the form z=f(x,y). If the surface is not describable in that form, it will not interpolate properly. In particular, you cannot draw a sphere using three vectors. Shperes have to be drawn using three matrices, as a deformation of a square (or at least rectangle).
__________________
� � � � Tom Gutman

On 8/2/2009 6:57:37 PM, Tom_Gutman wrote:
>Yes, you can interpolate a surface from a set of points (given as three vectors). But ... the surface is interpolated by an interpolation of the form z=f(x,y). If the surface is not describable in that form, it will not interpolate properly. In particular, you cannot draw a sphere using three vectors. Shperes have to be drawn using three matrices, as a deformation of a square (or at least rectangle).
__________________
Tom Gutman
>..............................

I think the original request is not clear and the data supplied aren't a surface from a datum plane. The first part in the attached sheet is the same as before + tutorial added. Next is an attempt to "Stereographic Projection" of two data sets:
1. the collab original ... a kind of semi-spherical calotte.
2. a true spherical noisy data set (an old collab project).

For what it is worth !

jmG

... work in progress,

No problem to interpolate the data set, but it does not make the surface plot look any smoother from linterp(,,,) between the two nearest points. The Mathcad built-in "scatter meshing" is surely not linear, cubic spline ?, quadratic splines ? B_spline ? B�zier spline ? what else ? And this is not a good example of a rough surface plot because no datum plane (again).

Any smart idea, or more patience: welcome !

Be careful: as expected, the 3D is now choking !

At least, the linterpolator is easy to implement.

jmG

... (suite),

I was trying to say that the data set is noisy on the 3 vectors X, Y, Z. It does not make sense generally, but especially as an exercise. The next will be for tomorrow ... Loess on the three vectors ! Bed time.

jmG
Announcements

Top Tags