1 Reply Latest reply on Oct 20, 2010 5:43 PM by pwillener

    [Bug Report!]Adobe Reader can not display 3D file normally!

    surenjia

      I have a 3D pdf file,which is produced by Asymptote,and some labels in the 3D model, can not be displayed normally in the Adobe Reader,even the latest version 9.4.I got this file by
      $asy -file pdf -render=4 file.asy

      while all of them can be displayed in the OpenGL mode.
      $asy -V file.asy

      I hope you can give me a message about the reason and tip about how to solve the problem.

      thank you very much!

       

      code:

      size(400);
      import solids;
      import graph3;
      import three;
      import math;
      defaultpen(1pt+fontsize(7pt));
      currentprojection=perspective(1,1,-1,up=-Z);
      
      draw(unitsphere,palegray);//鐢荤悆
      //浠ヤ笅閮ㄥ垎鐢绘敮鏌?draw(shift(1,0,0)*xscale3(0.06)*yscale3(0.06)*zscale3(1.2)*unitcylinder,palegray);
      draw(shift(1,0,0)*xscale3(0.06)*yscale3(0.06)*zscale3(0.1)*unitsphere,blue);
      label("1",(1.07,0,0.5),yellow);
      
      draw(shift(-1,0,0)*xscale3(0.06)*yscale3(0.06)*zscale3(1.2)*unitcylinder,palegray);
      draw(shift(-1,0,0)*xscale3(0.06)*yscale3(0.06)*zscale3(0.1)*unitsphere,blue);
      label("5",(-1.07,0,0.5),yellow);
      
      draw(shift(0,1,0)*xscale3(0.06)*yscale3(0.06)*zscale3(1.2)*unitcylinder,palegray);
      draw(shift(0,1,0)*xscale3(0.06)*yscale3(0.06)*zscale3(0.1)*unitsphere,blue);
      label("7",(0,1.07,0.5),yellow);
      
      
      draw(shift(0,-1,0)*xscale3(0.06)*yscale3(0.06)*zscale3(1.2)*unitcylinder,palegray);
      draw(shift(0,-1,0)*xscale3(0.06)*yscale3(0.06)*zscale3(0.1)*unitsphere,blue);
      label("3",(0,-1.07,0.5),yellow);
      
      draw(shift(0.707,0.707,0)*xscale3(0.06)*yscale3(0.06)*zscale3(1.2)*unitcylinder,palegray);
      draw(shift(0.707,0.707,0)*xscale3(0.06)*yscale3(0.06)*zscale3(0.1)*unitsphere,blue);
      label("8",(0.75,0.75,0.5),yellow);
      
      draw(shift(-0.707,0.707,0)*xscale3(0.06)*yscale3(0.06)*zscale3(1.2)*unitcylinder,palegray);
      draw(shift(-0.707,0.707,0)*xscale3(0.06)*yscale3(0.06)*zscale3(0.1)*unitsphere,blue);
      label("6",(-0.75,0.75,0.5),yellow);
      
      draw(shift(0.707,-0.707,0)*xscale3(0.06)*yscale3(0.06)*zscale3(1.2)*unitcylinder,palegray);
      draw(shift(0.707,-0.707,0)*xscale3(0.06)*yscale3(0.06)*zscale3(0.1)*unitsphere,blue);
      label("2",(0.75,-0.75,0.5),yellow);
      
      draw(shift(-0.707,-0.707,0)*xscale3(0.06)*yscale3(0.06)*zscale3(1.2)*unitcylinder,palegray);
      draw(shift(-0.707,-0.707,0)*xscale3(0.06)*yscale3(0.06)*zscale3(0.1)*unitsphere,blue);
      label("4",(-0.75,-0.75,0.5),yellow);
      
      draw(shift(0,0,-1.05)*xscale3(0.16)*yscale3(0.16)*zscale3(0.2)*unitcylinder,palegray);//涓婁汉瀛?draw(shift(0,0,-1.1)*xscale3(0.2)*yscale3(0.2)*zscale3(0.05)*unitcylinder,palegray);//涓婁汉瀛?draw(shift(0,0,0.85)*xscale3(0.16)*yscale3(0.16)*zscale3(0.2)*unitcylinder,palegray);//涓嬩汉瀛?draw(shift(0,0,1.05)*xscale3(0.2)*yscale3(0.2)*zscale3(0.05)*unitcylinder,palegray);//涓婁汉瀛?draw(shift(0,0,1.0)*xscale3(0.16)*yscale3(0.16)*zscale3(0.2)*unithemisphere,palegray);//涓嬩汉瀛?draw(shift(0,0,-1.05)*xscale3(0.16)*yscale3(0.16)*zscale3(0.2)*unitsphere,palegray);//涓嬩汉瀛?
      
      path p=(1,0)..(0,1)..(-1,0)..(0,-1)..cycle;
      path3 p3=path3(p);
      surface sf=surface(patch(p3));
      draw(shift(0,0,-1.05)*xscale3(0.2)*yscale3(0.2)*surface(sf),palegray);
      draw(shift(0,0,-1.1)*xscale3(0.2)*yscale3(0.2)*surface(sf),palegray);
      draw(shift(0,0,1.05)*xscale3(0.2)*yscale3(0.2)*surface(sf),palegray);
      draw(shift(0,0,1.1)*xscale3(0.2)*yscale3(0.2)*surface(sf),palegray);
      
      //浠ヤ笅缁樺埗鐜剨缂?draw(circle((0,0,sin(pi/8)),cos(pi/8)),gray);
      draw(circle((0,0,sin(-pi/8)),cos(-pi/8)),gray);
      draw(circle((0,0,sin(pi/4)),cos(pi/4)),gray);
      draw(circle((0,0,sin(-pi/4)),cos(-pi/4)),gray);
      draw(circle((0,0,sin(3pi/8)),cos(3pi/8)),gray);
      draw(circle((0,0,sin(-3pi/8)),cos(-3pi/8)),gray);
      
      
      xaxis3("$x$",-1.5,1.5);
      yaxis3("$y$",-1.5,1.5);
      zaxis3("$z$",-1.5,1.5);
      
      /*
      surface Surf(triple center, triple A, triple B, triple C,triple D,int nu=3, int nv=nu) {
      path3 p1=arc(center,A,B);
      path3 p2=arc(center,B,C);
      path3 p3=arc(center,C,D);
      path3 p4=arc(center,D,A);
      triple surf(pair t) {
      real u=t.x;
      real v=t.y;
      path3 cr=arc(center,relpoint(p1,u),relpoint(reverse(p3),u));
      return relpoint(cr,v);
      };
      return surface(surf,(0,0),(1,1),nu,nv,Spline);
      }
      real r=1+0.005;
      triple A=r*unit((1,0,0.1));
      triple B=r*unit((1,0,-0.1));
      triple C=r*unit((-1,0,-0.1));
      triple D=r*unit((-0.995,0.1,0.1));
      //draw(Surf(O,A,B,C,D,4,4),yellow);
      //draw(arc(O,A,B)^^arc(O,B,C)^^arc(O,C,D)^^arc(O,D,A),red+thick());
      */
      
      //浠ヤ笅缁樺埗閮ㄥ垎鐞冨3鏉?real r=1+0.001;
      for(int i=0;i<16;++i){
      triple Di_1=r*unit((sin(pi/16+i*pi/8)*cos(pi/8),cos(pi/16+i*pi/8)*cos(pi/8),sin(pi/8)));
      triple Di_2=r*unit((sin(pi/16+i*pi/8)*cos(-pi/8),cos(pi/16+i*pi/8)*cos(pi/8),sin(-pi/8)));
      draw(arc(O,Di_1,Di_2),gray);
      }
      
      for(int j=0;j<8;++j){
      triple Fj_1=r*unit((sin(j*pi/4)*cos(pi/4),cos(j*pi/4)*cos(pi/4),sin(pi/4)));
      triple Fj_2=r*unit((sin(j*pi/4)*cos(3pi/8),cos(j*pi/4)*cos(3pi/8),sin(3pi/8)));
      draw(arc(O,Fj_1,Fj_2),gray);
      
      triple Bj_1=r*unit((sin(j*pi/4)*cos(pi/4),cos(j*pi/4)*cos(pi/4),sin(-pi/4)));
      triple Bj_2=r*unit((sin(j*pi/4)*cos(3pi/8),cos(j*pi/4)*cos(3pi/8),sin(-3pi/8)));
      draw(arc(O,Bj_1,Bj_2),gray);
      
      triple Ej_1=r*unit((sin(pi/8+j*pi/4)*cos(pi/4),cos(pi/8+j*pi/4)*cos(pi/4),sin(pi/4)));
      triple Ej_2=r*unit((sin(pi/8+j*pi/4)*cos(pi/8),cos(pi/8+j*pi/4)*cos(pi/8),sin(pi/8)));
      draw(arc(O,Ej_1,Ej_2),gray);
      
      triple Cj_1=r*unit((sin(pi/8+j*pi/4)*cos(pi/4),cos(pi/8+j*pi/4)*cos(pi/4),sin(-pi/4)));
      triple Cj_2=r*unit((sin(pi/8+j*pi/4)*cos(pi/8),cos(pi/8+j*pi/4)*cos(pi/8),sin(-pi/8)));
      draw(arc(O,Cj_1,Cj_2),gray);
      
      
      triple A_1=r*unit((sin(3pi/8)*cos(3pi/8),cos(3pi/8)*cos(3pi/8),sin(3pi/8)));
      triple A_2=r*unit((sin(9pi/8)*cos(3pi/8),cos(9pi/8)*cos(3pi/8),sin(3pi/8)));
      draw(arc(O,A_1,A_2),gray);
      
      triple G_1=r*unit((sin(pi/8)*cos(-3pi/8),cos(pi/8)*cos(-3pi/8),sin(-3pi/8)));
      triple G_2=r*unit((sin(11pi/8)*cos(-3pi/8),cos(11pi/8)*cos(-3pi/8),sin(-3pi/8)));
      draw(arc(O,G_1,G_2),gray);
      
      //浠ヤ笅閲囩敤鏃嬭浆鐨勬柟娉曠粯鍒惰摑鑹叉爣绀哄甫(閮ㄥ垎)
      revolution belt=revolution(arc(O,1+0.006,83,0,97,0),Z,0,360);
      draw(surface(belt),blue);
      
      dot("1",r*(cos(pi/8)*cos(3pi/8),-sin(pi/8)*cos(3pi/8),sin(3pi/8)),red+0.1cm);//y鍊艰姝h礋鍙樻崲锛寈y鍧愭爣瑕佹竻妤氥€?dot("2",r*(cos(9pi/8)*cos(3pi/8),-sin(9pi/8)*cos(3pi/8),sin(3pi/8)),red+0.1cm);
      dot("3",r*(cos(pi/2)*cos(5pi/16),-sin(pi/2)*cos(5pi/16),sin(5pi/16)),red+0.1cm);
      dot("4",r*(cos(pi/32)*cos(pi/4),-sin(pi/32)*cos(pi/4),sin(pi/4)),red+0.1cm);
      dot("5",r*(cos(3pi/32)*cos(pi/4),-sin(3pi/32)*cos(pi/4),sin(pi/4)),red+0.1cm);
      dot("6",r*(cos(13pi/32)*cos(pi/4),-sin(13pi/32)*cos(pi/4),sin(pi/4)),red+0.1cm);
      dot("7",r*(cos(15pi/32)*cos(pi/4),-sin(15pi/32)*cos(pi/4),sin(pi/4)),red+0.1cm);
      dot("8",r*(cos(17pi/32)*cos(pi/4),-sin(17pi/32)*cos(pi/4),sin(pi/4)),red+0.1cm);
      dot("9",r*(cos(19pi/32)*cos(pi/4),-sin(19pi/32)*cos(pi/4),sin(pi/4)),red+0.1cm);
      dot("10",r*(cos(22pi/32)*cos(pi/4),-sin(22pi/32)*cos(pi/4),sin(pi/4)),red+0.1cm);
      dot("11",r*(cos(29pi/32)*cos(pi/4),-sin(29pi/32)*cos(pi/4),sin(pi/4)),red+0.1cm);
      dot("12",r*(cos(19pi/16)*cos(pi/12),-sin(19pi/16)*cos(pi/12),sin(pi/12)),red+0.1cm);
      dot("13",r*(cos(25pi/16)*cos(pi/12),-sin(25pi/16)*cos(pi/12),sin(pi/12)),red+0.1cm);
      dot("14",r*(cos(13pi/32)*cos(pi/8),-sin(13pi/32)*cos(pi/8),-sin(pi/8)),red+0.1cm);
      dot("15",r*(cos(-19pi/32)*cos(pi/8),-sin(-19pi/32)*cos(pi/8),-sin(pi/8)),red+0.1cm);
      dot("16",r*(cos(-11pi/32)*cos(pi/8),-sin(-11pi/32)*cos(pi/8),-sin(pi/8)),red+0.1cm);
      dot("17",r*(cos(25pi/32)*cos(pi/4),-sin(25pi/32)*cos(pi/4),-sin(pi/4)),red+0.1cm);
      dot("18",r*(cos(69pi/64)*cos(pi/4),-sin(69pi/64)*cos(pi/4),-sin(pi/4)),red+0.1cm);
      dot("19",r*(cos(71pi/64)*cos(pi/4),-sin(71pi/64)*cos(pi/4),-sin(pi/4)),red+0.1cm);
      dot("20",r*(cos(73pi/64)*cos(pi/4),-sin(73pi/64)*cos(pi/4),-sin(pi/4)),red+0.1cm);
      dot("21",r*(cos(97pi/64)*cos(pi/4),-sin(97pi/64)*cos(pi/4),-sin(pi/4)),red+0.1cm);
      dot("22",r*(cos(105pi/64)*cos(pi/4),-sin(105pi/64)*cos(pi/4),-sin(pi/4)),red+0.1cm);
      dot("23",r*(cos(107pi/64)*cos(pi/4),-sin(107pi/64)*cos(pi/4),-sin(pi/4)),red+0.1cm);
      dot("24",r*(cos(109pi/64)*cos(pi/4),-sin(109pi/64)*cos(pi/4),-sin(pi/4)),red+0.1cm);
      dot("25",r*(cos(11pi/32),0,-sin(11pi/32)),red+0.1cm);
      dot("26",r*(cos(10pi/32),0,-sin(10pi/32)),red+0.1cm);
      dot("27",r*(cos(pi)*cos(10pi/32),-sin(pi)*cos(10pi/32),-sin(10pi/32)),red+0.1cm);
      dot("28",1.05*(G_1+3*G_2)/4,red+0.1cm);
      dot("29",r*(cos(3pi/4)*cos(-pi/8),-sin(3pi/4)*cos(-pi/8),-sin(3pi/4)),red+0.1cm);
      }