I`m trying to draw a sphere with X, Y, Z, R given in file with the help of gnuplot.
sphere1.dat:
# X Y Z R
219.3 342.5 3153.2 213.08
In most examples spheres are drawn this way:
set parametric
set angle degree
set urange [0:360]
set vrange [-90:90]
set isosample 72,36
splot cos(u)*cos(v),sin(u)*cos(v),sin(v)
Is there any way to combine u,v values with ones from file? Something like that:
set angle degree
set urange [0:360]
set vrange [-90:90]
set isosample 72,36
splot 'sphere1.dat' using ($4*cos(u)*cos(v)+$1):($4*sin(u)*cos(v)+$2):($4*sin(v)+$3) title "Sphere1"