summaryrefslogtreecommitdiff
path: root/graphics/circuit_macros/examples/svg/shapesSVG.m4
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/circuit_macros/examples/svg/shapesSVG.m4')
-rw-r--r--graphics/circuit_macros/examples/svg/shapesSVG.m424
1 files changed, 12 insertions, 12 deletions
diff --git a/graphics/circuit_macros/examples/svg/shapesSVG.m4 b/graphics/circuit_macros/examples/svg/shapesSVG.m4
index 08962e9f85..b0b66fa0bb 100644
--- a/graphics/circuit_macros/examples/svg/shapesSVG.m4
+++ b/graphics/circuit_macros/examples/svg/shapesSVG.m4
@@ -1,5 +1,5 @@
.PS
-# shapes.m4
+# shapesSVG.m4
threeD_init
divert(-1)
@@ -18,14 +18,14 @@ define(`cylinder3D',`[ Start: (0,0)
define(`M4CL',`xdispl,ydispl,zdispl')dnl
lenc = length3D(M4CL)
cs = dot3D(View3D,M4CL)/lenc
- End: (project(M4CL))
+ End: Project(M4CL)
az = atan2(ydispl,xdispl)
ae = atan2(zdispl,sqrt(xdispl^2+ydispl^2))
CL: line invis from Start to End; C: CL.c
nls = int(twopi_*radc/lthick)
define(`M4PP',`rot3Dz(az,rot3Dy(-ae,rot3Dx(-i/nls*twopi_,0,0,radc)))')dnl
for i=0 to nls-1 do { if dot3D(View3D,M4PP) > 0 then {
- P: (project(M4PP))
+ P: Project(M4PP)
ql = sqrta(dot3D(Light3D,M4PP)/radc)
line from P to End+P outlined rgbstring(ql,ql,ql) `$5' } }
Perp: (vperp(CL,radc))
@@ -48,7 +48,7 @@ define(`cone3D',`[ Start: (0,0)
define(`M4CL',`xdispl,ydispl,zdispl')dnl
lenc = length3D(M4CL)
diamc = ifelse(`$4',,(lenc/2),`$4') ; radc = diamc/2
- End: (project(M4CL))
+ End: Project(M4CL)
cs = dot3D(View3D,M4CL)/lenc
az = atan2(ydispl,xdispl)
ae = atan2(zdispl,sqrt(xdispl^2+ydispl^2))
@@ -60,7 +60,7 @@ define(`cone3D',`[ Start: (0,0)
rot3Dz(az,rot3Dy(-ae,rot3Dx(-i/nls*twopi_,radc,0,lenc)))) > 0 then {
ql = sqrta(dot3D(Light3D,
rot3Dz(az,rot3Dy(-ae,rot3Dx(-i/nls*twopi_,radc,0,lenc))))/lt)
- P: (project(rot3Dz(az,rot3Dy(-ae,rot3Dx(-i/nls*twopi_,0,0,radc)))))
+ P: Project(rot3Dz(az,rot3Dy(-ae,rot3Dx(-i/nls*twopi_,0,0,radc))))
line from P to End outlined rgbstring(ql,ql,ql) `$5'
if !b then { WB: P; b = 1 }
} else { if b then { BW: P; b = 0 } } }
@@ -116,7 +116,7 @@ define(`prism3D',`[ Start: (0,0)
widp = ifelse(`$4',,(linewid/5),`$4')
htp = ifelse(`$5',,(linewid/10),`$5')
rotp = ifelse(`$6',,0,`$6')
- End: (project(xdispl,ydispl,zdispl)); C: 0.5 between Start and End
+ End: Project(xdispl,ydispl,zdispl); C: 0.5 between Start and End
lenp = length3D(xdispl,ydispl,zdispl)
az = atan2(ydispl,xdispl); ae = atan2(zdispl,sqrt(xdispl^2+ydispl^2))
wp2 = widp/2; hp2 = htp/2
@@ -143,10 +143,10 @@ define(`PFacet',`cross3D(diff3D(`$2'x,`$2'y,`$2'z,`$1'x,`$1'y,`$1'z),
diff3D(`$3'x,`$3'y,`$3'z,`$2'x,`$2'y,`$2'z))')
if dot3D(View3D,PFacet) > 0 then {
fFacet = sqrta(dot3D(Light3D,PFacet)/length3D(PFacet))
- P1: (project(`$1'x,`$1'y,`$1'z))
- P2: (project(`$2'x,`$2'y,`$2'z))
- P3: (project(`$3'x,`$3'y,`$3'z))
- P4: (project(`$4'x,`$4'y,`$4'z))
+ P1: Project(`$1'x,`$1'y,`$1'z)
+ P2: Project(`$2'x,`$2'y,`$2'z)
+ P3: Project(`$3'x,`$3'y,`$3'z)
+ P4: Project(`$4'x,`$4'y,`$4'z)
line fill_(fFacet) invis from P1 to P2 then to P3 then to P4 then to P1
line from P1 to P2; round
line to P3; round
@@ -165,7 +165,7 @@ setview(azimuth,elev)
Arrow3D(0,1,0) with .Start at Orig; "y" ljust at last [].End
Arrow3D(0,0,1.2) with .Start at Orig; "z" above at last [].End
setlight(0,0,0)
- cylinder3D(1,1,1,0.6) with .Start at (project(0.5,0.5,0.5))
+ cylinder3D(1,1,1,0.6) with .Start at Project(0.5,0.5,0.5)
]
Ball: shadedball(0.5) with .nw at last [].ne+(-0.25,0)
[
@@ -175,7 +175,7 @@ setview(azimuth,elev)
for i=0 to n do {
r = i/n*(thmax-thmin)+thmin
prism3D(rot3Dz(r,rot3Dy(pi_/4,len,0,0)),0.2,0.1) \
- with .Start at (project(rot3Dz(r,rot3Dy(pi_/4,len*0.5,0,0)))) }
+ with .Start at Project(rot3Dz(r,rot3Dy(pi_/4,len*0.5,0,0))) }
] with .nw at last [].ne
[
setlight(0,0)