version 1.11, 2014/06/27 07:58:29 |
version 1.12, 2017/08/31 04:21:48 |
|
|
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* |
* |
* $OpenXM: OpenXM_contrib2/asir2000/plot/calc.c,v 1.10 2014/05/12 16:54:40 saito Exp $ |
* $OpenXM: OpenXM_contrib2/asir2000/plot/calc.c,v 1.11 2014/06/27 07:58:29 saito Exp $ |
*/ |
*/ |
#include "ca.h" |
#include "ca.h" |
#include "parse.h" |
#include "parse.h" |
Line 68 void calc(double **tab,struct canvas *can,int nox){ |
|
Line 68 void calc(double **tab,struct canvas *can,int nox){ |
|
Obj fr,g,t,s; |
Obj fr,g,t,s; |
|
|
if(!nox)initmarker(can,"Evaluating..."); |
if(!nox)initmarker(can,"Evaluating..."); |
MKReal(1.0,r); mulr(CO,(Obj)can->formula,(Obj)r,&fr); |
todouble((Obj)can->formula,&fr); |
xstep=(can->xmax-can->xmin)/can->width; |
xstep=(can->xmax-can->xmin)/can->width; |
ystep=(can->ymax-can->ymin)/can->height; |
ystep=(can->ymax-can->ymin)/can->height; |
MKReal(1.0,rx); MKReal(1.0,ry); // dummy real |
MKReal(1.0,rx); MKReal(1.0,ry); // dummy real |
Line 101 void calcq(double **tab,struct canvas *can,int nox){ |
|
Line 101 void calcq(double **tab,struct canvas *can,int nox){ |
|
Obj fr,gm,t,s; |
Obj fr,gm,t,s; |
Real r,rx,ry; |
Real r,rx,ry; |
|
|
MKReal(1.0,r); mulr(CO,(Obj)can->formula,(Obj)r,&fr); |
todouble((Obj)can->formula,&fr); |
MKReal(1.0,rx); MKReal(1.0,ry); // dummy real |
MKReal(1.0,rx); MKReal(1.0,ry); // dummy real |
BDY(rx)=can->xmin; |
BDY(rx)=can->xmin; |
substr(CO,0,fr,can->vx,can->xmin?(Obj)rx:0,&t); devalr(CO,t,&gm); |
substr(CO,0,fr,can->vx,can->xmin?(Obj)rx:0,&t); devalr(CO,t,&gm); |
Line 139 void calcb(double **tab,struct canvas *can,int nox){ |
|
Line 139 void calcb(double **tab,struct canvas *can,int nox){ |
|
Obj fr,gm,tm,sm; |
Obj fr,gm,tm,sm; |
Real r,rx,ry; |
Real r,rx,ry; |
|
|
MKReal(1.0,r); mulr(CO,(Obj)can->formula,(Obj)r,&fr); |
todouble((Obj)can->formula,&fr); |
MKReal(1.0,rx); MKReal(1.0,ry); // dummy real |
MKReal(1.0,rx); MKReal(1.0,ry); // dummy real |
BDY(rx)=can->xmin; |
BDY(rx)=can->xmin; |
substr(CO,0,fr,can->vx,can->xmin?(Obj)rx:0,&tm); devalr(CO,tm,&gm); |
substr(CO,0,fr,can->vx,can->xmin?(Obj)rx:0,&tm); devalr(CO,tm,&gm); |
Line 381 void plotcalc(struct canvas *can){ |
|
Line 381 void plotcalc(struct canvas *can){ |
|
Obj fr,t,s; |
Obj fr,t,s; |
POINT *pa; |
POINT *pa; |
|
|
MKReal(1.0,r); mulr(CO,(Obj)can->formula,(Obj)r,&fr); |
todouble((Obj)can->formula,&fr); |
w=can->width;h=can->height; |
w=can->width;h=can->height; |
xmin=can->xmin;xstep=(can->xmax-can->xmin)/w; |
xmin=can->xmin;xstep=(can->xmax-can->xmin)/w; |
tab=(double *)ALLOCA(w*sizeof(double)); |
tab=(double *)ALLOCA(w*sizeof(double)); |
Line 426 void polarcalc(struct canvas *can){ |
|
Line 426 void polarcalc(struct canvas *can){ |
|
Real r; |
Real r; |
Obj fr,t,s; |
Obj fr,t,s; |
|
|
MKReal(1.0,r); mulr(CO,(Obj)can->formula,(Obj)r,&fr); |
todouble((Obj)can->formula,&fr); |
w=can->width; h=can->height; nstep=can->nzstep; |
w=can->width; h=can->height; nstep=can->nzstep; |
pmin=can->zmin; pstep=(can->zmax-can->zmin)/nstep; |
pmin=can->zmin; pstep=(can->zmax-can->zmin)/nstep; |
tabx=(double *)ALLOCA(nstep*sizeof(double)); |
tabx=(double *)ALLOCA(nstep*sizeof(double)); |
Line 474 void polarcalcNG(struct canvas *can){ |
|
Line 474 void polarcalcNG(struct canvas *can){ |
|
Real r; |
Real r; |
Obj fr,t,s; |
Obj fr,t,s; |
|
|
MKReal(1.0,r); mulr(CO,(Obj)can->formula,(Obj)r,&fr); |
todouble((Obj)can->formula,&fr); |
w=can->width; h=can->height; nstep=can->nzstep; |
w=can->width; h=can->height; nstep=can->nzstep; |
pmin=can->zmin; pstep=(can->zmax-can->zmin)/nstep; |
pmin=can->zmin; pstep=(can->zmax-can->zmin)/nstep; |
tabx=(double *)ALLOCA(nstep*sizeof(double)); |
tabx=(double *)ALLOCA(nstep*sizeof(double)); |
Line 523 void ineqncalc(double **tab,struct canvas *can,int nox |
|
Line 523 void ineqncalc(double **tab,struct canvas *can,int nox |
|
V vx,vy; |
V vx,vy; |
|
|
if(!nox) initmarker(can,"Evaluating..."); |
if(!nox) initmarker(can,"Evaluating..."); |
MKReal(1.0,r); mulr(CO,(Obj)can->formula,(Obj)r,&fr); |
todouble((Obj)can->formula,&fr); |
vx=can->vx;vy=can->vy; |
vx=can->vx;vy=can->vy; |
w=can->width;h=can->height; |
w=can->width;h=can->height; |
xmin=can->xmin;xstep=(can->xmax-can->xmin)/w; |
xmin=can->xmin;xstep=(can->xmax-can->xmin)/w; |
Line 555 void itvcalc(double **mask, struct canvas *can, int no |
|
Line 555 void itvcalc(double **mask, struct canvas *can, int no |
|
Obj fr,g,t,s; |
Obj fr,g,t,s; |
|
|
idv=can->division; |
idv=can->division; |
MKReal(1.0,r); mulr(CO,(Obj)can->formula,(Obj)r,&fr); |
todouble((Obj)can->formula,&fr); |
vx=can->vx; vy=can->vy; |
vx=can->vx; vy=can->vy; |
xstep=(can->xmax-can->xmin)/can->width; |
xstep=(can->xmax-can->xmin)/can->width; |
ystep=(can->ymax-can->ymin)/can->height; |
ystep=(can->ymax-can->ymin)/can->height; |