Rank: 448267 based on 0 downloads (last 30 days) and 0 file submitted
photo

Paul

E-mail
Company/University
University of Surrey

Personal Profile:

 

Watch this Author's files

 

Comments and Ratings by Paul View all
Updated File Comments Rating
07 Feb 2012 GridSphere Produces a nearly even grid over the surface of a sphere. Author: Kurt

Blazingly fast and well documented. Only an example would not have been unbecoming, e.g. to illustrate the fact that returned values are in degrees (whereas Matlab's sph2cart requires radians).

[lat,long] = GridSphere(1000);
latrad = deg2rad(lat);
longrad = deg2rad(long);
[x,y,z] = sph2cart(longrad, latrad, 1);
scatter3(x, y, z, 22);
axis equal vis3d;

07 Feb 2012 Find Nearest Neighbors on Sphere To be used with the GridSphere function to look up the nearest point to a query on a geodesic grid. Author: Kurt

-- Wrong page. Comment intended for GridSphere code.

07 Feb 2012 Find Nearest Neighbors on Sphere To be used with the GridSphere function to look up the nearest point to a query on a geodesic grid. Author: Kurt

Blazingly fast and well documented. Only an example would not have been unbecoming, e.g. to illustrate the fact that returned values are in degrees (whereas Matlab's sph2cart requires radians).

[lat,long] = GridSphere(1000);
latrad = deg2rad(lat);
longrad = deg2rad(long);
[x,y,z] = sph2cart(longrad, latrad, 1);
scatter3(x, y, z, 22);
axis equal vis3d;

16 Dec 2011 Fast and Robust Curve Intersections Computes intersection points of two curves. Author: Douglas Schwarz

This is an absolutely fantastic piece of code. 5* well deserved. Thank you!

That said I really regret writing this but...

To me the returned values for I and J feel awkward. Because X0 and Y0 return the intersection points in terms of the original space in which the curves lie (X,Y), I would expect the second set of returned values to give coordinates in terms of the curves themselves. So if a curve has (Euclidean) length 4.8, then I would expect 2.4 to be halfway the curve, not at 4 tenth of the second line segment.

This way we could also compute derivatives and integrals along a curve and interpolate these values simply by looking op the value at I (or J for that matter). Furthermore, the distance along the curve is a nice linear function, whereas the currently returned values for I and J are piecewise linear and non-differentiable it the points.

I understand that such a change of I and J would not be backwards compatible, and also it might be slightly (but hardly) more involved to compute, so I see the big arguments against. Nevertheless, I would be very happy if you would at least give it a thought :-)

10 Oct 2011 Function to Convert between DCM, Euler angles, Quaternions, and Euler vectors Function to convert rotation data between 4 types: DCM, Euler Angles, Quaternions, and Euler Param. Author: John Fuller

Thanks for the code, it works great.

Funny fact: the rotation matrix returned by the procrustes function in the Statistics Toolbox is quite often not orthogonal to eps.

Contact us