aboutsummaryrefslogtreecommitdiff
path: root/pkg/proto/vol/src/vmatrix.x
diff options
context:
space:
mode:
authorJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
committerJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
commit40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch)
tree4464880c571602d54f6ae114729bf62a89518057 /pkg/proto/vol/src/vmatrix.x
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'pkg/proto/vol/src/vmatrix.x')
-rw-r--r--pkg/proto/vol/src/vmatrix.x31
1 files changed, 31 insertions, 0 deletions
diff --git a/pkg/proto/vol/src/vmatrix.x b/pkg/proto/vol/src/vmatrix.x
new file mode 100644
index 00000000..bfc01d63
--- /dev/null
+++ b/pkg/proto/vol/src/vmatrix.x
@@ -0,0 +1,31 @@
+include <imhdr.h>
+include "pvol.h"
+
+
+# VMATRIX -- Volume rotation, rotation matrix projection algorithm.
+# Proceeds from origin at back of volume image toward front, writing
+# output image lines in successive overlapping sheets. See "Back to
+# Front Display of Voxel-Based Objects", G.Frieder, D.Gordon, R.Reynolds,
+# IEEE Computer Graphics & Applications Jan. 85, p 52-60.
+
+procedure vmatrix (im1, im2, vp)
+pointer im1 # Input volume image
+pointer im2 # Output projection image
+pointer vp # Volume projection descriptor
+
+real v, vx, vy, vz
+real dcosa, dcosb, dcosc
+#real t11,t21,t31, t12,t22,t32, t13,t23,t33
+
+begin
+ vx = VECX(vp)
+ vy = VECY(vp)
+ vz = VECZ(vp)
+ v = sqrt (vx*vx + vy*vy + vz*vz)
+ dcosa = vx / v
+ dcosb = vy / v
+ dcosc = vz / v
+
+ # ???????
+end
+