From a5ae129f3aa3a3a0aeaa21c55b75a1d543fe4111 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Fri, 4 Jun 2021 03:02:48 +0000 Subject: CTAN sync 202106040302 --- graphics/circuit_macros/examples/Ball.m4 | 40 ++++++++++++++++---------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'graphics/circuit_macros/examples/Ball.m4') diff --git a/graphics/circuit_macros/examples/Ball.m4 b/graphics/circuit_macros/examples/Ball.m4 index 8c022223ef..e551dff845 100644 --- a/graphics/circuit_macros/examples/Ball.m4 +++ b/graphics/circuit_macros/examples/Ball.m4 @@ -29,19 +29,19 @@ command "\small{" ifpstricks( `command "\pscustom[fillstyle=gradient,gradmidpoint=1.0,%" command sprintf("gradbegin=gray,gradend=white,gradlines=%g]{",rectwid*200)') - line from project(-rectht/2,-rectwid*1/3,0) \ - to project( rectht/2,-rectwid*1/3,0) \ - then to project( rectht/2, rectwid*2/3,0) \ - then to project(-rectht/2, rectwid*2/3,0) \ - then to project(-rectht/2,-rectwid*1/3,0) + line from Project(-rectht/2,-rectwid*1/3,0) \ + to Project( rectht/2,-rectwid*1/3,0) \ + then to Project( rectht/2, rectwid*2/3,0) \ + then to Project(-rectht/2, rectwid*2/3,0) \ + then to Project(-rectht/2,-rectwid*1/3,0) ifpstricks(command "}%") define(`C3D',`0,0,alpha') # Centre of the sphere - C: project(C3D) + C: Project(C3D) # Shaded sphere ifelse(m4postprocessor,pstricks, - `Highlight: project(sum3D(C3D,rot3Dz(-15*dtor_,rot3Dy(-60*dtor_,alpha,0,0)))) + `Highlight: Project(sum3D(C3D,rot3Dz(-15*dtor_,rot3Dy(-60*dtor_,alpha,0,0)))) command "\pscustom[fillstyle=gradient,gradmidpoint=0.0,%" command sprintf("gradbegin=gray,gradend=white,gradlines=%g,%%",alpha*200) command "GradientCircle=true,GradientScale=1.5,%" @@ -54,18 +54,18 @@ command "\small{" C.x,C.y,alpha/2.54)', `circle rad alpha at C fill_(1) ') - S: "$S$" at project(0,0,0) rjust # The sphere bottom touch point + S: "$S$" at Project(0,0,0) rjust # The sphere bottom touch point "$\alpha$" at 0.5 rjust define(`N3D',`0,0,2*alpha') # North pole - N: "N" at project(N3D) ljust above + N: "N" at Project(N3D) ljust above phi = 65*dtor_ define(`Phat3D',`rot3Dz(phi,alpha*2.7,0,0)') - Phat: "$\hat{P}$" at project(Phat3D) ljust + Phat: "$\hat{P}$" at Project(Phat3D) ljust - X: project(rectht/2*0.8,0,0) - Y: project(0,rectwid/2*0.8,0) + X: Project(rectht/2*0.8,0,0) + Y: Project(0,rectwid/2*0.8,0) `define' linevis { # ratio # Visibility function for lines fom S to Xb $2 = distance(($1 between S and Xb),C)-alpha } @@ -84,8 +84,8 @@ thinlines_ # axes arrow up alpha*0.5 chop 0.05 chop 0 ; "$z,\:\zeta$" above ljust invisline(Phat) line to Phat chop 0.05 chop 0 - arc ccw -> rad alpha from project(alpha/2,0,0) to \ - project(rot3Dz(phi,alpha/2,0,0)) + arc ccw -> rad alpha from Project(alpha/2,0,0) to \ + Project(rot3Dz(phi,alpha/2,0,0)) "$\phi$" below at 0.5 between last arc.start and last arc.end # vector (ratio along (N to Phat)) @@ -94,7 +94,7 @@ define(`ray',`sum3D(N3D,sprod3D($1,diff3D(Phat3D,N3D)))') $2 = length3D(diff3D(ray($1),C3D))-alpha } bisect( rayvis, 1e-3, 1, 1e-8, p ) # Find P - P: "$P$" at project(ray(p)) ljust above + P: "$P$" at Project(ray(p)) ljust above thicklines_ line dashed from N to P chop 0 chop 0.05 @@ -108,11 +108,11 @@ thinlines_ # Draw the meridian bisect( meridianvis, 0, pi_, 1e-8, y ) n = 0 for ang = y-pi_ to y by pi_/20 do { - Q[n]: project(sum3D(C3D,meridian(ang))); n+=1 } + Q[n]: Project(sum3D(C3D,meridian(ang))); n+=1 } fitcurve(Q,n-1) n = 0 for ang = y to y+pi_ by pi_/20 do { - Q[n]: project(sum3D(C3D,meridian(ang))); n+=1 } + Q[n]: Project(sum3D(C3D,meridian(ang))); n+=1 } fitcurve(Q,n-1,dashed) define(`equator',`rot3Dz($1,alpha,0,0)') @@ -122,15 +122,15 @@ define(`equator',`rot3Dz($1,alpha,0,0)') bisect( equatorvis, 0, pi_, 1e-8, y ) n = 0 for ang = y-pi_ to y by pi_/20 do { - Q[n]: project(sum3D(C3D,equator(ang))); n+=1 } + Q[n]: Project(sum3D(C3D,equator(ang))); n+=1 } fitcurve(Q,n-1) n = 0 for ang = y to y+pi_ by pi_/20 do { - Q[n]: project(sum3D(C3D,equator(ang))); n+=1 } + Q[n]: Project(sum3D(C3D,equator(ang))); n+=1 } fitcurve(Q,n-1,dashed) line dashed from C to P # beta - line dashed from C to project(sum3D(C3D,equator(phi))) + line dashed from C to Project(sum3D(C3D,equator(phi))) arc ccw -> from 0.6 along_(last line) to 0.6 between C and P "$\beta$" above -- cgit v1.2.3