summaryrefslogtreecommitdiff
path: root/texmf-dist/scripts/ketpic/ketlib/ketpic2escifiles6/Scaledata.sci
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2017-09-04 09:45:51 +0900
committerNorbert Preining <norbert@preining.info>2017-09-04 09:45:51 +0900
commit138f77fe71e43adc24ecb030d73df81cc5c4eb7e (patch)
treecd2d906c634149bbecd2f4bad3d540c16b23befa /texmf-dist/scripts/ketpic/ketlib/ketpic2escifiles6/Scaledata.sci
parent37bfdbee2c91bab6f0abd54503a0b9c669c9109e (diff)
add ketpic
Diffstat (limited to 'texmf-dist/scripts/ketpic/ketlib/ketpic2escifiles6/Scaledata.sci')
-rwxr-xr-xtexmf-dist/scripts/ketpic/ketlib/ketpic2escifiles6/Scaledata.sci39
1 files changed, 39 insertions, 0 deletions
diff --git a/texmf-dist/scripts/ketpic/ketlib/ketpic2escifiles6/Scaledata.sci b/texmf-dist/scripts/ketpic/ketlib/ketpic2escifiles6/Scaledata.sci
new file mode 100755
index 00000000..7e563f4b
--- /dev/null
+++ b/texmf-dist/scripts/ketpic/ketlib/ketpic2escifiles6/Scaledata.sci
@@ -0,0 +1,39 @@
+// 08.05.25 Koshikawa
+// 08.09.20
+// 15.04.12
+
+function OutL=Scaledata(varargin)
+ Nargs=length(varargin);
+ ML=varargin(1);
+ ML=Flattenlist(ML);
+ A=varargin(2);
+ B=varargin(3);
+ if Nargs==3
+ Pt=[0,0];
+ else
+ Pt=varargin(4);
+ end
+ OutL=[];
+ for N=1:length(ML)
+ GL=Op(N,ML);
+ Out=[];
+ for I=1:size(GL,1)
+ Tmp=GL(I,:);
+ X1=Tmp(1);
+ Y1=Tmp(2);
+ if Tmp==[%inf,%inf]
+ X2=X1;
+ Y2=Y1;
+ else
+ X2=Pt(1)+A*(X1-Pt(1));
+ Y2=Pt(2)+B*(Y1-Pt(2));
+ end
+ Out=[Out;X2,Y2];
+ end;
+ OutL=Mixadd(OutL,Out);
+ end;
+ if length(OutL)==1
+ OutL=Op(1,OutL);
+ end;
+endfunction
+