generate sphere using two coordinates

7 ビュー (過去 30 日間)
Pawan G
Pawan G 2016 年 10 月 18 日
コメント済み: Walter Roberson 2016 年 10 月 19 日
Hallo, I want to plot a sphere with diameter of distance between the two coordinate points (x1,y1,z1) and (x2,y2,z2). and also adjust the colour settings. thanks for your help.
Pawan

回答 (1 件)

Walter Roberson
Walter Roberson 2016 年 10 月 18 日
The euclidian distance between the two endpoints is the diameter, and the mean of the coordinates is the center point. After that it is standard creation of a sphere with known center and radius.
The method of creating the sphere is going to depend on what properties you want it to have. For example if you do standard lat/long banding then you need to decide where the poles are to be.
  2 件のコメント
Pawan G
Pawan G 2016 年 10 月 19 日
編集済み: Walter Roberson 2016 年 10 月 19 日
Hallo Walter Roberson, for some reasons its not working.
x = [-10 -25 -46]
y = [12 12 12]
z = [124 124 124]
x_sigma = [1010 2568 4600]
y_sigma= [124 124 124]
z_sigma = [124 124 124]
there are 3 sets of 3d coordinates. I want 3 spheres with translucent colour combination with radius (x,y,z) to (x_sigma,y_sigma,z_sigma). I tried many possibilites but dint work. could you please help me.
Walter Roberson
Walter Roberson 2016 年 10 月 19 日
"with radius (x,y,z) to (x_sigma,y_sigma,z_sigma)"
Some of your x are negative; it does not make sense to use negative values as a radius.
Your x, y, and z values are not equal, but you indicate you want to use them as radius; are you looking for the 3D equivalent of an ellipse, different radius around different axes?
I do not understand the role of x_sigma, y_sigma, z_sigma.
Should the first sphere have one pole at (x(1), y(1), z(1)) and the other pole at (x_sigma(1), y_sigma(1), z_sigma(1)) ?

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by