4 double pitch_mag = 3,
double angle=60.0*M_PI/180.0);
11 const Vector ll(0,0,0), lr(0,0,width), ul(0,height,0), ur(0,height,width);
19 const Vector du(0, cos(angle), sin(angle));
20 const Vector pu = eckx.cross(du).norm();
21 Vector pjumpu = 0.5*pitch_mag*pu;
22 double mjumpu2 = pjumpu.dot(pjumpu);
23 const Ray rayu0(ul + why*mjumpu2/(why.dot(pjumpu)),
24 ul + zee*mjumpu2/(zee.dot(pjumpu)));
25 pjumpu = 1.5*pitch_mag*pu;
26 mjumpu2 = pjumpu.dot(pjumpu);
27 const Ray rayu1(ul + why*mjumpu2/(why.dot(pjumpu)),
28 ul + zee*mjumpu2/(zee.dot(pjumpu)));
31 const Vector dv(0, cos(angle), -sin(angle));
32 const Vector pv = eckx.cross(dv).norm();
33 Vector pjumpv = 0.5*pitch_mag*pv;
34 double mjumpv2 = pjumpv.dot(pjumpv);
35 const Ray rayv0(ll + why*mjumpv2/(why.dot(pjumpv)),
36 ll + zee*mjumpv2/(zee.dot(pjumpv)));
37 pjumpv = 1.5*pitch_mag*pv;
38 mjumpv2 = pjumpv.dot(pjumpv);
39 const Ray rayv1(ll + why*mjumpv2/(why.dot(pjumpv)),
40 ll + zee*mjumpv2/(zee.dot(pjumpv)));
47 const Vector pjumpw = pitch_mag*pw;
48 const Ray rayw0(ll + 0.0*pjumpw, ul + 0.0*pjumpw);
49 const Ray rayw1(ll + 1.0*pjumpw, ul + 1.0*pjumpw);
54 raypairs.push_back(make_pair(
Ray(ll, lr),
Ray(ul, ur) ));
57 raypairs.push_back(make_pair(
Ray(ll, ul),
Ray(lr, ur) ));
60 raypairs.push_back(make_pair( rayu0, rayu1) );
63 raypairs.push_back(make_pair( rayv0, rayv1) );
66 raypairs.push_back(make_pair( rayw0, rayw1) );
std::pair< Point, Point > Ray
A line segment running from a first (tail) to a second (head) point.
std::vector< ray_pair_t > ray_pair_vector_t
std::vector< float > Vector
ray_pair_vector_t make_raypairs(double width=100, double height=100, double pitch_mag=3, double angle=60.0 *M_PI/180.0)