summaryrefslogtreecommitdiff
path: root/texmf-dist/scripts/ketcindy/ketlib/ketpic2escifiles6/Partframe.sci
blob: a8581b1bc5cd91df70013d8cb3e4b61cf841b713 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// 13.05.03

function Out=Partframe(Tb,St,Ed)
  G=Dividetable(Tb);
  Gw=G(1);
  Gt=G(2);
  Gy=G(3);
  Gwt=Tb(4);
  Gwy=Tb(5);
  Gat=lstcat(list(Gwt(1)),Gt,list(Gwt(2)));
  Gay=lstcat(list(Gwy(1)),Gy,list(Gwy(2)));
  Tmp1=Ptstart(Gat(St(1)));
  Tmp2=Ptstart(Gay(St(2)));
  Ps=[Tmp1(1),Tmp2(2)];
  Tmp1=Ptstart(Gat(Ed(1)));
  Tmp2=Ptstart(Gay(Ed(2)));
  Pe=[Tmp1(1),Tmp2(2)];
  Pars=Paramoncrv(Ps,Gw);
  Pare=Paramoncrv(Pe,Gw);
  if Pars<Pare then
    Out=Partcrv(Pars,Pare,Gw);
  else
    Tmp1=Partcrv(Pars,Numptcrv(Gw),Gw);
    Tmp2=Partcrv(1,Pare,Gw);
    Out=Joincrvs(Tmp1,Tmp2);
  end
endfunction;