Read-only forum archive

How to plot surfaces etc in Singular?

How to plot surfaces etc in Singular?

rambiz · Fri Aug 26, 2016 1:21 pm

Hi all,
assume you want to draw a multivariate polynomial like say
x2+y2-1=0 .
How do you do that?
I came across the functions plotrot(.) and plotrotated(.) from the library surfex.lib but the help to those functions says that singular needs to open the external programme surfex for plotting. Now when I searched and found surfex software here:
http://surfex.algebraicsurface.net/view ... nuitem=160

But it seems that this software is tricky to install and maybe difficult to use.
So anyways, how do you do your plots, please?

Re: How to plot surfaces etc in Singular?

hannes · Sat Sep 03, 2016 7:07 pm

The main plotting routines are plot (for curves and surfaces)
and surfer (for surfaces) from surf.lib
(http://www.singular.uni-kl.de/Manual/4-03/sing_1740.htm)
Both use the program surf for generting the image.

Re: How to plot surfaces etc in Singular?

rambiz · Sat Sep 03, 2016 11:24 pm

Thank you Hannes.

Your link http://surfex.algebraicsurface.net/view ... nuitem=160 doen't work for me, and I get a 404 error.

I searched for surf.exe in the Singular folders of my existing installation and indeed found it in
the cygwin-->bin folder. The surf.exe which I have has a size of 457KB and I am using Singular version 4.0.2 released in February 2015.

When I try to run the plot example, that is given in the online manual here
https://www.singular.uni-kl.de/Manual/l ... tm#SEC1816 ,
I get the following error:
Code:
> LIB "surf.lib";
ring rr0 = 0,(x1,x2),dp;
ideal I = x1^3 - x2^2;
plot(I);// ** loaded /usr/bin/../share/singular/LIB/surf.lib (4.0.0.0,Jun_2013)
> // ---------  plane curves ------------
. ring rr0 = 0,(x1,x2),dp;
> ideal I = x1^3 - x2^2;
> plot(I);
Close window to exit from `singularsurf`.
   ? calling `surf` failed
(The shell returned the error code 256.
   ? leaving surf.lib::plot


Any idea what went wrong, please?

Re: How to plot surfaces etc in Singular?

hannes · Thu Sep 08, 2016 11:07 am

Locate surf.lib on your computer, exchange it by the newest version:
https://raw.githubusercontent.com/Singu ... B/surf.lib
and try again.

Re: How to plot surfaces etc in Singular?

rambiz · Thu Sep 08, 2016 1:41 pm

Thank You very much! It is working now!

I replaced surf.lib with the library downloaded from your link and then I also replaced my existing surf.exe with a new one from this link:
ftp://www.mathematik.uni-kl.de/pub/Math/Singular/utils/

Thanks a lot.