CPLOT(A)
[Curve plot. A is a bivariate integral polynomial.]
(1) u#=OUNIT; OUNIT=6;
print "enter number of columns";
n=aread(); awrite(n); clout(" columns");
emptob; print "enter number of rows";
m=aread(); awrite(m); clout(" rows"); emptob;
print "enter x0 and y0 for upper left hand corner";
x0=rnread(); y0=rnread();
clout("upper left hand corner is "); cwrite('(');
rnwrit(x0); cwrite(','); rnwrit(y0); cwrite(')');
emptob;
print "enter horizontal step size"; d1=rnread();
clout("horizontal step size is "); rnwrit(d1); emptob;
print "enter vertical step size"; d2=rnread();
clout("vertical step size is "); rnwrit(d2); emptob;
OUNIT=u#;
ibpsg(A,n,m,x0,y0,d1,d2); blines(1); return..
IBPSG(A,n,m,x0,y0,d1,d2)
[Integral bivariate polynomial sign grid. A is an integral
bivariate polynomial. n and m are positive integers. x0, y0,
d1, and d2 are binary rational numbers. Let s(i,j) ==
sign(A(x0 + i * d1, y1 - j * d2)). Let c(i,j) == + if s(i,j)==1,
c(i,j)== 0 if s(i,j) == 0, and c(i,j) == - if s(i,j) == -1.
ibpsg outputs the c(i,j), 0<=i<=n and 0<=j<=m, in the form of a
grid. For each j, j==0,1,2,...,m, the record c(0,j), c(1,j),...,
c(n,j) is output. Note that one must have n+1<=RMARG-LMARG.]
(1) emptob; y'0=y0; for j=0,1,...,m do { A#=RPFIP(2,A);
A#1=RPEMV(2,A#,y'0); IPSRP(1,A#1;a,A1); s=RNSIGN(a);
if s<0 then A1=IPNEG(1,A1); x'0=x0; for i=0,1,...,n do
{ s=IUPBES(A1,x'0); if s<0 then c='-' else if s==0 then
c='0' else c='+'; cwrite(c); x'0=rnsum(x'0,d1) };
emptob; y'0=rndif(y'0,d2) }; return..