Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  nodelist  faq  login

All your files have been destroyed (sorry). Paul.


computers / comp.graphics.apps.gnuplot / Re: User function in "using" expression

SubjectAuthor
* User function in "using" expressionlayzarc
+* Re: User function in "using" expressionKarl Ratzsch
|`- Re: User function in "using" expressionlayzarc
`- Re: User function in "using" expressionKarl Ratzsch

1
Subject: User function in "using" expression
From: layz...@aol.com
Newsgroups: comp.graphics.apps.gnuplot
Date: Wed, 28 Aug 2019 19:01 UTC
X-Received: by 2002:a37:e208:: with SMTP id g8mr5754180qki.237.1567018865338;
Wed, 28 Aug 2019 12:01:05 -0700 (PDT)
X-Received: by 2002:aca:c355:: with SMTP id t82mr3951974oif.99.1567018865121;
Wed, 28 Aug 2019 12:01:05 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!a13no3490152qtd.0!news-out.google.com!q13ni145qtn.0!nntp.google.com!a13no3490146qtd.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups: comp.graphics.apps.gnuplot
Date: Wed, 28 Aug 2019 12:01:04 -0700 (PDT)
Complaints-To: groups-abuse@google.com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2601:500:c280:30:355d:1847:c905:ecff;
posting-account=R1FlGgkAAACT4qWBRQlFZVvqWzeWlXEN
NNTP-Posting-Host: 2601:500:c280:30:355d:1847:c905:ecff
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <7e124480-f733-4e41-a0be-410b51938ddf@googlegroups.com>
Subject: User function in "using" expression
From: layz...@aol.com
Injection-Date: Wed, 28 Aug 2019 19:01:05 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 23
View all headers
I'm trying to use gnuplot to solve a specific version of the problem
 
3d plot z(x,y) with x,ys subject to the constraint f(x,y)=0
 
The following works (the files are 0 contours captured by set table)

array n[6]
file(i) = sprintf("coma%d.gpt",i)
splot for [i=1:|n|] file(i) using 1:2:(0):(0):(0):(1) with vectors

but if I also do:

phi(x,y) = (1+x)/(1+sqrt(1+(x*x-1)*y))
spher(n,x,y) = (f=phi(x,y),n2=n*n,((f-n)^2*(f-n2)*(1-y*f)-f^3)/(n2*(n-1)^3))
splot for [i=1:|n|] file(i) using 1:2:(0):(0):(0):(spher(n[i],$1,$2)) with vectors

I get the following message:

 non-integer passed to boolean operator

What am I missing? I can provide the full file if needed.

Al



Subject: Re: User function in "using" expression
From: Karl Ratzsch
Newsgroups: comp.graphics.apps.gnuplot
Organization: solani.org
Date: Wed, 28 Aug 2019 20:01 UTC
References: 1
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!feeder5.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From: mail....@gmx.net (Karl Ratzsch)
Newsgroups: comp.graphics.apps.gnuplot
Subject: Re: User function in "using" expression
Date: Wed, 28 Aug 2019 22:01:23 +0200
Organization: solani.org
Lines: 31
Message-ID: <qk6mil$f9d$1@solani.org>
References: <7e124480-f733-4e41-a0be-410b51938ddf@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
X-Trace: solani.org 1567022485 15661 127.0.0.43 (28 Aug 2019 20:01:25 GMT)
X-Complaints-To: abuse@news.solani.org
NNTP-Posting-Date: Wed, 28 Aug 2019 20:01:25 +0000 (UTC)
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101
Thunderbird/60.8.0
Content-Language: de-DE-1901
Cancel-Lock: sha1:+mwUq1Kcma4Gha6QDaeQB5tPQIY=
X-User-ID: eJwNyMkRwEAIA7CWlhibbDkMR/8lJHqKkKnCRTmXG5rHdFVdDuoAM3y323eHeROMIqHzV9I+GL0RDQ==
In-Reply-To: <7e124480-f733-4e41-a0be-410b51938ddf@googlegroups.com>
View all headers
Am 28.08.2019 um 21:01 schrieb layzarc@aol.com:
I'm trying to use gnuplot to solve a specific version of the problem
 
3d plot z(x,y) with x,ys subject to the constraint f(x,y)=0
 
The following works (the files are 0 contours captured by set table)

array n[6]
file(i) = sprintf("coma%d.gpt",i)
splot for [i=1:|n|] file(i) using 1:2:(0):(0):(0):(1) with vectors

but if I also do:

phi(x,y) = (1+x)/(1+sqrt(1+(x*x-1)*y))
spher(n,x,y) = (f=phi(x,y),n2=n*n,((f-n)^2*(f-n2)*(1-y*f)-f^3)/(n2*(n-1)^3))
splot for [i=1:|n|] file(i) using 1:2:(0):(0):(0):(spher(n[i],$1,$2)) with vectors

I get the following message:

 non-integer passed to boolean operator

the exponential operator in gnuplot is ** , not ^

I didnt know about this one

| |A| cardinality of array A

thanks. ;)

   Karl



Subject: Re: User function in "using" expression
From: layz...@aol.com
Newsgroups: comp.graphics.apps.gnuplot
Date: Wed, 28 Aug 2019 20:09 UTC
References: 1 2
X-Received: by 2002:a37:9a4a:: with SMTP id c71mr5998918qke.258.1567022998526;
Wed, 28 Aug 2019 13:09:58 -0700 (PDT)
X-Received: by 2002:a54:4788:: with SMTP id o8mr4012048oic.100.1567022998208;
Wed, 28 Aug 2019 13:09:58 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!a13no3664563qtd.0!news-out.google.com!q13ni147qtn.0!nntp.google.com!a13no3664560qtd.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups: comp.graphics.apps.gnuplot
Date: Wed, 28 Aug 2019 13:09:57 -0700 (PDT)
In-Reply-To: <qk6mil$f9d$1@solani.org>
Complaints-To: groups-abuse@google.com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2601:500:c280:30:b4ea:bb12:f4b1:4544;
posting-account=R1FlGgkAAACT4qWBRQlFZVvqWzeWlXEN
NNTP-Posting-Host: 2601:500:c280:30:b4ea:bb12:f4b1:4544
References: <7e124480-f733-4e41-a0be-410b51938ddf@googlegroups.com> <qk6mil$f9d$1@solani.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <41916fbd-eb24-4298-9629-7346b77346d9@googlegroups.com>
Subject: Re: User function in "using" expression
From: layz...@aol.com
Injection-Date: Wed, 28 Aug 2019 20:09:58 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 5
View all headers
Karl,

Duh! I knew that but copied the expression from another software and forgot to make the changes. Advantage of having a second set of eyes.

Thanks,
Al


Subject: Re: User function in "using" expression
From: Karl Ratzsch
Newsgroups: comp.graphics.apps.gnuplot
Organization: solani.org
Date: Wed, 28 Aug 2019 19:53 UTC
References: 1
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!feeder5.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From: mail....@gmx.net (Karl Ratzsch)
Newsgroups: comp.graphics.apps.gnuplot
Subject: Re: User function in "using" expression
Date: Wed, 28 Aug 2019 21:53:06 +0200
Organization: solani.org
Lines: 27
Message-ID: <qk7t27$75l$1@solani.org>
References: <7e124480-f733-4e41-a0be-410b51938ddf@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
X-Trace: solani.org 1567061895 7349 127.0.0.43 (29 Aug 2019 06:58:15 GMT)
X-Complaints-To: abuse@news.solani.org
NNTP-Posting-Date: Thu, 29 Aug 2019 06:58:15 +0000 (UTC)
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101
Thunderbird/60.8.0
In-Reply-To: <7e124480-f733-4e41-a0be-410b51938ddf@googlegroups.com>
Content-Language: de-DE-1901
X-User-ID: eJwNysEBwCAIA8CVkBCEcUBl/xHaex/hy882pxuH4280Op6ScYWy4YgUTTYLqD+dbEUsFOzdDwVbEEg=
Cancel-Lock: sha1:JgciuF4M6kEV2mZdZVwouK60+eY=
View all headers
Am 28.08.2019 um 21:01 schrieb layzarc@aol.com:
I'm trying to use gnuplot to solve a specific version of the problem
 
3d plot z(x,y) with x,ys subject to the constraint f(x,y)=0
 
The following works (the files are 0 contours captured by set table)

array n[6]
file(i) = sprintf("coma%d.gpt",i)
splot for [i=1:|n|] file(i) using 1:2:(0):(0):(0):(1) with vectors

but if I also do:

phi(x,y) = (1+x)/(1+sqrt(1+(x*x-1)*y))
spher(n,x,y) = (f=phi(x,y),n2=n*n,((f-n)^2*(f-n2)*(1-y*f)-f^3)/(n2*(n-1)^3))
splot for [i=1:|n|] file(i) using 1:2:(0):(0):(0):(spher(n[i],$1,$2)) with vectors

I get the following message:

 non-integer passed to boolean operator

What am I missing? I can provide the full file if needed.

Al


gnuplot uses


1
rocksolid light 0.7.2
clearneti2ptor