"Fossies" - the Fresh Open Source Software Archive

Member "asymptote-2.60/examples/vertexshading.asy" (6 Nov 2019, 632 Bytes) of package /linux/misc/asymptote-2.60.src.tgz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "vertexshading.asy": 2.53_vs_2.54.

    1 import three;
    2 
    3 size(200);
    4 
    5 currentprojection=perspective(4,5,5);
    6 
    7 //draw(shift(2Z)*surface(O--X--Y--cycle),blue);
    8 
    9 draw(surface(unitcircle3,new pen[] {red,green,blue,black}));
   10 draw(surface(shift(Z)*unitsquare3,
   11              new pen[] {red,green+opacity(0.5),blue,black}),
   12      prc() ? nolight : currentlight);
   13 draw(surface(shift(X)*((0,0,0)..controls (1,0,0) and (2,0,0)..(3,0,0)..
   14              controls (2.5,sqrt(3)/2,0) and (2,sqrt(3),0)..
   15              (1.5,3*sqrt(3)/2,0)..
   16                          controls (1,sqrt(3),0) and (0.5,sqrt(3)/2,0)..cycle),
   17              new triple[] {(1.5,sqrt(3)/2,2)},new pen[] {red,green,blue}));