Question about edges


Re: Question about edges
#21
Hi Roland,

You'll still (admittedly extremely rarely if you set appDef_decCntMul small enough) end up with false negatives from that (see below). Which may not be a problem. Although I suppose that by vounting through twice you could offset by half appDef_decCntMul in the second loop and look and add anything that matches there to your list of matches.

Code:
appDef_decCntMul=10000 #1e-4 precision
# Before flooring
Point1=(0.44499...,0.99434...)
Point2=(0.44500...,0.99434...)
# floor
Point1F=(0.4449,0.9943)
Point2F=(0.4450,0.9943)
# compare
bitwise=(Point1F==Point2F) # is false
distance=norm(Point1-Point2) # 1e-5 < Precision
below will avoid false negatives, but give (arguable) false positives...
Code:
appDef_decCntMul=10000 #1e-4 precision
# Before flooring
Point1=(0.44499...,0.99434...)
Point2=(0.44500...,0.99434...)
# floor
Point1F=(0.4449,0.9943)
Point2F=(0.4450,0.9943)
# round(x) = floor(x+0.5)
Point1R=(0.4450,0.9943)
Point2R=(0.4450,0.9943)
# compare
bitwise=(Point1F==Point2F) || (Point1R==Point2R) # is true
distance=norm(Point1-Point2) # 1e-5 < Precision

Tim
Reply
« Next Oldest | Next Newest »



Messages In This Thread
Question about edges - by Roland Melkert - 2013-03-08, 20:41
Re: Question about edges - by Roland Melkert - 2013-03-09, 19:11
Re: Question about edges - by Roland Melkert - 2013-03-09, 20:23
Re: Question about edges - by Ben Supnik - 2013-03-10, 4:18
Re: Question about edges - by Roland Melkert - 2013-03-10, 18:35
Re: Question about edges - by Ben Supnik - 2013-03-10, 23:11
Re: Question about edges - by Roland Melkert - 2013-03-10, 23:32
Re: Question about edges - by Ben Supnik - 2013-03-11, 2:31
Re: Question about edges - by Travis Cobbs - 2013-03-11, 5:19
Re: Question about edges - by Ben Supnik - 2013-03-11, 6:20
Re: Question about edges - by Tim Gould - 2013-03-11, 6:40
Re: Question about edges - by Ben Supnik - 2013-03-11, 18:52
Re: Question about edges - by Roland Melkert - 2013-03-11, 20:31
Re: Question about edges - by Tim Gould - 2013-03-11, 20:58
Re: Question about edges - by Roland Melkert - 2013-03-11, 23:48
Re: Question about edges - by Tim Gould - 2013-03-11, 23:57
Re: Question about edges - by Tim Gould - 2013-03-12, 1:24
Re: Question about edges - by Travis Cobbs - 2013-03-12, 5:12
Re: Question about edges - by Tim Gould - 2013-03-11, 21:07
Re: Question about edges - by Ben Supnik - 2013-03-22, 22:33
Re: Question about edges - by Tim Gould - 2013-03-22, 22:44
Re: Question about edges - by Ben Supnik - 2013-03-22, 23:48
Re: Question about edges - by Travis Cobbs - 2013-03-11, 18:20
Re: Question about edges - by Roland Melkert - 2013-03-11, 20:50
Re: Question about edges - by Roland Melkert - 2013-03-12, 18:15
Re: Question about edges - by Ben Supnik - 2013-03-12, 18:24
Re: Question about edges - by Roland Melkert - 2013-03-12, 18:37
Re: Question about edges - by Travis Cobbs - 2013-03-10, 6:57

Forum Jump:


Users browsing this thread: 1 Guest(s)