home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1999 November
/
Chip_1999-11_cd.bin
/
ctenari
/
Plavja
/
Exe
/
monge_sklop.dk
< prev
next >
Wrap
Text File
|
1999-09-02
|
1KB
|
57 lines
// knihovna: MONGE_SKLOP
// autor: Petr Plavjanφk
// obsah: sklßp∞nφ a otßΦenφ v Mongeov∞ promφtßnφ
// Program u₧ obsahuje zabudovanΘ funkce:
// otoceni, sklopeni
// sklopenφ do p∙dorysny
sklop_p (B, p) {
k = kolmice(Pi, p.1, B.1);
P = bod(k, B, B."z");
sB = bod((P:0)."x", (P:0)."y", 0);
sB = bod((P:1)."x", (P:1)."y", 0);
videt(sB, 2, 0);
vrat sB;
}
// sklopenφ do nßrysny
sklop_n (B, p) {
k = kolmice(Ny, p.2, B.2);
P = bod(k, B, B."y");
sB = bod((P:0)."x", 0, (P:0)."z");
sB = bod((P:1)."x", 0, (P:1)."z");
videt(sB, 1, 0);
vrat sB;
}
sklop_zpet_p (sB, p) {
k = kolmice(Pi, p.1, sB.1);
P = p(k, p.1);
B = bod(P."x", P."y", v(p.1, sB));
vrat B;
}
sklop_zpet_n (sB, p) {
k = kolmice(Ny, p.2, sB.2);
P = p(k, p.2);
B = bod(P."x", v(p.2, sB), P."z");
vrat B;
}
otoc_p (B, h) {
k = kolmice(Pi, h.1, B.1);
P = p(h.1, k.1);
v = odm(moc(v(P.1, B.1)) + moc(B."z" - (h."A")."z"));
sB = bod(k, P, v);
vrat sB;
}
otoc_zpet_p (sB, Ro, h) {
k = kolma(h, sB);
p = p(k, Ro);
P = p(p(k,Pi).1, h.1);
B = bod(p,P,v(sB,P));
vrat B;
}