|
From: jody <jod...@gm...> - 2011-04-20 15:13:56
|
Hi Amir To display the plane you have to find its parametric description, i.e. x = a1*u+b1*v+c1 y = a2*u+b2*v+c2 z = a3*u+b3*v+c3 in other words, you have to find two vectors a=(a1, a2, a3) and b=(b1, b2, b3) spanning your plane, as well as the offset c=(c1,c2,c3) then you can plot your plane like that splot [u=-5:5] [v=-5:5] a1*u+b1*v+c1, a2*u+b2*v+c2, a3*u+b3*v+c3 simple example x = u y = v z = 3 the you plot it lie this: splot [u=-5:5] [v=-5:5] u, v, 3 Jody On Wed, Apr 20, 2011 at 4:22 PM, Amir Sabbagh <ami...@gm...> wrote: > Hi Jody, > thank you very much for the answer, it helped a lot. > is it possible to dispklay both the circle and the plane? > > On 20 April 2011 13:52, jody <jod...@gm...> wrote: >> >> Hi Amir >> >> Yes. For patametric curves you first have to type >> >> set parametric >> >> next set your constants >> R=5 >> d=4 >> e=6 >> c=15 >> >> and then do the plotting (splot is for 3d plots) >> splot [t=0:2*pi] d+R*cos(t), e+R*sin(t),c >> >> Hope this helps >> Jody >> >> On Wed, Apr 20, 2011 at 12:28 PM, Amir Sabbagh <ami...@gm...> wrote: >> > Thank you Jody for the tip. The problem with this option is that I get a >> > "undefined variable: t" error when I try to splot it. >> > Maybe there is a workaround for this? >> > >> > Amir >> > >> > On 20 April 2011 12:00, jody <jod...@gm...> wrote: >> >> >> >> Hi Amir >> >> >> >> You could try a parametric version of your circle: >> >> x = d+R*cos(t) >> >> y = e+R*sin(t) >> >> z = k >> >> >> >> This gives you a horizontal circle centered at (d,e,k) >> >> For a tilted circle you would have to apply rotations >> >> around the x and/or y axis. >> >> >> >> Jody >> >> >> >> >> >> On Wed, Apr 20, 2011 at 11:36 AM, Amir Sabbagh <ami...@gm...> >> >> wrote: >> >> > Hi you all, >> >> > >> >> > I am trying to plot a circle and a plane with splot. >> >> > >> >> > I would like to have a circle at a Z=const value. I have tryed with >> >> > ternary >> >> > operation with no success. >> >> > >> >> > splot a*x+b*y+c title "Plane", \ >> >> > (x-d)**2 + (y-e)**2 - R**2==0? ((x-d)**2 + (y-e)**2 - R**2): 0/0 >> >> > with >> >> > title "Circle" >> >> > >> >> > Can someone enlight me? >> >> > >> >> > Thank you >> >> > Amir >> >> > >> >> > >> >> > -- >> >> > ************************************************************** >> >> > Amir Sabbagh >> >> > Il mio sito / My site: http://almucantarat.altervista.org >> >> > ************************************************************** >> >> > >> >> > >> >> > ------------------------------------------------------------------------------ >> >> > Benefiting from Server Virtualization: Beyond Initial Workload >> >> > Consolidation -- Increasing the use of server virtualization is a top >> >> > priority.Virtualization can reduce costs, simplify management, and >> >> > improve >> >> > application availability and disaster protection. Learn more about >> >> > boosting >> >> > the value of server virtualization. >> >> > http://p.sf.net/sfu/vmware-sfdev2dev >> >> > _______________________________________________ >> >> > gnuplot-info mailing list >> >> > gnu...@li... >> >> > https://lists.sourceforge.net/lists/listinfo/gnuplot-info >> >> > >> > >> > >> > >> > -- >> > ************************************************************** >> > Amir Sabbagh >> > Il mio sito / My site: http://almucantarat.altervista.org >> > ************************************************************** >> > >> > > > > > -- > ************************************************************** > Amir Sabbagh > Il mio sito / My site: http://almucantarat.altervista.org > ************************************************************** > > |