Menu

A problem with project?

Help
mauvia
15 hours ago
9 hours ago
  • mauvia

    mauvia - 15 hours ago

    In the following .asy file if I uncomment line A I no longer get the "tube" otherwise created by the last line. Can anyone tell me what the problem is? Is there some incompatibility?

    Thanks
    Maurizio

    import three;
    import tube;
    import graph3;
    
    currentpicture=new picture;
    unitsize(10cm);
    currentlight=White;
    
    triple P(real t){return (0,t,0);}
    path3 segment=graph(P,-1,1);
    
    path segmentprojected=project(segment);
    
    draw(segment,linewidth(.2));
    
    //draw(segmentprojected); //A
    
    draw(surface(tube(segment,scale(0.05)*unitcircle)),lightgray);
    
     
  • John Bowman

    John Bowman - 9 hours ago

    You are trying to output 2D graphics to the same file as your 3D graphics. Since version 2.71, Asymptote separates 2D and 3D graphics. If you want both 2D and 3D output, you should shipout to separate fles like this:

    ~~~unitsize(10cm);
    currentlight=White;

    triple P(real t){return (0,t,0);}
    path3 segment=graph(P,-1,1);

    path segmentprojected=project(segment);

    draw(segment,linewidth(.2));

    picture pic;
    unitsize(pic,10cm);;
    draw(pic,segmentprojected);
    shipout("2D");

    draw(surface(tube(segment,scale(0.05)*unitcircle)),lightgray);

    ~~~

     

Log in to post a comment.