diff options
author | Karl Berry <karl@freefriends.org> | 2020-03-03 22:35:09 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-03-03 22:35:09 +0000 |
commit | f6bb2b5974c9dc15a4530842100d30fe1981b973 (patch) | |
tree | 62ef95efa54d91b6eafb6df99f330dc136f77f29 /Build/source/utils/asymptote/examples | |
parent | 24dbc0b1802756862bedad6a4088f50aad68b51b (diff) |
asy 2.63 sources
git-svn-id: svn://tug.org/texlive/trunk@54034 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/examples')
7 files changed, 28 insertions, 13 deletions
diff --git a/Build/source/utils/asymptote/examples/cylinder.asy b/Build/source/utils/asymptote/examples/cylinder.asy index 88ff1394bac..07c59f35d8d 100644 --- a/Build/source/utils/asymptote/examples/cylinder.asy +++ b/Build/source/utils/asymptote/examples/cylinder.asy @@ -1,8 +1,17 @@ -import solids; - size(0,100); +import solids; currentlight=Viewport; -revolution r=cylinder(O,1,1.5,Y+Z); -draw(surface(r),green,render(merge=true)); -draw(r,blue); +triple v=O; +real r=1; +real h=1.5; +triple axis=Y+Z; + +// Optimized cylinder +surface cylinder=shift(v)*align(unit(axis))*scale(r,r,h)*unitcylinder; +draw(cylinder,green,render(merge=true)); + +// Skeleton +revolution r=cylinder(v,r,h,axis); +//draw(surface(r),green,render(merge=true)); +draw(r,blue+0.15mm); diff --git a/Build/source/utils/asymptote/examples/pipes.asy b/Build/source/utils/asymptote/examples/pipes.asy index 6b2025f6b35..383fda80fd5 100644 --- a/Build/source/utils/asymptote/examples/pipes.asy +++ b/Build/source/utils/asymptote/examples/pipes.asy @@ -90,7 +90,7 @@ void DrawLink(transform3 TBase, transform3 TEnd, pen objStyle,string s) // draw two cylinders draw(TBase*objSurface,objStyle,render); - draw(TEnd*shift((0,0,-h))*objSurface,objStyle,render); + draw(TEnd*shift((0,0,-h+1e-5))*objSurface,objStyle,render); // draw the link between two cylinders triple pStart=TBase*(0.5*h*Z); diff --git a/Build/source/utils/asymptote/examples/randompath3.asy b/Build/source/utils/asymptote/examples/randompath3.asy index b6666570b36..4141eeae923 100644 --- a/Build/source/utils/asymptote/examples/randompath3.asy +++ b/Build/source/utils/asymptote/examples/randompath3.asy @@ -1,4 +1,5 @@ import three; size(300); -draw(randompath3(100),red); +path3 g=randompath3(100); +draw(g,red,currentlight); diff --git a/Build/source/utils/asymptote/examples/sphere.asy b/Build/source/utils/asymptote/examples/sphere.asy index 8d1b5fe50cd..8902dd0621b 100644 --- a/Build/source/utils/asymptote/examples/sphere.asy +++ b/Build/source/utils/asymptote/examples/sphere.asy @@ -1,6 +1,6 @@ import three; size(200); -currentprojection=orthographic(5,4,3); +//currentprojection=orthographic(5,4,3); -draw(unitsphere,green,render(compression=Zero,merge=true)); +draw(unitsphere,green+opacity(0.5),render(compression=Zero,merge=true)); diff --git a/Build/source/utils/asymptote/examples/unitoctant.asy b/Build/source/utils/asymptote/examples/unitoctant.asy index 89f851f6a23..e84fdd537c3 100644 --- a/Build/source/utils/asymptote/examples/unitoctant.asy +++ b/Build/source/utils/asymptote/examples/unitoctant.asy @@ -3,7 +3,7 @@ import graph3; currentprojection=orthographic(5,4,2); size(0,150); -patch s=octant1; +patch s=octant1x; draw(surface(s),green+opacity(0.5)); draw(s.external(),blue); diff --git a/Build/source/utils/asymptote/examples/vertexshading.asy b/Build/source/utils/asymptote/examples/vertexshading.asy index fd5e9b2df84..4a35e09559b 100644 --- a/Build/source/utils/asymptote/examples/vertexshading.asy +++ b/Build/source/utils/asymptote/examples/vertexshading.asy @@ -4,7 +4,10 @@ size(200); currentprojection=perspective(4,5,5); -//draw(shift(2Z)*surface(O--X--Y--cycle),blue); +draw(shift(2Z)*surface(O--X--Y--cycle, + new pen[] {red+opacity(0.5),green,blue})); +draw(shift(2Y+2Z)*surface(O--X--Y--cycle),blue); +draw(shift(2Y+Z)*surface(unitsquare3),green); draw(surface(unitcircle3,new pen[] {red,green,blue,black})); draw(surface(shift(Z)*unitsquare3, diff --git a/Build/source/utils/asymptote/examples/workcone.asy b/Build/source/utils/asymptote/examples/workcone.asy index 5d102d86214..594758bba64 100644 --- a/Build/source/utils/asymptote/examples/workcone.asy +++ b/Build/source/utils/asymptote/examples/workcone.asy @@ -18,9 +18,11 @@ real x2=r*s2/h; render render=render(compression=0,merge=true); -path3 p=(0,0,0)--(x,0,s); +draw(scale(x1,x1,-s1)*shift(-Z)*unitcone,lightblue+opacity(0.5),render); + +path3 p=(x2,0,s2)--(x,0,s+0.005); revolution a=revolution(p,Z); -draw(surface(a,4),lightblue+opacity(0.5),render); +draw(surface(a),lightblue+opacity(0.5),render); path3 q=(x,0,s)--(r,0,h); revolution b=revolution(q,Z); |