I want to plot a 3D plot with discrete points which are derived by some math-expressions and values in the columns of a data file. My current gnuplot file looks like this:
set encoding utf8
set terminal postscript enhanced color
set output "3D.eps
set nokey
set parametric
set xlabel "X"
set ylabel "Y"
set zlabel "Z"
set title "So cool 3D plot"
fx = ($3) * (1 - ($4) * cos(u)) *(cos(($7)*pi/180)*cos(($6)*pi/180) - sin(($7)*pi/180)*sin(($6))*cos(($5)*pi/180))
fy = ($3) * (1 - ($4) * cos(u)) *(cos(($7)*pi/180)*sin(($6)*pi/180) + sin(($7)*pi/180)*cos(($6)*pi/180)*cos(($5)*pi/180))
fz = ($3) * (1 - ($4) * cos(u)) *(sin(($7)*pi/180) * sin(($5)*pi/180))
plot [u=0:2*pi] "file.txt" u fx:fy:fz t "yey"
Basically the information flow is like this:
1.) Load the file.txt and extract the values which are in the different coloumns
2.) Derive x-coordinate using the already read-in values. The x-coordinate is then dependent on the "time" variable 'u'
3.) Derive y-coordinate using the already read-in values. The y-coordinate is then also dependent on the "time" variable 'u'
4.) Derive z-coordinate using the already read-in values. The z-coordinate is then also dependent on the "time" variable 'u'
5.) plot for each line in "file.txt" the x,y,z-points for u=0...2pi
It's like a combination of parametric and datafile plot. However, my plotfile doesnt seem to work... can someone help me?
cheers,
Andre