259 auto* frame = print.
canvas.DrawFrame(-110, 50-110, 110, 50+110);
260 frame->SetTitle(
"Ray Grid");
262 info(
"got {} ray pairs", raypairs.size());
263 std:: vector<Point> centers0;
264 std:: vector<Point> centers1;
265 const int ui = 2, vi = 3, wi = 4;
266 int index[] = {2, 3, 4};
268 for (
int ind=0; ind<3; ++ind) {
271 auto r0 = raypairs[ri].first;
272 auto r1 = raypairs[ri].second;
278 auto cen = 0.5*(r0.first + r0.second);
279 centers0.push_back(cen);
280 centers1.push_back(0.5*(r1.first + r1.second));
284 const auto r00 = coords.zero_crossing(ui, vi);
285 const auto r0n = coords.ray_crossing({ui,-1}, {vi,1});
286 const auto r1n = coords.ray_crossing({ui,1}, {vi,-1});
288 const auto r01 = coords.ray_crossing({ui,0}, {vi,1});
289 const auto r10 = coords.ray_crossing({ui,1}, {vi,0});
291 const int i=10, j=16;
293 const auto rij = coords.ray_crossing({ui,i}, {vi,j});
294 const auto r0j = coords.ray_crossing({ui,0}, {vi,j});
295 const auto ri0 = coords.ray_crossing({ui,i}, {vi,0});
297 const double wpij = coords.pitch_location({ui,i}, {vi,j}, wi);
298 const auto wray0 = raypairs[wi].first;
299 const auto wray1 = raypairs[wi].second;
300 const auto wtail = wray0.first;
301 const auto whead = wray0.second;
303 const double wpind = wpij / wpit.magnitude();
337 draw_ray(
Ray(wtail + wpind*wpit, whead + wpind*wpit), colors[2], 1.0);
std::pair< Point, Point > Ray
A line segment running from a first (tail) to a second (head) point.
void draw_text(const Point &pt, const std::string text, int color=1, int align=22)
std::enable_if< internal::is_string< String >::value >::type print(std::FILE *f, const text_style &ts, const String &format_str, const Args &...args)
std::tuple< double, double, const reco::ClusterHit3D * > Point
Definitions used by the VoronoiDiagram algorithm.
Ray ray_pitch(const Ray &ray1, const Ray &ray2)
void draw_point(const Point &p, float size=1, int style=20, int color=1)
void draw_ray(const Ray &ray, int color=1, float width=1.0)
Vector ray_vector(const Ray &ray)
void draw_arrow(const Ray &ray, int color=1, float width=1.0, float asize=0, const char *opt="")