# How to generate points on the surface of an ellipsoid?

18 visualizzazioni (ultimi 30 giorni)
Nima il 6 Gen 2021
Modificato: Adam Danz il 12 Gen 2021
I'm looking for a method or Matlab-function to generate some points (eg. equidistant points) on the surface of a ellipsoid. A good function to do this for a sphere is available by mySphere(N). Are there any idea to solve this problem? Thanks
##### 0 CommentiMostra -2 commenti meno recentiNascondi -2 commenti meno recenti

Accedi per commentare.

### Risposte (1)

Uday Pradhan il 12 Gen 2021
Modificato: Uday Pradhan il 12 Gen 2021
Hi,
I believe you can use the ellipsoid function for this. Example:
[x,y,z] = ellipsoid(0,-0.5,0,6,3.25,3.25);
will create an ellipsoid with centre at (0,-0.5,0) and has semi -axis length (6,3.25,3.25). Now, coming to the points on the surface:
You can utilize the x,y and z variables returned by the function. Basically,
[x(i,j),y(i,j),z(i,j)] %where 1<= i,j <= 21
is a point on the ellipsoid. The 21 faces restriction can be made finer by using an extra argument for "number of faces". I hope this helps!
##### 1 CommentoMostra -1 commenti meno recentiNascondi -1 commenti meno recenti
Adam Danz il 12 Gen 2021
Modificato: Adam Danz il 12 Gen 2021
I think this generates equidistant points along the longitudes and within each latitude but not between latitudes and the points definitely aren't equidistant.
[x,y,z] = ellipsoid(0,-0.5,0,6,3.25,3.25);
plot3(x,y,z,'o')
grid on
axis equal
view(2)
set(gca,'xtick',-6:6,'ytick',-4:4)

Accedi per commentare.

### Categorie

Scopri di più su Surface and Mesh Plots in Help Center e File Exchange

R2020b

### Community Treasure Hunt

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

Start Hunting!

Translated by