I have used the following code to generate a sphere of radius 8:
[x,y,z] = sphere(30);
x=x*8;
y=y*8;
z=z*8;
for now, I am trying to calculate the distance between two points on the sphere, Can you please help me? I am also looking for a method to get all neighrong points of a certain point (on sphere) within a circle of radius 0.5 ?
Thanks,
Kamal.
|
|
0
|
|
|
|
Reply
|
kamal
|
4/8/2010 8:55:23 PM |
|
"kamal abuhassan" <kamal.abuhassan@hotmail.com> wrote in message <hplfrr$r8k$1@fred.mathworks.com>...
> I have used the following code to generate a sphere of radius 8:
> [x,y,z] = sphere(30);
> x=x*8;
> y=y*8;
> z=z*8;
>
> for now, I am trying to calculate the distance between two points on the sphere, Can you please help me? I am also looking for a method to get all neighrong points of a certain point (on sphere) within a circle of radius 0.5 ?
>
> Thanks,
> Kamal.
I'll just answer your first question. If P1 = [x1,y1,z1] and P2 = [x2,y2,z2] are two vectors pointing from the center of the sphere to the two given points (x1,y1,z1) and (x2,y2,z2) on the sphere, what is the shortest great circle distance d between them?
d = 8*atan2(norm(cross(P1,P2)),dot(P1,P2));
Roger Stafford
|
|
0
|
|
|
|
Reply
|
Roger
|
4/8/2010 9:30:14 PM
|
|
"Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <hplht6$396$1@fred.mathworks.com>...
> "kamal abuhassan" <kamal.abuhassan@hotmail.com> wrote in message <hplfrr$r8k$1@fred.mathworks.com>...
> > I have used the following code to generate a sphere of radius 8:
> > [x,y,z] = sphere(30);
> > x=x*8;
> > y=y*8;
> > z=z*8;
> >
> > for now, I am trying to calculate the distance between two points on the sphere, Can you please help me? I am also looking for a method to get all neighrong points of a certain point (on sphere) within a circle of radius 0.5 ?
> >
> > Thanks,
> > Kamal.
>
> I'll just answer your first question. If P1 = [x1,y1,z1] and P2 = [x2,y2,z2] are two vectors pointing from the center of the sphere to the two given points (x1,y1,z1) and (x2,y2,z2) on the sphere, what is the shortest great circle distance d between them?
>
> d = 8*atan2(norm(cross(P1,P2)),dot(P1,P2));
>
> Roger Stafford
Thank you so much Roger
Kamal.
|
|
0
|
|
|
|
Reply
|
kamal
|
4/9/2010 11:17:20 AM
|
|
|
2 Replies
393 Views
(page loaded in 0.11 seconds)
Similiar Articles: Distance calculation in sphere - comp.soft-sys.matlabI have used the following code to generate a sphere of radius 8: [x,y,z] = sphere(30); x=x*8; y=y*8; z=z*8; for now, I am trying to calculate the distance between ... Shortest Distance between a point and a curve ? - comp.soft-sys ...Distance calculation in sphere - comp.soft-sys.matlab Shortest Distance between a point and a curve ? - comp.soft-sys ... Distance calculation in sphere - comp.soft-sys ... surface normal vector calculation - comp.soft-sys.matlab ...Distance calculation in sphere - comp.soft-sys.matlab surface normal vector calculation - comp.soft-sys.matlab ... Distance calculation in sphere - comp.soft-sys.matlab ... how to draw an arc between two points given centre and radius ...Distance calculation in sphere - comp.soft-sys.matlab how to draw an arc between two points given centre and radius ... Distance calculation in sphere - comp.soft-sys ... Driving Distances? - comp.soft-sys.sas... For a long time SAS users have calculated straight (crow-flight) distance on a sphere ... Driving Distance Calculator - Trip Calculator - TravelMath.com Calculate driving ... cylinder fitting - comp.soft-sys.matlabThe distance is just the radius of the cylinder. Then, if we can find two such points we can further ... Paxis = V(:,1:2) * [xc; yc] PS: You should check my calculation ... Rendering Shafts of Light - comp.graphics.api.opengl... observer in decreasing order according to the distance ... If a sphere's radius comes next, render the sphere by ... Render time calculator? - comp.graphics.apps.lightwave ... Magnitude of a 3d vector - comp.dspDistance calculation in sphere - comp.soft-sys.matlab Magnitude of a 3d vector - comp.dsp... deviation occurs at four locations on the unit sphere ... create plane by point and normal? - comp.cad.solidworkssurface normal vector calculation - comp.soft-sys.matlab ... Shortest Distance between a point and a curve ? - comp ... Least Square Axis to Cylinder Point Cloud - comp.soft ... problem in interface - comp.lang.fortranEmpty-sphere finder double precision rmaxes ... -- Loop for self-consistent calculation --- !r In the ... Issues of Interface - European Journal of Open, Distance ... Great-circle distance - Wikipedia, the free encyclopediaThe great-circle or orthodromic distance is the shortest distance between any two points on the surface of a sphere measured along a path on the surface of the sphere ... Distance calculation in sphere - comp.soft-sys.matlab | Computer GroupI have used the following code to generate a sphere of radius 8: [x,y,z] = sphere(30); x=x*8; y=y*8; z=z*8; for now, I am trying to calculate the distance between ... 7/26/2012 12:05:02 PM
|