Jump to content



Photo
- - - - -

Bohr 2D 2 Orbits Simulator [Casio Basic 2]


  • Please log in to reply
1 reply to this topic

#1 frankmar98

frankmar98

    Casio Freak

  • Moderator
  • PipPipPipPip
  • 102 posts
  • Gender:Male
  • Location:Spain
  • Interests:Science, programming

  • Calculators:
    CFX-9970G
    fx-9860G SD
    HP Prime
    TI-84+CE-T TI-83+
    fx-9750GII SH4-A
    CP-300 fx-4800p
    fx-3650pII PB-100
    fx-991SP X fx-991ES plus

Posted 26 June 2016 - 11:30 AM

Here is a graphical simulation in 2D of the Niels Bohr atomic model, basically the electrons moving around the nucleous in its correct position (obiously on scale)

 

DSCN0480.jpg

 

Is programmed in Casio Basic 2, so it will work in a lot of calculators (That use the second version of Casio Basic) like fx: 7400G, 7400GII, 9750G, 9750G Plus, 9750GII, CFX series, 9860G, 9860GII.

 

It is only tested on fx-9750GII without upgrade.

 

It may be useful for didactic pruposes.

20→C
5→R
R*2²→S
PxlOn 32,64
PxlOn 33,64
PxlOn 32,63
PxlOn 33,63
Lbl 1
For C→J To 360 Step C
:For 0→K To 1
R*cos (J+180K)→X
R*sin (J+180K)→Y
Intg X→X
Intg Y→Y
PxlOn 32-Y,64+X
Next
For 0→K To 1
R*cos (J+180K-C)→A
R*sin (J+180K-C)→B
Intg A→A
Intg B→B
PxlOff 32-B,64+A
Next
For 0→K To 5
S*cos (J+60K)→X
S*sin (J+60K)→Y
Intg X→X
Intg Y→Y
PxlOn 32-Y,64+X
Next
For 0→K To 5
S*cos (J+60K-C)→A
S*sin (J+60K-C)→B
Intg A→A
Intg B→B
PxlOff 32-B,64+A
Next
Next
Goto 1

Edit reason: put image


Edited by frankmar98, 26 June 2016 - 03:30 PM.

  • Viliami likes this

#2 frankmar98

frankmar98

    Casio Freak

  • Moderator
  • PipPipPipPip
  • 102 posts
  • Gender:Male
  • Location:Spain
  • Interests:Science, programming

  • Calculators:
    CFX-9970G
    fx-9860G SD
    HP Prime
    TI-84+CE-T TI-83+
    fx-9750GII SH4-A
    CP-300 fx-4800p
    fx-3650pII PB-100
    fx-991SP X fx-991ES plus

Posted 03 July 2016 - 06:15 PM

I've done an optimized version. I've used lists, and it is necessary to have 1490 bytes of RAM available temporally, to store the electron position (18 positions) in 2 laps. All electrons in one orbits use the same list.

 

Video on classic fx-9750G

 

 

Now, due to the optimization is possible to run it on old powerless calculators. You have to dim the list 1, 2, 3, and 4 (at List APP, disappeared in the new generation), with at least 37 spaces each one

 

Version for old calculators (fx-9750G and CFX series):

Cls
20→C
6→R
R*2²→S
PxlOn 32,64
PxlOn 33,64
PxlOn 32,63
PxlOn 33,63

For C→J To 720 Step C: J/C+1→I
R*cos J→List 1[I]
R*sin J→List 2[I]
Intg List 1[I]→List 1[I]
Intg List 2[I]→List 2[I]
List 1[I]+64→List 1[I]
32-List 2[I]→List 2[I]
Next

For C→J To 720 Step C: J/C+1→I
S*cos J→List 3[I]
S*sin J→List 4[I]
Intg List 3[I]→List 3[I]
Intg List 4[I]→List 4[I]
List 3[I]+64→List 3[I]
32-List 4[I]→List 4[I]
Next

Lbl 1
For C→J To 360 Step C
: For 0→K To 1
J/C+9K+1→I
I-1→L
PxlOn List 2[I], List 1[I]
PxlOff List 2[L], List 1[L]
Next
For 0→K To 5
J/C+3K+1→I
I-1→L
PxlOn List 4[I], List 3[I]
PxlOff List 4[L], List 3[L]
Next
Next
Goto 1

Edited by frankmar98, 03 July 2016 - 06:40 PM.

  • Viliami likes this




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users