C/util.cpp を使う
gcc -c -o util.o C/util.cpp
gcc -o aTh1 aTh1.cpp util.o

LINE operator |(POINT p, POINT q) : p と q を結ぶ線分の垂直二等分線

LINE operator |(POINT p, LINE l) : p から l への垂線

LINE operator *(POINT p, POINT q) : p と q を通る直線

POINT operator *(LINE l1, LINE l2) : l1 と l2 の交点

POINT operator %(POINT p, POINT q) : p と q を結ぶ線分の中点

POINT operator %(POINT p, LINE l) : l に関する p の鏡映

double operator +(POINT p, POINT q) : p と q の距離

double operator +(POINT p, LINE l) : p と l の距離


uq.h について

int fdallsol(int d, double c[], double z[])
c[0]x^d + ... + c[d] = 0 の解を z[] に格納し, 解の個数を返す。

void drawq(double e[])
e[0]x^2+e[1]xy+e[2]y^2+e[3]x+e[4]y+e[5] = 0 で表される二次曲線を描く。

void dcq(double e[], double d[])
e[0]x^2+e[1]xy+e[2]y^2+e[3]x+e[4]y+e[5] = 0 で表される二次曲線の双対曲線の係数を d[]に格納する。

int is2q(double p1[], double p2[], POINT pt[])
p1[0]x^2 + p1[1]xy + p1[2]y^2 + p1[3]x + p1[4]y + p1[5] = 0
と
p2[0]x^2 + p2[1]xy + p2[2]y^2 + p2[3]x + p2[4]y + p2[5] = 0
の交点を求める。

LINE tgl(double a[], POINT p)
e[0]x^2+e[1]xy+e[2]y^2+e[3]x+e[4]y+e[5] = 0 で表される二次曲線の p での接戦を求める。

Kiyomiya1.cpp の中の
int divide(POINT A, POINT B, POINT C)
は A, B, C が一直線上にあるとして
C が AB の内分点ならば 1 を返し、
A に近い外分点ならば -1 を返し、
B に近い外分点ならば 1 を返す。


./tfd0 40 0 1 9 10 19 20 3.1 0. <des40.dat |
./tfd0 40 4 5 6 14 15 25 -3.1 0. |
./tfd0 40 2 3 12 0. 2.63 |
./tfd0 40 7 8 17 0. -2.63 | ./drdes 40 | drawg -s70 &

./tfd0 60 0 1 2 10 11 12 13 22 23 24 25 35 36 47 48 3.85 0. < des60.dat |
./tfd0 60 4 5 6 7 8 16 17 18 19 29 30 31 41 42 54 | ./drdes 60 | drawg -s60 &

./tfd0 60 7 8 9 10 11 19 20 21 22 32 33 34 44 45 57 0. -3.85 <des60.dat |
./rm0 60 1 2 3 4 5 13 14 15 16 26 27 28 38 39 51 | ./drdes 45 | drawg -s60 &

./rm0 60 0 12 25 37 50 4 16 29 41 54 8 20 33 45 58 <des60.dat |
./drdes 45 | drawg -s60 &

./aTh2-01 <3pts1l0.dat | drawg -s100 -w800 -h800 &
