home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dimension 64 5
/
Dimension_64_Nr.05_19xx_-_de_Side_A.d64
/
molekuel
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2023-02-26
|
2KB
|
73 lines
5 print"bitte einen moment"
10 dim x(30),y(30),z(30),b(30,3),a$(30)
15 dim s(359),c(359)
20 a=6:x=159:y=99:z=0:wi=10:ve=20
25 fp=-500
30 for t=1 to a
35 read a$(t)
40 read x(t),y(t),z(t)
50 for i=0 to 3
60 read b:if b<0 then 90
70 b(t,i)=b
80 next i
90 next t
100 b=(NULL)/180:for t=0 to 359
110 s(t)=sin(t*b)
120 c(t)=cos(t*b)
130 next t
140 (NULL):(NULL)
150 rem *** gron:cls ***
190 (NULL) 1:gosub 1000
195 rem *** mode 1 ***
200 get a$:if a$="" then 200
210 (NULL) 0:gosub 1000
215 rem *** mode 0 ***
220 if a$="x" then w=wi:gosub 700:goto 400
230 if a$="[216]" then w=360-wi:gosub 700:goto 400
240 if a$="y" then w=wi:gosub 800:goto 400
250 if a$="[217]" then w=360-wi:gosub 800:goto 400
260 if a$="z" then w=wi:gosub 900:goto 400
270 if a$="[218]" then w=360-wi:gosub 900:goto 400
280 if a$="u" then y=y-ve:goto 400
290 if a$="m" then y=y+ve:goto 400
300 if a$="k" then x=x+ve:goto 400
310 if a$="h" then x=x-ve:goto 400
320 if a$="i" and z-100>fp then z=z-ve:goto 400
330 if a$="," then z=z+ve
400 (NULL) 1:gosub 1000:goto 200
405 rem *** mode 1 ***
700 for t=1 to a
710 e=-s(w)*z(t)+c(w)*y(t)
720 f=c(w)*z(t)+s(w)*y(t)
730 y(t)=e:z(t)=f
740 next t:return
800 for t=1 to a
810 d=c(w)*x(t)+s(w)*z(t)
820 f=-s(w)*x(t)+c(w)*z(t)
830 x(t)=d:z(t)=f
840 next t:return
900 for t=1 to a
910 d=c(w)*x(t)-s(w)*y(t)
920 e=s(w)*x(t)+c(w)*y(t)
930 x(t)=d:y(t)=e
940 next t:return
1000 for t=1 to a
1004 x1=x+x(t)*(1-(z+z(t))/fp)
1007 y1=y-y(t)*(1-(z+z(t))/fp)
1010 for i=0 to 3
1020 b=b(t,i)
1030 if b=0 then 1090
1080 (NULL) x1,y1,x+x(b)*(1-(z+z(b))/fp),y-y(b)*(1-(z+z(b))/fp)
1085 rem *** line ***
1090 next i
1100 (NULL) x1-3,y1-3,a$(t)
1105 rem *** text ***
1110 next t
1120 return
5000 data o,0,0,0,-1
5010 data c,-50,0,0,1,3,4,5
5020 data h,-71.665,47.15,0,-1
5030 data h,-71.665,-23.55,40.85,-1
5040 data h,-71.665,-23.55,-40.85,-1
5050 data h,14.7,-47.8,0,1,-1