File tree Expand file tree Collapse file tree 2 files changed +34
-12
lines changed Expand file tree Collapse file tree 2 files changed +34
-12
lines changed Original file line number Diff line number Diff line change 951
951
(return-from %intersect/tan nil )))
952
952
; ; scale so one curve is 0,0 1,0 1,1
953
953
(m3 (scale (/ (vx a5)) (/ (vy a5))))
954
- (a6 (mv* m3 a5))
955
- (b6 (mv* m3 b5)))
954
+ #+ +(a6 (mv* m3 a5))
955
+ (b6 (mv* m3 b5))
956
+ (eps (* 16 (* double-float-epsilon
957
+ (max (abs (vx p1)) (abs (vy p1))
958
+ (abs (vx pc)) (abs (vy pc))
959
+ (abs (vx a2)) (abs (vy a2))
960
+ (abs (vx b2)) (abs (vy b2)))))))
956
961
(declare (ignore r1 r2))
957
962
; ; x₁ = 2t₁-t₁²
958
963
; ; y₁ = t₁²
1029
1034
(b (vy b6))
1030
1035
(t2 (/ (* 2 (- (sqrt b) 1 ))
1031
1036
(+ a b -2 )))
1032
- (t1 (* t2 (sqrt b))))
1033
- (flet ((e (p2 at)
1034
- (let ((d1 (v2- pc p1))
1035
- (d2 (v2+ p1 (v2+ (v2scale pc -2 ) p2))))
1036
- (v2+ (v2+ (v2scale d2 (* at at))
1037
- (v2scale d1 (* 2 at)))
1038
- p1))))
1039
- (if (eql ref :a )
1040
- (v2->4 (e b2 t2) t1 t2)
1041
- (v2->4 (e a2 t2) t2 t1)))))))
1037
+ (t1 (* t2 (sqrt b)))
1038
+ (1-eps (- 1 eps)))
1039
+ (when (and (< eps t1 1-eps)
1040
+ (< eps t2 1-eps))
1041
+ (flet ((e (p2 at)
1042
+ (let ((d1 (v2- pc p1))
1043
+ (d2 (v2+ p1 (v2+ (v2scale pc -2 ) p2))))
1044
+ (v2+ (v2+ (v2scale d2 (* at at))
1045
+ (v2scale d1 (* 2 at)))
1046
+ p1))))
1047
+ (if (eql ref :a )
1048
+ (v2->4 (e b2 t2) t1 t2)
1049
+ (v2->4 (e a2 t2) t2 t1))))))))
1042
1050
1043
1051
1044
1052
Original file line number Diff line number Diff line change 691
691
(ix2r (1578 1403 1664 1415 1689 1409 ) 1 0.6666666666666666d0
692
692
(1689 1409 1663 1415 1578 1403 ) 1 0.3333333333333333d0
693
693
NIL )
694
+ (ix2 (366 210 367 212 368 213 )
695
+ (366.5d0 210.5d0 367 212 368 213 )
696
+ # (368.0d0 213.0d0 1.0d0 1.0d0 ))
697
+ (ix2r (940 -21 940 -19 901 -32 ) 0 0.13333333333333333d0
698
+ (866 20 940 -19 940 -21 ) 1 0
699
+ # (940.0d0 -21.0d0 0.0d0 1.0d0 )
700
+ # (939.9606309949041d0 -20.888053818960884d0
701
+ 0.031772026518992295d0 0.9769345803771983d0 ))
702
+
703
+ (ix2 (940 -21 940 -19 901 -32 )
704
+ (866 20 940 -19 940 -21 )
705
+ # (940.0d0 -21.0d0 0.0d0 1.0d0 )
706
+ # (939.9606309949041d0 -20.888053818960884d0
707
+ 0.031772026518992295d0 0.9769345803771983d0 ))
694
708
695
709
)
696
710
#+ +
You can’t perform that action at this time.
0 commit comments