Mintoris Forum

Author Topic: inverse square force field  (Read 7261 times)

jclemens

  • Sr. Member
  • ****
  • Posts: 146
inverse square force field
« on: Apr 21, 2012, 03:22 PM »
Here is a little program I wrote to learn mintoris basic. It starts with a yellow sun in the center of a blue graphics screen. If you touch the screen, a red planet will appear at that location.  If you touch the screen again, the initial direction and velocity will be set (the velocity will come from the distance between the 2 points). Your planet will start to move and depending on the initial conditions, might follow an elliptical orbit, or a hyperbola, or a parabola, or go into the sun. If the ball moves from the visible screen and is following an elliptical orbit, it will come back eventually, but remember a comet might take 75 years. If you hit the screen a 3rd time the program will stop and and let you decide whether to stop or restart. You will need gravity.bas and in the audio directory crash.mp3
« Last Edit: Apr 22, 2012, 06:52 AM by Chuck »

harold

  • Sr. Member
  • ****
  • Posts: 807
  • My Favorite Material Posession
    • MyElectronicArt
Re: inverse square force field
« Reply #1 on: Apr 21, 2012, 04:52 PM »
Hello jclemens, looks like fun, but it wouldn't run the audio file for me, Harold.

harold

  • Sr. Member
  • ****
  • Posts: 807
  • My Favorite Material Posession
    • MyElectronicArt
Re: inverse square force field
« Reply #2 on: Apr 21, 2012, 05:22 PM »
I changed the file name, now I'll play with it, Harold.

harold

  • Sr. Member
  • ****
  • Posts: 807
  • My Favorite Material Posession
    • MyElectronicArt
Re: inverse square force field
« Reply #3 on: Apr 21, 2012, 05:29 PM »
Neat, I'll have fun with this, Harold.

harold

  • Sr. Member
  • ****
  • Posts: 807
  • My Favorite Material Posession
    • MyElectronicArt
Re: inverse square force field
« Reply #4 on: Apr 21, 2012, 05:57 PM »
I'm going to see if I can put a start grid on the screen so I can repeat my entries, Harold.

Chuck

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1899
Re: inverse square force field
« Reply #5 on: Apr 21, 2012, 10:14 PM »
Very cool program.  We have to get the files posted with the right names to help people out.  Nice to be able to play with Basic instead of tinkering under the hood.

-Chuck

jclemens

  • Sr. Member
  • ****
  • Posts: 146
Re: inverse square force field
« Reply #6 on: Apr 22, 2012, 06:26 AM »
Sorry about the file names.

Chuck

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1899
Re: inverse square force field
« Reply #7 on: Apr 22, 2012, 06:53 AM »
I fixed the file names.  Sorry it reset the download count.

-Chuck

harold

  • Sr. Member
  • ****
  • Posts: 807
  • My Favorite Material Posession
    • MyElectronicArt
Re: inverse square force field
« Reply #8 on: Apr 22, 2012, 07:53 AM »
Fun program, I put a grid on screen so I could keep track of my inputs, and I put a Graph on the bottom to tell me when the planet would be back, Harold.

jclemens

  • Sr. Member
  • ****
  • Posts: 146
Re: inverse square force field
« Reply #9 on: Apr 22, 2012, 09:27 AM »
Why don't you post your changes. I would like to try them. Thanks.

harold

  • Sr. Member
  • ****
  • Posts: 807
  • My Favorite Material Posession
    • MyElectronicArt
Re: inverse square force field
« Reply #10 on: Apr 22, 2012, 06:11 PM »
Hello jclemens, I made the additions on my tablet. For the test run, the first touch is at 100,1100 and the second touch is at 100,750. As the planet moves away from the Sun, the lower bar advances, as the planet returns, the upper bar advances. I loaded the program on my phone and it is different, I'm going to look into that, Harold.

harold

  • Sr. Member
  • ****
  • Posts: 807
  • My Favorite Material Posession
    • MyElectronicArt
Re: inverse square force field
« Reply #11 on: Apr 22, 2012, 07:15 PM »
For my phone, I changed 2 lines to max at 800 instead of 1200 and that is gravity2.bas, and the test run is 0,700 - 0,300, Harold.

harold

  • Sr. Member
  • ****
  • Posts: 807
  • My Favorite Material Posession
    • MyElectronicArt
Re: inverse square force field
« Reply #12 on: Apr 23, 2012, 06:35 PM »
I rigged it so that it sounds a tone when the planet begins it's return trip to the Sun, gravity1a for my tablet and gravity2a for my phone, Harold.

harold

  • Sr. Member
  • ****
  • Posts: 807
  • My Favorite Material Posession
    • MyElectronicArt
Re: inverse square force field
« Reply #13 on: Apr 23, 2012, 09:04 PM »
For the Sun, I put in a picture that I took many years ago, Harold.

harold

  • Sr. Member
  • ****
  • Posts: 807
  • My Favorite Material Posession
    • MyElectronicArt
Re: inverse square force field
« Reply #14 on: May 14, 2012, 09:28 PM »
Had to move Sun= to follow Graphics on, worked where it was in the old Mintoris, shortened the 1KHZ file, Harold.

harold

  • Sr. Member
  • ****
  • Posts: 807
  • My Favorite Material Posession
    • MyElectronicArt
Re: inverse square force field
« Reply #15 on: May 14, 2012, 09:32 PM »
Forgot the new shortened 1KHZ file, Harold.

Chuck

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1899
Re: inverse square force field
« Reply #16 on: May 15, 2012, 02:35 AM »
Harold, that was a bug.  Used a value that was only available when the graphics mode was on.  I fixed it, but I don't think it's a big enough deal to release an update.  It'll go out in the next release.

-Chuck

harold

  • Sr. Member
  • ****
  • Posts: 807
  • My Favorite Material Posession
    • MyElectronicArt
Re: inverse square force field
« Reply #17 on: May 15, 2012, 07:11 AM »
Hello Chuck, thanks, it works in the new location, Harold.

harold

  • Sr. Member
  • ****
  • Posts: 807
  • My Favorite Material Posession
    • MyElectronicArt
Re: inverse square force field
« Reply #18 on: Aug 06, 2014, 03:37 AM »
Hello John, found this old program of yours and changed it to act kind of like Rosetta, touch the screen to start it, Harold.

harold

  • Sr. Member
  • ****
  • Posts: 807
  • My Favorite Material Posession
    • MyElectronicArt
Re: inverse square force field
« Reply #19 on: Aug 06, 2014, 03:50 AM »
Hello, the Setscale needs to be unremmed to work on a phone, Harold.