DB Universe Arithmeticam


This software is published under the GNU General Public License v3.0.




      
Internal movement of a quark.
The theory of the dimensional basic is represented by computer algorithms which are mathematical algebra. Two Borland C programs have been written.

The program 'Newton' is a n-body model where simultaneously for the positions of multiple dimensional basics (theoretical infinite curvature) moving through space time interact with each other according to newtonian laws. The program 'Einstein' photographs (plots) a piece of einsteinian space time where individual and multiple dimensional basics can be seen, showing the deformation of space time as seen for an outside observer.


Download code (TXT):
dbmove.bas newton.cpp einstein.cpp


Show code:
Program Newton Program Einstein

Quick Basic db movement analysis output




0KEY(1) ON: ON KEY(1) GOSUB afrondschoonscherm
1KEY(2) ON: ON KEY(2) GOSUB andermode
2KEY(3) ON: ON KEY(3) GOSUB nieuwecoordinaten
3KEY(4) ON: ON KEY(4) GOSUB windowgrootte
4KEY(5) ON: ON KEY(5) GOSUB sterktezwaartekracht
5KEY(6) ON: ON KEY(6) GOSUB nieuwaantaldeeltjes
6KEY(7) ON: ON KEY(7) GOSUB lijnmetwis
7KEY(8) ON: ON KEY(8) GOSUB lijnzonderwis
8KEY(9) ON: ON KEY(9) GOSUB willekeuroud
9KEY(10) ON: ON KEY(10) GOSUB willekeurnieuw
10
11
12DIM x(100, 103), y(100, 103), z(100, 103), xfz(100), yfz(100), zfz(100)
13DIM x2d(200), y2d(200)
14
15SCREEN 12, 0: CLS
16xyz = 100
17mfz = .1
18aantal = 3
19scherm = 1
20begincord = 1
21lijn = 0
22willoud = 100
23willnieuw = 1
24wg = 3 * willoud
25afrond = 0
26
27WINDOW (-wg, wg)-(wg, -wg)
28
29prog = 1
30
31WHILE prog > 0
32
33CLS
34
35FOR tel = 0 TO aantal - 1
36 x(tel, 0) = (RND(1) * 2 * willoud) - willoud: x(tel, 1) = x(tel, 0) + (RND(1) * 2 * willnieuw) - willnieuw
37 y(tel, 0) = (RND(1) * 2 * willoud) - willoud: y(tel, 1) = y(tel, 0) + (RND(1) * 2 * willnieuw) - willnieuw
38 z(tel, 0) = (RND(1) * 2 * willoud) - willoud: z(tel, 1) = z(tel, 0) + (RND(1) * 2 * willnieuw) - willnieuw
39NEXT tel
40
41IF begincord = 1 THEN GOSUB bcord
42
43GOSUB status
44
45prog = 2
46
47WHILE prog > 1
48
49FOR tel1 = 0 TO aantal - 1
50 x(tel1, 2) = x(tel1, 1) - x(tel1, 0)
51 y(tel1, 2) = y(tel1, 1) - y(tel1, 0)
52 z(tel1, 2) = z(tel1, 1) - z(tel1, 0)
53 FOR tel2 = tel1 TO aantal - 1
54 x(tel1, 3 + tel1) = x(tel2, 1) - x(tel1, 1)
55 y(tel1, 3 + tel1) = y(tel2, 1) - y(tel1, 1)
56 z(tel1, 3 + tel1) = z(tel2, 1) - z(tel1, 1)
57 x(tel2, 3 + tel2) = -x(tel1, 3 + tel1)
58 y(tel2, 3 + tel2) = -y(tel1, 3 + tel1)
59 z(tel2, 3 + tel2) = -z(tel1, 3 + tel1)
60 x(tel1, 3 + aantal + tel1) = ABS(x(tel1, 3 + tel1))
61 y(tel1, 3 + aantal + tel1) = ABS(y(tel1, 3 + tel1))
62 z(tel1, 3 + aantal + tel1) = ABS(z(tel1, 3 + tel1))
63 x(tel2, 3 + aantal + tel2) = ABS(x(tel2, 3 + tel2))
64 y(tel2, 3 + aantal + tel2) = ABS(y(tel2, 3 + tel2))
65 z(tel2, 3 + aantal + tel2) = ABS(z(tel2, 3 + tel2))
66 NEXT tel2
67NEXT tel1
68
69FOR tel1 = 0 TO aantal - 1
70 xfz(tel1) = 0
71 yfz(tel1) = 0
72 zfz(tel1) = 0
73 FOR tel2 = 0 TO aantal - 1
74 IF x(tel1, 3 + aantal + tel2) > 0 THEN xfz(tel1) = xfz(tel1) + x(tel1, 3 + tel2) * mfz / x(tel1, 3 + aantal + tel2)
75 IF y(tel1, 3 + aantal + tel2) > 0 THEN yfz(tel1) = yfz(tel1) + y(tel1, 3 + tel2) * mfz / y(tel1, 3 + aantal + tel2)
76 IF z(tel1, 3 + aantal + tel2) > 0 THEN zfz(tel1) = zfz(tel1) + z(tel1, 3 + tel2) * mfz / z(tel1, 3 + aantal + tel2)
77 NEXT tel2
78 x(tel1, 0) = x(tel1, 1)
79 IF afrond = 0 THEN x(tel1, 1) = x(tel1, 0) + x(tel1, 2) + xfz(tel1) ELSE x(tel1, 1) = INT(x(tel1, 0) + x(tel1, 2) + xfz(tel1))
80 y(tel1, 0) = y(tel1, 1)
81 IF afrond = 0 THEN y(tel1, 1) = y(tel1, 0) + y(tel1, 2) + yfz(tel1) ELSE y(tel1, 1) = INT(y(tel1, 0) + y(tel1, 2) + yfz(tel1))
82 z(tel1, 0) = z(tel1, 1)
83 IF afrond = 0 THEN z(tel1, 1) = z(tel1, 0) + z(tel1, 2) + zfz(tel1) ELSE z(tel1, 1) = INT(z(tel1, 0) + z(tel1, 2) + zfz(tel1))
84NEXT tel1
85
86midx = 0
87midy = 0
88midz = 0
89
90FOR tel = 0 TO aantal - 1
91midx = midx + x(tel, 1)
92midy = midy + y(tel, 1)
93midz = midz + z(tel, 1)
94NEXT tel
95
96midx = midx / aantal
97midy = midy / aantal
98midz = midz / aantal
99
100
101w2dx = midy - midx * .5
102w2dy = midz - midx * .5
103
104IF lijn = 2 THEN GOSUB wislijn:
105
106FOR tel = 0 TO aantal - 1
107 x2d(tel) = y(tel, 1) - x(tel, 1) * .5
108 y2d(tel) = z(tel, 1) - x(tel, 1) * .5
109NEXT tel
110
111WINDOW (-wg + w2dx, wg + w2dy)-(wg + w2dx, -wg + w2dy)
112
113IF lijn = 0 THEN GOSUB tekenpunt: ELSE GOSUB tekenlijn:
114
115WEND
116WEND
117
118andermode:
119scherm = scherm + 1
120IF scherm > 2 THEN scherm = 0
121IF scherm = 0 THEN SCREEN 9, 0: WIDTH 80, 43: COLOR 1, 10
122IF scherm = 1 THEN SCREEN 12: WIDTH 80, 60
123IF scherm = 2 THEN SCREEN 13
124GOSUB status
125RETURN
126
127afrondschoonscherm:
128IF afrond = 0 THEN afrond = 1 ELSE afrond = 0
129GOSUB status
130RETURN
131
132nieuwecoordinaten:
133prog = 1
134CLS
135RETURN
136
137sterktezwaartekracht:
138PRINT "Mate van zwaartekracht is:"; mfz
139INPUT "Nieuwe mate:", mfz
140GOSUB status
141RETURN
142
143nieuwaantaldeeltjes:
144PRINT "Aantal deeltjes is:"; aantal
145INPUT "Nieuw aantal:", aantal
146IF aantal < 1 THEN aantal = 1
147IF aantal > 50 THEN aantal = 50
148CLS
149prog = 1
150RETURN
151
152windowgrootte:
153PRINT "Windowgrootte is:"; wg
154INPUT "Nieuwe grootte:", wg
155IF wg < 10 THEN wg = 10
156IF wg > 500 THEN wg = 500
157GOSUB status:
158RETURN
159
160willekeuroud:
161PRINT "Randomize oude cordinaat is:"; willoud
162INPUT "Nieuwe randomize factor:"; willoud
163IF willoud < 1 THEN willoud = 1
164IF willoud > 10000 THEN willoud = 10000
165wg = 3 * willoud
166CLS
167prog = 1
168RETURN
169
170willekeurnieuw:
171PRINT "Randomize nieuwe cordinaat is:"; willnieuw
172INPUT "Nieuwe randomize factor:"; willnieuw
173IF willnieuw < .0000001 THEN willoud = .0000001
174IF willnieuw > 1000 THEN willnieuw = 1000
175CLS
176prog = 1
177RETURN
178
179
180lijnzonderwis:
181IF lijn = 1 THEN lijn = 0 ELSE lijn = 1
182CLS
183IF lijn = 0 THEN GOSUB status:
184RETURN
185
186lijnmetwis:
187IF lijn = 2 THEN lijn = 0 ELSE lijn = 2
188CLS
189IF lijn = 0 THEN GOSUB status:
190RETURN
191
192
193bcord:
194begincord = 0
195x(0, 0) = xyz: x(0, 1) = xyz
196y(0, 0) = 0: y(0, 1) = -.9
197z(0, 0) = 0: z(0, 1) = .9
198x(1, 0) = 0: x(1, 1) = .9
199y(1, 0) = xyz: y(1, 1) = xyz
200z(1, 0) = 0: z(1, 1) = -.9
201x(2, 0) = 0: x(2, 1) = -.9
202y(2, 0) = 0: y(2, 1) = .9
203z(2, 0) = xyz: z(2, 1) = xyz
204
205RETURN
206
207tekenpunt:
208
209FOR tel = 0 TO aantal - 1
210 PSET (x2d(tel), y2d(tel)), 7 + tel
211NEXT tel
212RETURN
213
214tekenlijn:
215FOR tel1 = 0 TO aantal - 1
216 FOR tel2 = tel1 TO aantal - 1
217 LINE (x2d(tel1), y2d(tel1))-(x2d(tel2), y2d(tel2)), 2 + tel1 + tel2
218 NEXT tel2
219NEXT tel1
220RETURN
221
222wislijn:
223CLS
224RETURN
225
226status:
227CLS
228IF scherm = 0 THEN PRINT "EGA (16k)"
229IF scherm = 1 THEN PRINT "VGA (16k)"
230IF scherm < 2 THEN PRINT "Window-grootte :"; wg
231IF scherm < 2 THEN PRINT "Sterkte Fzwaarte:"; mfz
232IF scherm < 2 THEN PRINT "Aantal 1db's :"; aantal
233IF scherm < 2 THEN PRINT "r_oud :"; willoud
234IF scherm < 2 THEN PRINT "r_nieuw :"; willnieuw
235IF scherm < 2 THEN PRINT "Afronding c_oud :"; afrond
236RETURN
237
238