|
From: Thomas S. <t.s...@fz...> - 2009-12-16 20:21:16
|
interesting: splot '-' u 1:2:3:4 w pm3d seems to work. Thomas Sefzick wrote: > > 'set pm3d depthorder' > should according to the manual work in the same way as the > normal hidden3d algorithm. > but it obviously doesn't do this. > > > renzresearch wrote: >> >> Thank you Thomas, >> >> The sphere was just an example. It is not what I want to >> draw. The following script is closer to my real case, which >> draws a triangle and a quadrangle. depthorder is used, but >> the quadrangle is always in the foreground and the triangle is >> always in the background. Does the option depthorder mean the >> drawing order is sorted? >> >> Zhong >> >> >> set terminal x11 0 size 1024,1024 >> set view equal xyz >> unset surface >> unset contour >> set xlabel "x" >> set xrange [ 6.31720 : 43.9094 ] noreverse nowriteback >> set ylabel "y" >> set yrange [ 80.5847 : 118.177 ] noreverse nowriteback >> set zlabel "z" >> set zrange [ 13.7818 : 51.3741 ] noreverse nowriteback >> set pm3d implicit at s >> set pm3d depthorder >> set pm3d interpolate 1,1 flush begin ftriangles hidden3d 100 >> corners2color mean >> set palette defined ( 0 0.8275 0.8275 0.8275, 0.1667 0.6275 >> 0.1255 0.9412, 0.5 1 0.498 0.3137,\ >> 0.8333 1 1 0, 1 0.5647 0.9333 0.5647 ) >> splot '-' u 1:2:3:4 >> 14.7151 89.5297 25.4546 0 >> >> 14.7151 89.5297 25.4546 0 >> 14.807 87.5368 24.2974 0 >> 16.5296 89.0361 24.1387 0 >> >> >> 20.3047 93.7361 25.7469 0 >> 22.1518 92.287 25.0393 0.0215407 >> >> 21.1107 92.4429 25.874 0.0188149 >> 22.9446 91.0527 24.9673 0.0366333 >> e >> >> >> ---- Original message ---- >>>Date: Mon, 14 Dec 2009 08:50:07 -0800 (PST) >>>From: Thomas Sefzick <t.s...@fz...> >>>Subject: Re: [Gnuplot-info] rotation center >>>To: gnu...@li... >>> >>> >>>in addition you should set: >>> >>>set samp 25,10 >>>set iso 10,20 >>>set urange [-pi:pi] >>>set vrange [0:pi] >>>set pm3d at s ftriangles depthorder hidden3d 100 >>>unset surf >>> >>>this makes the sphere look much better. >>> >>> >>>renzresearch wrote: >>>> >>>> >>>> >>>> ---- Original message ---- >>>>>Date: Sun, 13 Dec 2009 11:51:41 +0100 >>>>>From: Hans-Bernhard Bröker <HBB...@t-...> >>>>>Subject: Re: [Gnuplot-info] rotation center >>>>>To: re...@uc... >>>>>Cc: gnu...@li... >>>>> >>>>>Zhong Ren wrote: >>>>>> Please consider the following script that draws a sphere. >> Why >>>>>> the rotation center is not at the center of the sphere, when >>>>>> the graphics is spun by the mouse? >>>>> >>>>>Why should it be? Did you really expect gnuplot to have a >>>> special rule >>>>>like "whenever there is exactly one spherical surface among >>>> the plotted >>>>>things, rotation will magically center around that"? >>>> >>>> No, you didn't get my question. Please consider my original >>>> case again: >>>> >>>> Please consider the following script that draws a sphere. Why >>>> the rotation center is not at the center of the sphere, when >>>> the graphics is spun by the mouse? If I change to "set xrange >>>> [ 6 : 44]", the rotation center becomes the center of the >>>> sphere. This makes the behavior of one of my large >>>> applications unpredictable. Is there a way to specify the >>>> rotation center? If not, how is the center selected by >> Gnuplot? >>>> >>>> set terminal x11 0 size 1024,1024 >>>> set parametric >>>> set view equal xyz >>>> set xlabel "x" >>>> set ylabel "y" >>>> set zlabel "z" >>>> set xrange [ 6 : 43] >>>> set yrange [80 : 118] >>>> set zrange [13 : 51] >>>> set pm3d implicit at s >>>> splot 10*cos(u)*cos(v)+25,10*cos(u)*sin(v)+99,10*sin(u)+33 >>>> >>>> The rotation center is indeed at the spherical center when >>>> xrange is [ 6 : 44], because (6+44)/2 = 25, which is exactly >>>> the spherical center. When xrange is [ 6 : 43], the rotation >>>> center should be (6+43)/2 = 24.5, but it is not. It is near >>>> x=33. What makes Gnuplot to select the rotation center? >>>> >>>>> >>>>>> If not, how is the center selected by Gnuplot? >>>>> >>>>>Mouse rotates the entire graph box, so, kind-of obviously, >> it is >>>>>centered around the center of the graph box. So if you want >>>> rotation to >>>>>be around a particular point, make all three axis ranges >>>> symmetric >>>>>around it: >>>>> >>>>> set xrange [mid_x - size_x : mid_x + size_x] >>>>> # likewise for y and z >>>>> >>>> >>>> This is what I thought, but it is not working for me as the >>>> example I gave above. Gnuplot seems to have a complex rule to >>>> select the rotation center. I really prefer a user selected >>>> rotation center. >>>> >> ------------------------------------------------------------------------------ >>>> Return on Information: >>>> Google Enterprise Search pays you back >>>> Get the facts. >>>> http://p.sf.net/sfu/google-dev2dev >>>> _______________________________________________ >>>> gnuplot-info mailing list >>>> gnu...@li... >>>> https://lists.sourceforge.net/lists/listinfo/gnuplot-info >>>> >>>> >>> >>>-- >>>View this message in context: >> http://old.nabble.com/rotation-center-tp26763320p26779919.html >>>Sent from the Gnuplot - User mailing list archive at Nabble.com. >>> >>> >>>------------------------------------------------------------------------------ >>>Return on Information: >>>Google Enterprise Search pays you back >>>Get the facts. >>>http://p.sf.net/sfu/google-dev2dev >>>_______________________________________________ >>>gnuplot-info mailing list >>>gnu...@li... >>>https://lists.sourceforge.net/lists/listinfo/gnuplot-info >> >> ------------------------------------------------------------------------------ >> Return on Information: >> Google Enterprise Search pays you back >> Get the facts. >> http://p.sf.net/sfu/google-dev2dev >> _______________________________________________ >> gnuplot-info mailing list >> gnu...@li... >> https://lists.sourceforge.net/lists/listinfo/gnuplot-info >> >> > > -- View this message in context: http://old.nabble.com/rotation-center-tp26763320p26817820.html Sent from the Gnuplot - User mailing list archive at Nabble.com. |