mmj:103

This source code is different form the default code in therion (more pebbles in the survey).

    def a_pebbles (expr p) =
      T:=identity;
      pickup PenC;
      path q, qq; q = bbox p;
      picture tmp_pic; 
      tmp_pic := image(
      for i = xpart llcorner q step 0.45u until xpart urcorner q:
        for j = ypart llcorner q step 0.45u until ypart urcorner q:
          qq := (superellipse((.2u,0),(0,.1u),(-.2u,0),(0,.-.1u),.75))
          %  randomized (u/25)
          rotated uniformdeviate(360) 
          shifted ((i,j) randomized 0.6u);
          if xpart (p intersectiontimes qq) < 0:
            thdraw qq;
          fi;
       endfor;  
     endfor;
     );
     clip tmp_pic to p;
     draw tmp_pic;
   enddef;

Default values are :

    for i = xpart llcorner q step 1.5u until xpart urcorner q:
      for j = ypart llcorner q step 1.5u until ypart urcorner q:
        qq := (superellipse((.2u,0),(0,.1u),(-.2u,0),(0,.-.1u),.75))
          %  randomized (u/25)\n"
          rotated uniformdeviate(360) 
          shifted ((i,j) randomized 0.8u);
  • mmj/103.txt
  • Last modified: 15 years ago
  • by 127.0.0.1