Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

3D plot and parametric plot

291 views
Skip to first unread message

Zigomaths

unread,
Dec 10, 2003, 1:46:10 AM12/10/03
to
Hi,

Is it possible to mix a 3D plot (made with splot) and parametric plot
to draw intersection for example.

I try this but it doesn't work :

splot [-5:5] [-5:5] x**2+y**2
set parametric
set dummy 'u'
replot 5*cos(u),5*sin(u),25

I get the following age

,----
| gnuplot> replot 5*cos(u),5*sin(u),25
| parametric function not fully specified
`----

thank's

ph

Zigomaths

unread,
Dec 10, 2003, 1:47:25 AM12/10/03
to
Hi,

Is it possible to mix a 3D plot (made with splot) and parametric plot
to draw intersection for example.

I try this but it doesn't work :

splot [-5:5] [-5:5] x**2+y**2
set parametric
set dummy 'u'
replot 5*cos(u),5*sin(u),25

I get the following message

Hans-Bernhard Broeker

unread,
Dec 10, 2003, 7:20:11 AM12/10/03
to
Zigomaths <ph.monroux...@wanadoo.fr> wrote:
> Hi,

> Is it possible to mix a 3D plot (made with splot) and parametric plot
> to draw intersection for example.

Your parametric plot is 3D, too, so the question doesn't quite make
sense.

> I try this but it doesn't work :

> splot [-5:5] [-5:5] x**2+y**2
> set parametric
> set dummy 'u'
> replot 5*cos(u),5*sin(u),25

> I get the following message

> ,----
> | gnuplot> replot 5*cos(u),5*sin(u),25
> | parametric function not fully specified
> `----

That's because the *first* function you plotted has to be specified as
a parametric function, too. Try this:

set parametric
plot [-5:5][-5:5] \
u, v, u*u+v*v title 'Circular paraboloid', \
5*cos(u), 5*sin(u), 25 title 'a curve in space'

You may have to adjust the und v ranges of the two plot relative to each
other.

--
Hans-Bernhard Broeker (bro...@physik.rwth-aachen.de)
Even if all the snow were burnt, ashes would remain.

Theo Hopman

unread,
Dec 10, 2003, 9:18:04 AM12/10/03
to
Zigomaths <ph.monroux...@wanadoo.fr> wrote in message news:<slrnbtdg9g.qvg.ph...@serveur.mondomaine>...

You're getting this message because `replot` simply appends its
arguments (if any) to the previous `plot` command, then executes the
resulting string. In your case, the result is

plot x**2+y**2, 5*cos(u),5*cos(u),5

which is a mixture of non-parametric and parametric functions. You
have to re-cast your first function into a parametric function, like
so:

plot u,v,u**2+v**2, 5*cos(u),5*cos(u),5

THeo

PS: Your `set dummy` command is redundant; `set parametric`
automatically makes u and v the dummy variables for splots.

Zigomaths

unread,
Dec 11, 2003, 12:28:33 AM12/11/03
to
Le 10 Dec 2003 06:18:04 -0800,
Dans le forum comp.graphics.apps.gnuplot,
Theo Hopman a écrit :

> You're getting this message because `replot` simply appends its
> arguments (if any) to the previous `plot` command, then executes the
> resulting string. In your case, the result is
>
> plot x**2+y**2, 5*cos(u),5*cos(u),5
>
> which is a mixture of non-parametric and parametric functions. You
> have to re-cast your first function into a parametric function, like
> so:
>
> plot u,v,u**2+v**2, 5*cos(u),5*cos(u),5
>
> THeo
>
> PS: Your `set dummy` command is redundant; `set parametric`
> automatically makes u and v the dummy variables for splots.

Ok. Thank you
--
Philippe Monroux
Ile de la Reunion
E 55.3 S 21.5

Zigomaths

unread,
Dec 11, 2003, 12:29:20 AM12/11/03
to
Le 10 Dec 2003 12:20:11 GMT,
Dans le forum comp.graphics.apps.gnuplot,
Hans-Bernhard Broeker a écrit :

> Your parametric plot is 3D, too, so the question doesn't quite make
> sense.

> That's because the *first* function you plotted has to be specified as


> a parametric function, too. Try this:

> set parametric
> plot [-5:5][-5:5] \
> u, v, u*u+v*v title 'Circular paraboloid', \
> 5*cos(u), 5*sin(u), 25 title 'a curve in space'
> You may have to adjust the und v ranges of the two plot relative to each
> other.

Ok thank you

0 new messages