Download 3DLDF.
Transcript
Chapter 26: Path Reference
175
{
pt[i] = pt[0];
pt[i].rotate(0, 0, i * 45);
}
Path p("--", true, &pt[0], &pt[1], &pt[2], &pt[3],
&pt[4], &pt[5], &pt[6],
&pt[7], 0);
p.draw();
p.scale(2, 2);
p.draw();
(0, 0, 0)
Figure 115.
Transform shear (real xy, [real xz = 0, [real yx = 0, [real yz = 0,
[Function]
[real zx = 0, [real zy = 0]]]]])
Creates a Transform t locally and calls t.shear(xy, xz, yx, yz, zx, zy ). t is then
applied to all of the Points on points. The return value is t.
Point p0;
Point p1(1);
Point p2(1, 1);
Point p3(0, 1);
Path q("--", true, &p0, &p1, &p2, &p3, 0);
q.rotate(0, 45);
q.shift(1);
q.filldraw(black, light_gray);
q.shear(1.5, 2, 2.5, 3, 3.5, 5);
q.filldraw(black, light_gray);