|
From: Sekiryou <sek...@gm...> - 2007-04-29 16:26:44
|
Hi, i need to plot a function and make it rotate around an axis in a 3D. Example: I have the function f(x)=x^2 and i need to rotate it around the y axis. Is there a way to do that with Gnuplot? Thanks. -- View this message in context: http://www.nabble.com/make-a-function-rotate-around-an-axis-tf3665995.html#a10243195 Sent from the Gnuplot - User mailing list archive at Nabble.com. |
|
From: <HBB...@t-...> - 2007-04-30 21:30:34
|
Sekiryou wrote: > Hi, i need to plot a function and make it rotate around an axis in a 3D. > Example: > I have the function f(x)=x^2 and i need to rotate it around the y axis. splot (x**2+y**2) |
|
From: Sekiryou <sek...@gm...> - 2007-04-30 22:10:12
|
Hans-Bernhard Br=C3=B6ker-2 wrote: > splot (x**2+y**2) It's not really what i'm expecting... in fact the command you gave me, doesn't rotate around the y axis...=20 What i want is more like the image i attach here. http://www.nabble.com/file/8163/rotation.gif=20 --=20 View this message in context: http://www.nabble.com/make-a-function-rotate-= around-an-axis-tf3665995.html#a10261469 Sent from the Gnuplot - User mailing list archive at Nabble.com. |
|
From: <HBB...@t-...> - 2007-04-30 22:34:09
|
Sekiryou wrote: > > > Hans-Bernhard Bröker-2 wrote: >> splot (x**2+y**2) > > It's not really what i'm expecting... in fact the command you gave me, > doesn't rotate around the y axis... It does --- it's just a bit harder to see. But if you insist on a round outline: set parametric set urange [0:5] set vrange [0:2*pi] splot u*cos(v), u*sin(v), u**2 |
|
From: Sekiryou <sek...@gm...> - 2007-04-30 22:42:56
|
Seems a bit complicated...=20 The purpose of doing that is that i need a picture to show the surface it makes. After that we will add another function and try to calculate the volume that intersect the 2 functions. I think it will be hard to do like you show me. Hans-Bernhard Br=C3=B6ker-2 wrote: >=20 > Sekiryou wrote: >>=20 >>=20 >> Hans-Bernhard Br=C3=B6ker-2 wrote: >>> splot (x**2+y**2) >>=20 >> It's not really what i'm expecting... in fact the command you gave me, >> doesn't rotate around the y axis...=20 >=20 > It does --- it's just a bit harder to see. >=20 > But if you insist on a round outline: >=20 > =09set parametric > =09set urange [0:5] > =09set vrange [0:2*pi] > =09splot u*cos(v), u*sin(v), u**2 --=20 View this message in context: http://www.nabble.com/make-a-function-rotate-= around-an-axis-tf3665995.html#a10261886 Sent from the Gnuplot - User mailing list archive at Nabble.com. |
|
From: Lars H. <la...@ho...> - 2007-05-01 08:38:42
|
> Seems a bit complicated... > > The purpose of doing that is that i need a picture to > show the surface it makes. After that we will add another > function and try to calculate the volume that intersect > the 2 functions. > > I think it will be hard to do like you show me. If I get you right, you desire a rotational solid and you want it to be drawn automatically, if you provide only the mathematical function for the borderline. gnuplot is only a plotting programme, not able to to the calculations needed for a rather complex gemometrical thing like a rotational solid. You might "cut" the solid into slices, so that you get a bunch of circles, but that won't result in a surface. If you insist in using gnuplot for your task, I would suggest, that you use an external programme, which somehow calculates the borderline points of the rotational solid in 3D coordinates and writes it to a tabular in a file. Then you could use gnuplot for plotting something similar to this: http://gnuplot.sourceforge.net/demo_4.2/surface1.19.png (see the demos for more details) Since we're touching the borders of gnuplots facilities with this, it may be better to use another (commercial) programme, e.g. maple or matlab. HTH Lars |
|
From: <HBB...@t-...> - 2007-05-03 19:47:46
|
Sekiryou wrote: > Seems a bit complicated... Appearances can be deceptive. > The purpose of doing that is that i need a picture to show the surface it > makes. After that we will add another function and try to calculate the > volume that intersect the 2 functions. And what do you expect to get in the way of doing that? > I think it will be hard to do like you show me. Any attempt to display a solid volume on a 2D screen is hard. That's the |