Total circles area: Difference between revisions
Content added Content deleted
(→Python: 2D Van der Corput sequence: Add image and remove second print of bbox.) |
|||
Line 817: | Line 817: | ||
===Python: 2D [[Van der Corput sequence]]=== |
===Python: 2D [[Van der Corput sequence]]=== |
||
[[File:Van_der_Corput_2D.png|200px|thumb|right]] |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
* Circles are uniquified, |
* Circles are uniquified, |
||
* Sorted in descending order of size, |
* Sorted in descending order of size, |
||
Line 914: | Line 914: | ||
print(' down to %i due to some being wholly covered by others' % len(circles)) |
print(' down to %i due to some being wholly covered by others' % len(circles)) |
||
minx, maxx, miny, maxy = bounding_box(circles) |
minx, maxx, miny, maxy = bounding_box(circles) |
||
print(' Bounding box: %r' % (bounding_box(circles),)) |
|||
# Shift to 0,0 and compute r**2 once |
# Shift to 0,0 and compute r**2 once |
||
circles2 = [(x - minx, y - miny, r*r) for x, y, r in circles] |
circles2 = [(x - minx, y - miny, r*r) for x, y, r in circles] |
||
Line 948: | Line 947: | ||
Bounding box: (-2.598415801, 2.8356525417, -2.2017717074, 3.1743670698999997) |
Bounding box: (-2.598415801, 2.8356525417, -2.2017717074, 3.1743670698999997) |
||
down to 14 due to some being wholly covered by others |
down to 14 due to some being wholly covered by others |
||
Bounding box: (-2.598415801, 2.8356525417, -2.2017717074, 3.1743670698999997) |
|||
Points: 100000, Area estimate: 21.57125892144117 |
Points: 100000, Area estimate: 21.57125892144117 |
||
Points: 200000, Area estimate: 21.565708203389384 |
Points: 200000, Area estimate: 21.565708203389384 |