# What You Watching ATM?

1 Like
1 Like
1 Like
1 Like

Scam…no acceleration

one of most precise algorithm to simulate magnetic attraction is:
(not english)

function magnetic_vector(vector,half as boolean)
dist_norm as float
dist_norm=length vector3(vector)

`````` //calcul de la norme force
force_norm as float
force_norm=exp(-dist_norm/k_distance)*k_force

ratio as float
ratio=force_norm/dist_norm

scale vector3 vector,vector,ratio
if half=1
scale vector3 vector,vector,0.5
endif
``````

endfunction

Vpe:vecteur position aimant escalve
Vpm:vecteur position aimant2 maitre

Vd:vecteur distance séparant les 2 aimants

Nd:norme du vecteur distance
Nf:norme de la force magnétique

k:ratio Nf/Nd

Vf:vecteur de la force magnétique

Fmax:force d’attraction quand Vd=0
Rm:Rayon du champs magnétique

m: m=1 si pôles différents;m=-1 si pôles identique

EXTRA BONUS:
In a prime number search algorithm,no need to continue the search after the half of the number you want to determine that’s a a prime number