Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r66208 - in sandbox/SOC/2010/sweepline: boost/sweepline/detail libs/sweepline/example libs/sweepline/example/input_data libs/sweepline/example/output_data
From: sydorchuk.andriy_at_[hidden]
Date: 2010-10-26 17:32:32


Author: asydorchuk
Date: 2010-10-26 17:32:29 EDT (Tue, 26 Oct 2010)
New Revision: 66208
URL: http://svn.boost.org/trac/boost/changeset/66208

Log:
Fixed bugs in the voronoi of segments formation.
Added more examples.
Fixed visualizer build script.
Added tool to make screenshots.
Added:
   sandbox/SOC/2010/sweepline/libs/sweepline/example/input_data/example_039.txt (contents, props changed)
   sandbox/SOC/2010/sweepline/libs/sweepline/example/input_data/example_040.txt (contents, props changed)
   sandbox/SOC/2010/sweepline/libs/sweepline/example/input_data/example_041.txt (contents, props changed)
   sandbox/SOC/2010/sweepline/libs/sweepline/example/input_data/example_042.txt (contents, props changed)
   sandbox/SOC/2010/sweepline/libs/sweepline/example/input_data/example_043.txt (contents, props changed)
   sandbox/SOC/2010/sweepline/libs/sweepline/example/output_data/example_039.png (contents, props changed)
   sandbox/SOC/2010/sweepline/libs/sweepline/example/output_data/example_040.png (contents, props changed)
   sandbox/SOC/2010/sweepline/libs/sweepline/example/output_data/example_041.png (contents, props changed)
   sandbox/SOC/2010/sweepline/libs/sweepline/example/output_data/example_042.png (contents, props changed)
   sandbox/SOC/2010/sweepline/libs/sweepline/example/output_data/example_043.png (contents, props changed)
Text files modified:
   sandbox/SOC/2010/sweepline/boost/sweepline/detail/voronoi_segment_formation.hpp | 1 +
   sandbox/SOC/2010/sweepline/libs/sweepline/example/Jamfile.v2 | 7 ++++---
   sandbox/SOC/2010/sweepline/libs/sweepline/example/voronoi_visualizer.cpp | 7 ++-----
   3 files changed, 7 insertions(+), 8 deletions(-)

Modified: sandbox/SOC/2010/sweepline/boost/sweepline/detail/voronoi_segment_formation.hpp
==============================================================================
--- sandbox/SOC/2010/sweepline/boost/sweepline/detail/voronoi_segment_formation.hpp (original)
+++ sandbox/SOC/2010/sweepline/boost/sweepline/detail/voronoi_segment_formation.hpp 2010-10-26 17:32:29 EDT (Tue, 26 Oct 2010)
@@ -1567,6 +1567,7 @@
                                    const circle_event_type &circle,
                                    edge_type *edge12,
                                    edge_type *edge23) {
+ //voronoi_rect_.update(circle.get_center());
             // Update counters.
             num_vertex_records_++;
             num_edges_++;

Modified: sandbox/SOC/2010/sweepline/libs/sweepline/example/Jamfile.v2
==============================================================================
--- sandbox/SOC/2010/sweepline/libs/sweepline/example/Jamfile.v2 (original)
+++ sandbox/SOC/2010/sweepline/libs/sweepline/example/Jamfile.v2 2010-10-26 17:32:29 EDT (Tue, 26 Oct 2010)
@@ -4,8 +4,9 @@
 # http://www.boost.org/LICENSE_1_0.txt)
 
 import cast ;
-
+lib opengl : : <name>opengl32 ;
 exe voronoi_visualizer : voronoi_visualizer.cpp
- [ cast _ moccable-cpp : voronoi_visualizer.cpp ]
+ [ cast _ moccable-cpp : voronoi_visualizer.cpp ]
                          /qt//QtOpenGL
- ;
+ : <target-os>windows:<library>opengl
+ ;
\ No newline at end of file

Added: sandbox/SOC/2010/sweepline/libs/sweepline/example/input_data/example_039.txt
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/sweepline/libs/sweepline/example/input_data/example_039.txt 2010-10-26 17:32:29 EDT (Tue, 26 Oct 2010)
@@ -0,0 +1,22 @@
+0
+20
+100 0 95 30
+95 30 80 58
+80 58 58 80
+58 80 30 95
+30 95 0 99
+0 99 -30 95
+-30 95 -58 80
+-58 80 -80 58
+-80 58 -95 30
+-95 30 -99 0
+-99 0 -95 -30
+-95 -30 -80 -58
+-80 -58 -58 -80
+-58 -80 -30 -95
+-30 -95 0 -99
+0 -99 30 -95
+30 -95 58 -80
+58 -80 80 -58
+80 -58 95 -30
+95 -30 100 0
\ No newline at end of file

Added: sandbox/SOC/2010/sweepline/libs/sweepline/example/input_data/example_040.txt
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/sweepline/libs/sweepline/example/input_data/example_040.txt 2010-10-26 17:32:29 EDT (Tue, 26 Oct 2010)
@@ -0,0 +1,102 @@
+0
+100
+100 0 99 6
+99 6 99 12
+99 12 98 18
+98 18 96 24
+96 24 95 30
+95 30 92 36
+92 36 90 42
+90 42 87 48
+87 48 84 53
+84 53 80 58
+80 58 77 63
+77 63 72 68
+72 68 68 72
+68 72 63 77
+63 77 58 80
+58 80 53 84
+53 84 48 87
+48 87 42 90
+42 90 36 92
+36 92 30 95
+30 95 24 96
+24 96 18 98
+18 98 12 99
+12 99 6 99
+6 99 0 99
+0 99 -6 99
+-6 99 -12 99
+-12 99 -18 98
+-18 98 -24 96
+-24 96 -30 95
+-30 95 -36 92
+-36 92 -42 90
+-42 90 -48 87
+-48 87 -53 84
+-53 84 -58 80
+-58 80 -63 77
+-63 77 -68 72
+-68 72 -72 68
+-72 68 -77 63
+-77 63 -80 58
+-80 58 -84 53
+-84 53 -87 48
+-87 48 -90 42
+-90 42 -92 36
+-92 36 -95 30
+-95 30 -96 24
+-96 24 -98 18
+-98 18 -99 12
+-99 12 -99 6
+-99 6 -99 0
+-99 0 -99 -6
+-99 -6 -99 -12
+-99 -12 -98 -18
+-98 -18 -96 -24
+-96 -24 -95 -30
+-95 -30 -92 -36
+-92 -36 -90 -42
+-90 -42 -87 -48
+-87 -48 -84 -53
+-84 -53 -80 -58
+-80 -58 -77 -63
+-77 -63 -72 -68
+-72 -68 -68 -72
+-68 -72 -63 -77
+-63 -77 -58 -80
+-58 -80 -53 -84
+-53 -84 -48 -87
+-48 -87 -42 -90
+-42 -90 -36 -92
+-36 -92 -30 -95
+-30 -95 -24 -96
+-24 -96 -18 -98
+-18 -98 -12 -99
+-12 -99 -6 -99
+-6 -99 0 -99
+0 -99 6 -99
+6 -99 12 -99
+12 -99 18 -98
+18 -98 24 -96
+24 -96 30 -95
+30 -95 36 -92
+36 -92 42 -90
+42 -90 48 -87
+48 -87 53 -84
+53 -84 58 -80
+58 -80 63 -77
+63 -77 68 -72
+68 -72 72 -68
+72 -68 77 -63
+77 -63 80 -58
+80 -58 84 -53
+84 -53 87 -48
+87 -48 90 -42
+90 -42 92 -36
+92 -36 95 -30
+95 -30 96 -24
+96 -24 98 -18
+98 -18 99 -12
+99 -12 99 -6
+99 -6 100 0
\ No newline at end of file

Added: sandbox/SOC/2010/sweepline/libs/sweepline/example/input_data/example_041.txt
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/sweepline/libs/sweepline/example/input_data/example_041.txt 2010-10-26 17:32:29 EDT (Tue, 26 Oct 2010)
@@ -0,0 +1,102 @@
+80
+99 6
+99 12
+98 18
+96 24
+92 36
+90 42
+87 48
+84 53
+77 63
+72 68
+68 72
+63 77
+53 84
+48 87
+42 90
+36 92
+24 96
+18 98
+12 99
+6 99
+-6 99
+-12 99
+-18 98
+-24 96
+-36 92
+-42 90
+-48 87
+-53 84
+-63 77
+-68 72
+-72 68
+-77 63
+-84 53
+-87 48
+-90 42
+-92 36
+-96 24
+-98 18
+-99 12
+-99 6
+-99 -6
+-99 -12
+-98 -18
+-96 -24
+-92 -36
+-90 -42
+-87 -48
+-84 -53
+-77 -63
+-72 -68
+-68 -72
+-63 -77
+-53 -84
+-48 -87
+-42 -90
+-36 -92
+-24 -96
+-18 -98
+-12 -99
+-6 -99
+6 -99
+12 -99
+18 -98
+24 -96
+36 -92
+42 -90
+48 -87
+53 -84
+63 -77
+68 -72
+72 -68
+77 -63
+84 -53
+87 -48
+90 -42
+92 -36
+96 -24
+98 -18
+99 -12
+99 -6
+20
+100 0 99 6
+95 30 92 36
+80 58 77 63
+58 80 53 84
+30 95 24 96
+0 99 -6 99
+-30 95 -36 92
+-58 80 -63 77
+-80 58 -84 53
+-95 30 -96 24
+-99 0 -99 -6
+-95 -30 -92 -36
+-80 -58 -77 -63
+-58 -80 -53 -84
+-30 -95 -24 -96
+0 -99 6 -99
+30 -95 36 -92
+58 -80 63 -77
+80 -58 84 -53
+95 -30 96 -24
\ No newline at end of file

Added: sandbox/SOC/2010/sweepline/libs/sweepline/example/input_data/example_042.txt
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/sweepline/libs/sweepline/example/input_data/example_042.txt 2010-10-26 17:32:29 EDT (Tue, 26 Oct 2010)
@@ -0,0 +1,222 @@
+0
+220
+0 0 0 10
+0 0 10 0
+0 10 0 20
+0 10 10 10
+0 20 0 30
+0 20 10 20
+0 30 0 40
+0 30 10 30
+0 40 0 50
+0 40 10 40
+0 50 0 60
+0 50 10 50
+0 60 0 70
+0 60 10 60
+0 70 0 80
+0 70 10 70
+0 80 0 90
+0 80 10 80
+0 90 0 100
+0 90 10 90
+0 100 10 100
+10 0 10 10
+10 0 20 0
+10 10 10 20
+10 10 20 10
+10 20 10 30
+10 20 20 20
+10 30 10 40
+10 30 20 30
+10 40 10 50
+10 40 20 40
+10 50 10 60
+10 50 20 50
+10 60 10 70
+10 60 20 60
+10 70 10 80
+10 70 20 70
+10 80 10 90
+10 80 20 80
+10 90 10 100
+10 90 20 90
+10 100 20 100
+20 0 20 10
+20 0 30 0
+20 10 20 20
+20 10 30 10
+20 20 20 30
+20 20 30 20
+20 30 20 40
+20 30 30 30
+20 40 20 50
+20 40 30 40
+20 50 20 60
+20 50 30 50
+20 60 20 70
+20 60 30 60
+20 70 20 80
+20 70 30 70
+20 80 20 90
+20 80 30 80
+20 90 20 100
+20 90 30 90
+20 100 30 100
+30 0 30 10
+30 0 40 0
+30 10 30 20
+30 10 40 10
+30 20 30 30
+30 20 40 20
+30 30 30 40
+30 30 40 30
+30 40 30 50
+30 40 40 40
+30 50 30 60
+30 50 40 50
+30 60 30 70
+30 60 40 60
+30 70 30 80
+30 70 40 70
+30 80 30 90
+30 80 40 80
+30 90 30 100
+30 90 40 90
+30 100 40 100
+40 0 40 10
+40 0 50 0
+40 10 40 20
+40 10 50 10
+40 20 40 30
+40 20 50 20
+40 30 40 40
+40 30 50 30
+40 40 40 50
+40 40 50 40
+40 50 40 60
+40 50 50 50
+40 60 40 70
+40 60 50 60
+40 70 40 80
+40 70 50 70
+40 80 40 90
+40 80 50 80
+40 90 40 100
+40 90 50 90
+40 100 50 100
+50 0 50 10
+50 0 60 0
+50 10 50 20
+50 10 60 10
+50 20 50 30
+50 20 60 20
+50 30 50 40
+50 30 60 30
+50 40 50 50
+50 40 60 40
+50 50 50 60
+50 50 60 50
+50 60 50 70
+50 60 60 60
+50 70 50 80
+50 70 60 70
+50 80 50 90
+50 80 60 80
+50 90 50 100
+50 90 60 90
+50 100 60 100
+60 0 60 10
+60 0 70 0
+60 10 60 20
+60 10 70 10
+60 20 60 30
+60 20 70 20
+60 30 60 40
+60 30 70 30
+60 40 60 50
+60 40 70 40
+60 50 60 60
+60 50 70 50
+60 60 60 70
+60 60 70 60
+60 70 60 80
+60 70 70 70
+60 80 60 90
+60 80 70 80
+60 90 60 100
+60 90 70 90
+60 100 70 100
+70 0 70 10
+70 0 80 0
+70 10 70 20
+70 10 80 10
+70 20 70 30
+70 20 80 20
+70 30 70 40
+70 30 80 30
+70 40 70 50
+70 40 80 40
+70 50 70 60
+70 50 80 50
+70 60 70 70
+70 60 80 60
+70 70 70 80
+70 70 80 70
+70 80 70 90
+70 80 80 80
+70 90 70 100
+70 90 80 90
+70 100 80 100
+80 0 80 10
+80 0 90 0
+80 10 80 20
+80 10 90 10
+80 20 80 30
+80 20 90 20
+80 30 80 40
+80 30 90 30
+80 40 80 50
+80 40 90 40
+80 50 80 60
+80 50 90 50
+80 60 80 70
+80 60 90 60
+80 70 80 80
+80 70 90 70
+80 80 80 90
+80 80 90 80
+80 90 80 100
+80 90 90 90
+80 100 90 100
+90 0 90 10
+90 0 100 0
+90 10 90 20
+90 10 100 10
+90 20 90 30
+90 20 100 20
+90 30 90 40
+90 30 100 30
+90 40 90 50
+90 40 100 40
+90 50 90 60
+90 50 100 50
+90 60 90 70
+90 60 100 60
+90 70 90 80
+90 70 100 70
+90 80 90 90
+90 80 100 80
+90 90 90 100
+90 90 100 90
+90 100 100 100
+100 0 100 10
+100 10 100 20
+100 20 100 30
+100 30 100 40
+100 40 100 50
+100 50 100 60
+100 60 100 70
+100 70 100 80
+100 80 100 90
+100 90 100 100
\ No newline at end of file

Added: sandbox/SOC/2010/sweepline/libs/sweepline/example/input_data/example_043.txt
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/sweepline/libs/sweepline/example/input_data/example_043.txt 2010-10-26 17:32:29 EDT (Tue, 26 Oct 2010)
@@ -0,0 +1,322 @@
+100
+5 5
+5 15
+5 25
+5 35
+5 45
+5 55
+5 65
+5 75
+5 85
+5 95
+15 5
+15 15
+15 25
+15 35
+15 45
+15 55
+15 65
+15 75
+15 85
+15 95
+25 5
+25 15
+25 25
+25 35
+25 45
+25 55
+25 65
+25 75
+25 85
+25 95
+35 5
+35 15
+35 25
+35 35
+35 45
+35 55
+35 65
+35 75
+35 85
+35 95
+45 5
+45 15
+45 25
+45 35
+45 45
+45 55
+45 65
+45 75
+45 85
+45 95
+55 5
+55 15
+55 25
+55 35
+55 45
+55 55
+55 65
+55 75
+55 85
+55 95
+65 5
+65 15
+65 25
+65 35
+65 45
+65 55
+65 65
+65 75
+65 85
+65 95
+75 5
+75 15
+75 25
+75 35
+75 45
+75 55
+75 65
+75 75
+75 85
+75 95
+85 5
+85 15
+85 25
+85 35
+85 45
+85 55
+85 65
+85 75
+85 85
+85 95
+95 5
+95 15
+95 25
+95 35
+95 45
+95 55
+95 65
+95 75
+95 85
+95 95
+220
+0 0 0 10
+0 0 10 0
+0 10 0 20
+0 10 10 10
+0 20 0 30
+0 20 10 20
+0 30 0 40
+0 30 10 30
+0 40 0 50
+0 40 10 40
+0 50 0 60
+0 50 10 50
+0 60 0 70
+0 60 10 60
+0 70 0 80
+0 70 10 70
+0 80 0 90
+0 80 10 80
+0 90 0 100
+0 90 10 90
+0 100 10 100
+10 0 10 10
+10 0 20 0
+10 10 10 20
+10 10 20 10
+10 20 10 30
+10 20 20 20
+10 30 10 40
+10 30 20 30
+10 40 10 50
+10 40 20 40
+10 50 10 60
+10 50 20 50
+10 60 10 70
+10 60 20 60
+10 70 10 80
+10 70 20 70
+10 80 10 90
+10 80 20 80
+10 90 10 100
+10 90 20 90
+10 100 20 100
+20 0 20 10
+20 0 30 0
+20 10 20 20
+20 10 30 10
+20 20 20 30
+20 20 30 20
+20 30 20 40
+20 30 30 30
+20 40 20 50
+20 40 30 40
+20 50 20 60
+20 50 30 50
+20 60 20 70
+20 60 30 60
+20 70 20 80
+20 70 30 70
+20 80 20 90
+20 80 30 80
+20 90 20 100
+20 90 30 90
+20 100 30 100
+30 0 30 10
+30 0 40 0
+30 10 30 20
+30 10 40 10
+30 20 30 30
+30 20 40 20
+30 30 30 40
+30 30 40 30
+30 40 30 50
+30 40 40 40
+30 50 30 60
+30 50 40 50
+30 60 30 70
+30 60 40 60
+30 70 30 80
+30 70 40 70
+30 80 30 90
+30 80 40 80
+30 90 30 100
+30 90 40 90
+30 100 40 100
+40 0 40 10
+40 0 50 0
+40 10 40 20
+40 10 50 10
+40 20 40 30
+40 20 50 20
+40 30 40 40
+40 30 50 30
+40 40 40 50
+40 40 50 40
+40 50 40 60
+40 50 50 50
+40 60 40 70
+40 60 50 60
+40 70 40 80
+40 70 50 70
+40 80 40 90
+40 80 50 80
+40 90 40 100
+40 90 50 90
+40 100 50 100
+50 0 50 10
+50 0 60 0
+50 10 50 20
+50 10 60 10
+50 20 50 30
+50 20 60 20
+50 30 50 40
+50 30 60 30
+50 40 50 50
+50 40 60 40
+50 50 50 60
+50 50 60 50
+50 60 50 70
+50 60 60 60
+50 70 50 80
+50 70 60 70
+50 80 50 90
+50 80 60 80
+50 90 50 100
+50 90 60 90
+50 100 60 100
+60 0 60 10
+60 0 70 0
+60 10 60 20
+60 10 70 10
+60 20 60 30
+60 20 70 20
+60 30 60 40
+60 30 70 30
+60 40 60 50
+60 40 70 40
+60 50 60 60
+60 50 70 50
+60 60 60 70
+60 60 70 60
+60 70 60 80
+60 70 70 70
+60 80 60 90
+60 80 70 80
+60 90 60 100
+60 90 70 90
+60 100 70 100
+70 0 70 10
+70 0 80 0
+70 10 70 20
+70 10 80 10
+70 20 70 30
+70 20 80 20
+70 30 70 40
+70 30 80 30
+70 40 70 50
+70 40 80 40
+70 50 70 60
+70 50 80 50
+70 60 70 70
+70 60 80 60
+70 70 70 80
+70 70 80 70
+70 80 70 90
+70 80 80 80
+70 90 70 100
+70 90 80 90
+70 100 80 100
+80 0 80 10
+80 0 90 0
+80 10 80 20
+80 10 90 10
+80 20 80 30
+80 20 90 20
+80 30 80 40
+80 30 90 30
+80 40 80 50
+80 40 90 40
+80 50 80 60
+80 50 90 50
+80 60 80 70
+80 60 90 60
+80 70 80 80
+80 70 90 70
+80 80 80 90
+80 80 90 80
+80 90 80 100
+80 90 90 90
+80 100 90 100
+90 0 90 10
+90 0 100 0
+90 10 90 20
+90 10 100 10
+90 20 90 30
+90 20 100 20
+90 30 90 40
+90 30 100 30
+90 40 90 50
+90 40 100 40
+90 50 90 60
+90 50 100 50
+90 60 90 70
+90 60 100 60
+90 70 90 80
+90 70 100 70
+90 80 90 90
+90 80 100 80
+90 90 90 100
+90 90 100 90
+90 100 100 100
+100 0 100 10
+100 10 100 20
+100 20 100 30
+100 30 100 40
+100 40 100 50
+100 50 100 60
+100 60 100 70
+100 70 100 80
+100 80 100 90
+100 90 100 100
\ No newline at end of file

Added: sandbox/SOC/2010/sweepline/libs/sweepline/example/output_data/example_039.png
==============================================================================
Binary file. No diff available.

Added: sandbox/SOC/2010/sweepline/libs/sweepline/example/output_data/example_040.png
==============================================================================
Binary file. No diff available.

Added: sandbox/SOC/2010/sweepline/libs/sweepline/example/output_data/example_041.png
==============================================================================
Binary file. No diff available.

Added: sandbox/SOC/2010/sweepline/libs/sweepline/example/output_data/example_042.png
==============================================================================
Binary file. No diff available.

Added: sandbox/SOC/2010/sweepline/libs/sweepline/example/output_data/example_043.png
==============================================================================
Binary file. No diff available.

Modified: sandbox/SOC/2010/sweepline/libs/sweepline/example/voronoi_visualizer.cpp
==============================================================================
--- sandbox/SOC/2010/sweepline/libs/sweepline/example/voronoi_visualizer.cpp (original)
+++ sandbox/SOC/2010/sweepline/libs/sweepline/example/voronoi_visualizer.cpp 2010-10-26 17:32:29 EDT (Tue, 26 Oct 2010)
@@ -63,9 +63,6 @@
     }
 
 protected:
- void initializeGL() {
- }
-
     void paintGL() {
         qglClearColor(QColor::fromRgb(0, 0, 0));
         glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
@@ -83,7 +80,7 @@
             }
             glEnd();
                         glPointSize(6);
- glLineWidth(2.7);
+ glLineWidth(2.7f);
             glBegin(GL_LINES);
             for (it = cells.begin(); it != cells.end(); it++) {
                 if (it->is_segment()) {
@@ -136,7 +133,7 @@
     void update_view_port() {
         glMatrixMode(GL_PROJECTION);
         glLoadIdentity();
- glOrtho(brect_.x_min, brect_.x_max, brect_.y_min, brect_.y_max, -1.0, 1.0);
+ glOrtho(brect_.x_min, brect_.x_max, brect_.y_min, brect_.y_max, -1.0, 1.0);
         glMatrixMode(GL_MODELVIEW);
     }
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk