diff options
author | Karl Berry <karl@freefriends.org> | 2020-03-26 21:51:04 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-03-26 21:51:04 +0000 |
commit | 26b61329ccfef7f8de119d7cf2ae772288e1497d (patch) | |
tree | 7576a5419d690e238031fb23fc92d17ebdab279d /Master/texmf-dist/asymptote/three_surface.asy | |
parent | 9d8ff0db40a3ccd5826fee73d7e3fb916b9f1841 (diff) |
asymptote 2.65 support files
git-svn-id: svn://tug.org/texlive/trunk@54567 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/asymptote/three_surface.asy')
-rw-r--r-- | Master/texmf-dist/asymptote/three_surface.asy | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/Master/texmf-dist/asymptote/three_surface.asy b/Master/texmf-dist/asymptote/three_surface.asy index 12ac464b242..8348d7ac3af 100644 --- a/Master/texmf-dist/asymptote/three_surface.asy +++ b/Master/texmf-dist/asymptote/three_surface.asy @@ -2063,7 +2063,6 @@ surface surface(Label L, surface s, real uoffset, real voffset, } private real a=4/3*(sqrt(2)-1); -private real f=0.5*sqrt(3)*a^2; private transform3 t1=rotate(90,O,Z); private transform3 t2=t1*t1; @@ -2074,14 +2073,29 @@ private transform3 i=xscale3(-1)*zscale3(-1); restricted patch octant1x=patch(X{Y}..{-X}Y{Z}..{-Y}Z..Z{X}..{-Z}cycle, new triple[] {(1,a,a),(a,1,a),(a^2,a,1), (a,a^2,1)}); -private triple[][][] P=hsplit(octant1x.P, - intersect((1,0){N}..{W}(0,1),(0,0)--2*dir(60))[0]); + +surface octant1(real transition) +{ + private triple[][][] P=hsplit(octant1x.P,transition); + private patch P0=patch(P[0]); + private patch P1=patch(P[1][0][0]..controls P[1][1][0] and P[1][2][0].. + P[1][3][0]..controls P[1][3][1] and P[1][3][2].. + P[1][3][3]..controls P[1][0][2] and P[1][0][1].. + cycle,O); + + // Set internal control point of P1 to match normals at P0.point(1/2,1). + triple n=P0.normal(1/2,1); + triple[][] P=P1.P; + triple u=-P[0][0]-P[1][0]+P[2][0]+P[3][0]; + triple v=-P[0][0]-2*P[1][0]+P[1][1]-P[2][0]+P[3][1]; + triple w=cross(u,v+(0,0,2)); + real i=0.5*(n.z*w.x/n.x-w.z)/(u.x-u.y); + P1.P[2][1]=(i,i,1); + return surface(P0,P1); +} + // Nondegenerate first octant -surface octant1=surface(patch(P[0]), - patch(P[1][0][0]..controls P[1][1][0] and P[1][2][0].. - P[1][3][0]..controls P[1][3][1] and P[1][3][2].. - P[1][3][3]..controls P[1][0][2] and P[1][0][1].. - cycle,(f,f,1))); +restricted surface octant1=octant1(0.95); restricted surface unithemisphere=surface(octant1,t1*octant1,t2*octant1, t3*octant1); |