NTNUJAVA Virtual Physics Laboratory
Enjoy the fun of physics with simulations!
Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/

Easy Java Simulations (2001- ) => Questions related to EJS => Topic started by: lookang on April 16, 2010, 04:24:38 pm



Title: how do make the magnet turn orientation to NS from current SN?
Post by: lookang on April 16, 2010, 04:24:38 pm
Hi Prof,

how do make the magnet turn orientation to NS from current SN?

I was tinkering the codes here.

I was looking for a way to understand the codes i was unsuccessful to isolate the codes responsible for the magnetic dipoles bearing currently it is SN ( left to right)

If i can locate the codes, i can proceed to make the changes!

thx!


Title: Re: how do make the magnet turn orientation to NS from current SN?
Post by: lookang on April 16, 2010, 09:24:47 pm
not to worry!
got it
Code:
      xField[i][j] = -b[0];
      yField[i][j] = -b[1];
instead of
Code:
      xField[i][j] = b[0];
      yField[i][j] = b[1];

finally by trial and error. LOL :)