home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / tutorials / geometer / Theorems / curves / quarticbez.T < prev    next >
Encoding:
Text File  |  1994-08-02  |  1.5 KB  |  39 lines

  1. .geometry "version 0.1";
  2. v1 = .free(-0.941263, -0.891336, .invisible, "1");
  3. v2 = .free(0.920705, -0.891336, .invisible, "2");
  4. l1 = .l.vv(v1, v2);
  5. v3 = .vonl(l1, 0.019089, -0.891336, .plus);
  6. v4 = .free(-0.79442, -0.659325, "P1");
  7. v5 = .free(-0.580029, 0.353891, "P2");
  8. v6 = .free(-0.060206, 0.820852, "P3");
  9. v7 = .free(0.800294, 0.867841, "P4");
  10. v8 = .free(0.718062, -0.64464, "P5");
  11. rat = .ratio.vvv(v1, v3, v2);
  12. v45 = .v.vvratio(v4, v5, rat, .invisible);
  13. v56 = .v.vvratio(v5, v6, rat, .invisible);
  14. v67 = .v.vvratio(v6, v7, rat, .invisible);
  15. v78 = .v.vvratio(v7, v8, rat, .invisible);
  16. v456 = .v.vvratio(v45, v56, rat, .invisible);
  17. v567 = .v.vvratio(v56, v67, rat, .invisible);
  18. v678 = .v.vvratio(v67, v78, rat, .invisible);
  19. v4567 = .v.vvratio(v456, v567, rat, .invisible);
  20. v5678 = .v.vvratio(v567, v678, rat, .invisible);
  21. v45678 = .v.vvratio(v4567, v5678, rat, .smear);
  22. l2 = .l.vv(v4, v5, .magenta);
  23. l3 = .l.vv(v5, v6, .magenta);
  24. l4 = .l.vv(v6, v7, .magenta);
  25. l5 = .l.vv(v7, v8, .magenta);
  26. l6 = .l.vv(v45, v56, .magenta);
  27. l7 = .l.vv(v56, v67, .magenta);
  28. l8 = .l.vv(v67, v78, .magenta);
  29. l9 = .l.vv(v456, v567, .magenta);
  30. l10 = .l.vv(v567, v678, .magenta);
  31. l11 = .l.vv(v4567, v5678, .magenta);
  32. .text("Quartic Bezier Curve:");
  33. .text("");
  34. .text("(See bigbez.t).  This figure simply illustrates the construction");
  35. .text("of a 5th order (= 4th degree) Bezier curve from 5 control points.");
  36. .text("Move the cross on the line at the bottom of the figure to change");
  37. .text("all the ratios and smear out a curve.  You can also move any of the");
  38. .text("control points P1, P2, ...");
  39.