From 138f77fe71e43adc24ecb030d73df81cc5c4eb7e Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 4 Sep 2017 09:45:51 +0900 Subject: add ketpic --- .../ketlib/ketpic2escifiles6/Clipindomain.sci | 58 ++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100755 texmf-dist/scripts/ketpic/ketlib/ketpic2escifiles6/Clipindomain.sci (limited to 'texmf-dist/scripts/ketpic/ketlib/ketpic2escifiles6/Clipindomain.sci') diff --git a/texmf-dist/scripts/ketpic/ketlib/ketpic2escifiles6/Clipindomain.sci b/texmf-dist/scripts/ketpic/ketlib/ketpic2escifiles6/Clipindomain.sci new file mode 100755 index 00000000..bf9572c5 --- /dev/null +++ b/texmf-dist/scripts/ketpic/ketlib/ketpic2escifiles6/Clipindomain.sci @@ -0,0 +1,58 @@ +// 08.09.10 +// 08.09.16 +// 09.12.31 (gsort) + +function OutL=Clipindomain(ObjL,FigL) + EEps=10^(-4); + Eps=0.01; + Eps2=0.2; + Bdy=Kyoukai(FigL); + if Mixlength(Bdy)>=2 + Fbdy=Joincrvs(FigL) + else + Fbdy=Mixop(1,FigL); + end; + if Mixtype(ObjL)==1 + ObjL=Mix(ObjL) + end; + if Mixtype(FigL)==1 + FigL=Mix(FigL) + end; + OutL=[]; + for Nobj=1:Mixlength(ObjL); + Obj=Mixop(Nobj,ObjL); + ParL=[1,Numptcrv(Obj)]; + Tmp=IntersectcrvsPp(Obj,Fbdy,Eps,Eps2); + for J=1:Mixlength(Tmp) + Tmp1=Mixop(J,Tmp); + ParL=[ParL,Mixop(2,Tmp1)]; + end; + ParL=gsort(ParL); + ParL=ParL(length(ParL):-1:1); + Tmp=[1]; + for I=1:length(ParL) + Tmp1=Tmp(length(Tmp)); + Tmp2=ParL(I); + if Tmp2-Tmp1>EEps + Tmp=[Tmp,Tmp2]; + end; + end; + ParL=Tmp; + Tmp1=ParL(length(ParL)); + Tmp2=Numptcrv(Obj); + if abs(Tmp1-Tmp2)