fr:mmj:201

  def l_overhang (expr P) =
    T:=identity;
    cas := 0;
    dlzka := arclength P;
    mojkrok:=adjust_step(dlzka, 0.3u);
    pickup PenC;
    t1:=0;
    forever:
      t := arctime (cas + mojkrok/5) of P;
      t2 := arctime (cas + mojkrok) of P;
      thfill (subpath (t1,t2) of P) -- 
        ((point t of P) + .3u * unitvector(thdir(P,t) rotated 90)) -- 
        cycle;
      cas := cas + mojkrok;
      exitif cas > dlzka - (2*mojkrok/3); % for rounding errors
      t1:=t2;
    endfor;
    thdraw P;
  enddef; 
  • fr/mmj/201.txt
  • Last modified: 17 years ago
  • by 127.0.0.1