diff options
author | Norbert Preining <norbert@preining.info> | 2017-10-14 11:43:11 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2017-10-14 11:43:11 +0900 |
commit | dc71274f16f7ff65145e034900f582b62453a033 (patch) | |
tree | a71452364cbe1a03feb6a84cdfd09eedae861590 /texmf-dist/scripts/ketcindy/ketlib/ketpicscifiles6/Rotatedata.sci | |
parent | aecda53b09be64698e9e5dcbf40f0fe289b37e2e (diff) |
rename and update ketpic -> ketcindy
Diffstat (limited to 'texmf-dist/scripts/ketcindy/ketlib/ketpicscifiles6/Rotatedata.sci')
-rw-r--r-- | texmf-dist/scripts/ketcindy/ketlib/ketpicscifiles6/Rotatedata.sci | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/texmf-dist/scripts/ketcindy/ketlib/ketpicscifiles6/Rotatedata.sci b/texmf-dist/scripts/ketcindy/ketlib/ketpicscifiles6/Rotatedata.sci new file mode 100644 index 00000000..845cac17 --- /dev/null +++ b/texmf-dist/scripts/ketcindy/ketlib/ketpicscifiles6/Rotatedata.sci @@ -0,0 +1,39 @@ +// 08.05.23 Koshikawa +// 08.09.20 +// 15.04.12 + +function OutL=Rotatedata(varargin) + Nargs=length(varargin); + ML=varargin(1); + ML=Flattenlist(ML); + Theta=varargin(2); + if Nargs==2, + Pt=[0,0] + else + Pt=varargin(3); + end + Cx=Pt(1);Cy=Pt(2); + 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=Cx+(X1-Cx)*cos(Theta)-(Y1-Cy)*sin(Theta); + Y2=Cy+(X1-Cx)*sin(Theta)+(Y1-Cy)*cos(Theta); + end; + Out=[Out;X2,Y2]; + end; + OutL=Mixadd(OutL,Out); + end; + if length(OutL)==1 + OutL=Op(1,OutL); + end; +endfunction + |