summaryrefslogtreecommitdiff
path: root/graphics/circuit_macros/examples/graysurf.m4
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/circuit_macros/examples/graysurf.m4')
-rw-r--r--graphics/circuit_macros/examples/graysurf.m458
1 files changed, 29 insertions, 29 deletions
diff --git a/graphics/circuit_macros/examples/graysurf.m4 b/graphics/circuit_macros/examples/graysurf.m4
index 22372697b2..9be043b849 100644
--- a/graphics/circuit_macros/examples/graysurf.m4
+++ b/graphics/circuit_macros/examples/graysurf.m4
@@ -25,9 +25,9 @@ Surface:[
Orig: (0,0)
linethick_(1.2)
- arrow from Orig to 1.2 <Orig,(project(xmax,0,0))> ; "$x$" below
- arrow from Orig to 1.2 <Orig,(project(0,ymax,0))> ; "$y$" ljust
- arrow from Orig to 1.2 <Orig,(project(0,0,zmax))> ; "$z$" rjust
+ arrow from Orig to 1.2 <Orig,(Project(xmax,0,0))> ; "$x$" below
+ arrow from Orig to 1.2 <Orig,(Project(0,ymax,0))> ; "$y$" ljust
+ arrow from Orig to 1.2 <Orig,(Project(0,0,zmax))> ; "$z$" rjust
linethick_(0)
for i = 0 to nx-1 do {
@@ -36,10 +36,10 @@ Surface:[
y = ymax*j/ny
fnxy = fn(x,y)
shade((fnmax+fnxy)/fnmax/2,
- line from (project(x,y,fnxy)) to (project(x,(y+dy),`fn(x,(y+dy))'))\
- then to (project((x+dx),(y+dy),`fn((x+dx),(y+dy))'))\
- then to (project((x+dx),y,`fn((x+dx),y)'))\
- then to (project(x,y,fnxy))
+ line from (Project(x,y,fnxy)) to (Project(x,(y+dy),`fn(x,(y+dy))'))\
+ then to (Project((x+dx),(y+dy),`fn((x+dx),(y+dy))'))\
+ then to (Project((x+dx),y,`fn((x+dx),y)'))\
+ then to (Project(x,y,fnxy))
) } }
] #with .w at last [].e+(-0.2,0)
@@ -63,8 +63,8 @@ define(`tvisible',
`dot3D(View3D, rot3Dz((`$1')*dtor_,rot3Dy((`$2')*dtor_,1,0,0)))')
Orig: (0,0)
-X: arrow from Orig to (project(tradius+sradius*4,0,0)); "x" rjust
-Y: arrow from Orig to (project(0,tradius+sradius*2,0)); "y" ljust
+X: arrow from Orig to (Project(tradius+sradius*4,0,0)); "x" rjust
+Y: arrow from Orig to (Project(0,tradius+sradius*2,0)); "y" ljust
dt = 10 # major angle degrees per facet
ds = 10 # minor angle degrees per facet
@@ -87,10 +87,10 @@ Y: arrow from Orig to (project(0,tradius+sradius*2,0)); "y" ljust
thinlines_
for i = 1 to n do {
tc = t[ix[i]]; sc = s[ix[i]]
- SE: (project(torus(tc+dt/2,sc-ds/2)))
- SW: (project(torus(tc-dt/2,sc-ds/2)))
- NW: (project(torus(tc-dt/2,sc+ds/2)))
- NE: (project(torus(tc+dt/2,sc+ds/2)))
+ SE: (Project(torus(tc+dt/2,sc-ds/2)))
+ SW: (Project(torus(tc-dt/2,sc-ds/2)))
+ NW: (Project(torus(tc-dt/2,sc+ds/2)))
+ NE: (Project(torus(tc+dt/2,sc+ds/2)))
f = ((dcosine3D(3,torus(tc,sc))/sradius+1)/2)^2
g = min(f,0.9)
setrgb(g,g,g)
@@ -102,10 +102,10 @@ thinlines_
}
thicklines_
- arrow from Orig to (project(0,0,tradius*1.4)); "z" above
- dashline(from Orig to (project(torus(0,0))),,,,G)
+ arrow from Orig to (Project(0,0,tradius*1.4)); "z" above
+ dashline(from Orig to (Project(torus(0,0))),,,,G)
arrow to X.end
- dashline(from Orig to (project(torus(90,0))),,,,G)
+ dashline(from Orig to (Project(torus(90,0))),,,,G)
arrow to Y.end
] with .sw at last [].se+(0.2,0)
@@ -130,11 +130,11 @@ Hat: [
dy = 0.05
Orig: (0,0)
-X: arrow from Orig to (project(maxy*1.2,0,0)); "x" rjust
-Y: arrow from Orig to (project(0,maxy*1.2,0)); "y" ljust
-Xv: (project(1,0,0))
-Yv: (project(0,1,0))
-Zv: (project(0,0,1))
+X: arrow from Orig to (Project(maxy*1.2,0,0)); "x" rjust
+Y: arrow from Orig to (Project(0,maxy*1.2,0)); "y" ljust
+Xv: (Project(1,0,0))
+Yv: (Project(0,1,0))
+Zv: (Project(0,0,1))
# create the arrays and sort
n = 0
for t = dang/2 to 360.1 by dang do {
@@ -150,14 +150,14 @@ Zv: (project(0,0,1))
dpquicksort(d,1,n,ix)
# draw the facets
ellipse wid maxy*2 ht maxy*2*sind(elevation) \
- with .c at (project(0,0,(maxy^2-1)^2)+linethick bp__/2)
+ with .c at (Project(0,0,(maxy^2-1)^2)+(0,linethick bp__/2))
thinlines_
for i = 1 to n do {
tc = t[ix[i]]; yc = y[ix[i]]
- SE: (project(hat(tc+dang/2,yc-dy/2)))
- SW: (project(hat(tc-dang/2,yc-dy/2)))
- NW: (project(hat(tc-dang/2,yc+dy/2)))
- NE: (project(hat(tc+dang/2,yc+dy/2)))
+ SE: (Project(hat(tc+dang/2,yc-dy/2)))
+ SW: (Project(hat(tc-dang/2,yc-dy/2)))
+ NW: (Project(hat(tc-dang/2,yc+dy/2)))
+ NE: (Project(hat(tc+dang/2,yc+dy/2)))
f = abs(yc^2-1)
line invis fill f from SE to SW then to NW then to NE then to SE
}
@@ -168,21 +168,21 @@ nr = -1
for i=1 to mm do { y = i/(mm+3)
findroot(edge,(azimuth+2),(azimuth+180-2),1e-8,t)
nr +=1
- R[mm+nr]: (project(hat(t,y)))
+ R[mm+nr]: (Project(hat(t,y)))
R[mm-1-nr]: (-R[mm+nr].x,R[mm+nr].y)
}
fitcurve(R,mm*2-1)
# Z axis
thicklines_
-Z: arrow from Zv to (project(0,0,1.2)); "z" ljust
+Z: arrow from Zv to (Project(0,0,1.2)); "z" ljust
line dashed from Orig to Zv chop 0 chop dashwid/2
line dashed from Orig to Xv
line dashed from Orig to Yv
# Partial rim
ellipsearc(maxy*2,maxy*2*sind(elevation),-pi_*1.4,pi_/3) \
- with .C at (project(0,0,(maxy^2-1)^2)+linethick bp__/2)
+ with .C at (Project(0,0,(maxy^2-1)^2)+(0,linethick bp__/2))
] scaled 1.25 with .s at 1st [].ne+(0,-0.75)
] scaled 0.85