The Museum of HP Calculators


Ray Tracing (Spheres, Paraboloids, Flats) for the HP-41C/CV/CX

This program is Copyright © HP and is used here by permission. It was originally printed in the HP-67 Optics Solution Book. This program was entered and uploaded by Tony Duell.

This program is supplied without representation or warranty of any kind. Tony Duell, Hewlett Packard and The Museum of HP Calculators therefore assume no responsibility and shall have no liability, consequential or otherwise, of any kind arising from the use of this program material or any part thereof.

Documentation Information (CD or source code)
How to get this Program to your Calculator (via HP-IL, disk, wand, and fingers)
Download Binary (.raw) program for disk or PC HP-IL Card download
Download Hexadecimal (.dat) program for Serial Port download

Program Listing

LINE  KEYS
 01 LBL "RAYSPF"
 02 LBL 15
 03 LBL a
 04 SF 00
 05 CF 01
 06 GTO 03
 07 LBL 11
 08 LBL B
 09 CF 00
 10 SF 01
 11 GTO 03
 12 LBL 10
 13 LBL A
 14 CF 01
 15 CF 00
 16 LBL 03
 17 STO 06
 18 RDN
 19 STO 05
 20 STOP
 21 LBL 16
 22 LBL b
 23 SF 02
 24 STOP
 25 LBL 12
 26 LBL C
 27 STO 00
 28 STOP
 29 LBL 19
 30 LBL e
 31 X<>Y
 32 TAN
 33 X<>Y
 34 LBL 14
 35 LBL E
 36 X<>Y
 37 STO 01
 38 X<>Y
 39 FS? 00
 40 GTO 02
 41 FS? 01
 42 GTO 02
 43 STO 04
 44 X^2
 45 RCL 05
 46 X^2
 47 X<>Y
 48 XEQ 09
 49 CHS
 50 RCL 05
 51 +
 52 RCL 06
 53 +
 54 GTO 04
 55 LBL 18
 56 LBL d
 57 RDN
 58 X<>Y
 59 TAN
 60 *
 61 LASTX
 62 X<>Y
 63 R^
 64 X<>Y
 65 -
 66 LBL 13
 67 LBL D
 68 X<>Y
 69 X#0?
 70 GTO 05
 71 X<>Y
 72 GTO 14
 73 LBL 05
 74 STO 01
 75 X<>Y
 76 STO 02
 77 FS? 00
 78 GTO 00
 79 FS? 01
 80 GTO 01
 81 *
 82 RCL 05
 83 RCL 06
 84 +
 85 STO 09
 86 X<>Y
 87 -
 88 RCL 01
 89 X^2
 90 1
 91 +
 92 STO 08
 93 /
 94 RCL 09
 95 RCL 05
 96 +
 97 RCL 06
 98 *
 99 RCL 02
100 X^2
101 +
102 RCL 08
103 /
104 X<>Y
105 ENTER
106 ENTER
107 *
108 R^
109 XEQ 09
110 -
111 LBL 04
112 ENTER
113 STO 03
114 RCL 01
115 *
116 RCL 02
117 +
118 STO 04
119 X<>Y
120 FS?C 02
121 STOP
122 LBL 17
123 LBL c
124 RCL 01
125 ATAN
126 FS? 00
127 GTO 07
128 FS? 01
129 GTO 07
130 RCL 04
131 RCL 05
132 /
133 ASIN
134 GTO 06
135 LBL 07
136 RCL 05
137 FS? 00
138 XEQ 08
139 ATAN
140 LBL 06
141 STO 08
142 +
143 SIN
144 RCL 00
145 /
146 ASIN
147 RCL 08
148 -
149 TAN
150 ENTER
151 STO 20
152 RCL 03
153 *
154 RCL 04
155 X<>Y
156 -
157 STO 21
158 STOP
159 LBL 00
160 RCL 01
161 1/X
162 STO 08
163 X^2
164 RCL 02
165 RCL 01
166 /
167 RCL 06
168 +
169 RCL 05
170 *
171 4
172 *
173 -
174 SQRT
175 RCL 01
176 ABS
177 LASTX
178 /
179 CHS
180 *
181 RCL 08
182 +
183 RCL 05
184 /
185 2
186 /
187 GTO 02
188 LBL 01
189 RCL 02
190 RCL 01
191 RCL 06
192 *
193 +
194 1
195 RCL 01
196 RCL 05
197 *
198 -
199 /
200 ENTER
201 LBL 02
202 STO 04
203 RCL 04
204 FS? 00
205 X^2
206 RCL 05
207 *
208 RCL 06
209 +
210 STO 03
211 FS?C 02
212 STOP
213 GTO 17
214 LBL 08
215 RCL 04
216 *
217 2
218 *
219 RTN
220 LBL 09
221 -
222 SQRT
223 RCL 05
224 ABS
225 LASTX
226 /
227 *
228 RTN
229 STOP
230 END

Go back to the HP-41 software library
Go back to the general software library
Go back to the main exhibit hall