-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtest2.py
41 lines (28 loc) · 1.17 KB
/
test2.py
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
from piliko import *
print 'testing projective functions'
a1=projective_point(1,0)
a2=projective_point(2,3)
a3=projective_point(4,-1)
a4=projective_point(3,5)
f=projective_form(1,0,1)
q12=projective_quadrance(a1,a2,f)
q23=projective_quadrance(a2,a3,f)
q34=projective_quadrance(a3,a4,f)
q14=projective_quadrance(a1,a4,f)
print 'projective points',a1,a2,a3,a4
print 'form: ', f
print 'projective quadrances:',q12,q23,q34,q14
print 'testing projective functions'
a1=projective_point(0,1)
a2=projective_point(0,4)
a3=projective_point(0,3)
a4=projective_point(0,7)
q12=quadrance(a1,a2)
q23=quadrance(a2,a3)
q34=quadrance(a3,a4)
q14=quadrance(a1,a4)
print 'projective points',a1,a2,a3,a4
print 'form: ', f
print 'projective quadrances:',q12,q23,q34,q14
print is_harmonic_range(a1,a2,a3,a4)
print is_harmonic_range(point(q23,0),point(q34,0),point(q12,0),point(q14,0))