Effacer les filtres
Effacer les filtres

I am looking for a method to obtain a projection of the pattern shown in the attached figure onto a cylinder. The cylinder is shown in grey in the figure. Any help or input on how this can be done would be great.

2 vues (au cours des 30 derniers jours)
Thanks in advance!
  4 commentaires
SNyk
SNyk le 10 Jan 2017
Thanks for the reply! Yes, I have a set of points which form the blue pattern over a sphere. I want to project these points radially outward in spherical co-ordinates until they hit the cylinder.
John D'Errico
John D'Errico le 10 Jan 2017
Is the center of the sphere on the axis of the cylinder? That makes it easier of course.

Connectez-vous pour commenter.

Réponses (1)

John D'Errico
John D'Errico le 10 Jan 2017
Note that a radial projection in spherical coordinates may send some points to infinity, and other points may get get sent a long ways outwards along the axis of the cylinder.
If the sphere center lies on the cylinder axis, then things get easier. We could just translate the center to the origin. Then, after the projection, just add the center back in to reverse that translation.
So, first, consider any point in spherical coordinates, centered at the origin. We can represent that point using three coordinates: (rs,theta,phi).
In the cylindrical coordinate system, theta will stay the same, but the polar radius would become rs*cos(phi), and the axial (z value) would become rs(sin(phi)).
(rs*sin(phi),rs*cos(phi),theta)
If you will project a point radially outwards until the ray intersects with the cylinder surface, this requires only that we scale rs by a simple factor k. So if rc is the radius of your cylinder, then we find where that ray intersects the cylinder as:
rc = rs*cos(phi)*k
so
k = rc/(rs*cos(phi))
Note that when phi is pi/2, k diverges to inf. As I said, the projection may result in a point at infinity.
The projected point now becomes (in cylindrical coordinates):
(rc*tan(phi),rc,theta)
As I said before, if phi is +/- pi/2, the projection goes to +/- inf in z. Again, you can add back in any translation that was done before for the origin.
Things get slightly messier if the sphere origin does not lie on the axis of the cylinder, but not that nasty. Arbitrarily, translate the spherical coordinate system to the origin. Then the cylindrical coordinate system also moves, but there is still an offset of that axis. I won't get into this unless I need to though.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by