Gravity Simulator http://www.orbitsimulator.com/cgi-bin/yabb/YaBB.pl General >> Discussion >> [Tony] Creating multiple objects? http://www.orbitsimulator.com/cgi-bin/yabb/YaBB.pl?num=1223915832 Message started by Mal on 10/13/08 at 09:37:12

 Title: [Tony] Creating multiple objects? Post by Mal on 10/13/08 at 09:37:12 Two things:1) What do all the options means? We've got "All at Uniform", "All at Gaussian", "All at 0%" and "All at 100%". I presume that "all at uniform" means "spread all your objects in a uniform way between the two extremes that are specified" though in practice this isn't actually true - the objects don't start off evenly distributed as I said in the non-uniform asteroids thread. Tony said there "That's probably normal, depending on how many asteroids you specify.  It's randomly picking them, rather than creating a continuous distribution, so gaps have a probability of occuring.  If you created fewer asteroids, you'd probably have more gaps." But I don't see why this should happen - if you create a belt with 100 objects between 0.0 AU and 1.0 AU, then those objects should be 0.01 AU apart in a uniform distribution and it shouldn't be hard to implement (take the full distance range, divide by the number of bodies, and there's your separation) - so why have this "random picking" that results in gaps at all?Gaussian I guess means a 'bell curve' distribution with most of the asteroids in the middle of the belt and a few on the edges. But what are the other two options? 2) Can we please have a way to specify the width of the belt that isn't done by percentages? i.e. to specify a distance and then say "+X AU" and "-Y AU". It's much easier to specify the range that way. It'd be even easier to specify the belt's "minimum sma" and "maximum sma", so we could say "100 objects between 0.909 and 1.454 AU" without having to calculate where the middle is first.

 Title: Re: [Tony] Creating multiple objects? Post by Tony on 10/13/08 at 11:28:05 Set all to Uniform means you're setting the inputboxes to accept numbers that will generate you a uniform random distribution.  Notice the boxes that say +/-.  They go away when you choose Set all to Gaussian and are replaced by 1 SD (standard deviation).Set all to Gaussian sets the inputboxes to accept a mean and a standard deviation.Set all to 0% makes the +/- input boxes (if you're in uniform mode) and the 1SD boxes (if you're in gaussian mode) read 0.  It has no effect if you're in the Gaussian mode.Set all to 100 % ... sameSo in Uniform mode, if you tell it 10 +-10 %, it will generate random numbers between 9 and 11.In Gaussian mode, if you tell it 10 with a 1SD of 1, most of the random numbers will be 9,10,11, with more extreme values being less frequently chosen (a bell curve).When I get some time to do some coding, I'll add a linear distribution.  This will allow you to specify something like 10,15,1, and have it choose 10,11,12,13,14,15.

Title: Re: [Tony] Creating multiple objects?
Post by Mal on 10/13/08 at 11:35:16

Tony wrote:
 Set all to 0% makes the +/- input boxes (if you're in uniform mode) and the 1SD boxes (if you're in gaussian mode) read 0.  It has no effect if you're in the Gaussian mode.Set all to 100 % ... same

So "set all to 0%" would put all your particles in the same orbit? OK... but then what does "set all to 100%" mean? Would that mean you have your particles divided equally between the two orbits that mark the extremes of your distance range? (I guess that'd be between 0 AU and double the specified orbit?).

Quote:
 So in Uniform mode, if you tell it 10 +-10 %, it will generate random numbers between 9 and 11.

Ah, see there's my problem. "Uniform" isn't uniform at all, it's random within those end parameters (and annoyingly so too. It seems like in every run I do, the gaps are right where some of the resonances should be!).

Quote:
 When I get some time to do some coding, I'll add a linear distribution.  This will allow you to specify something like 10,15,1, and have it choose 10,11,12,13,14,15.

That would definitely be my idea of "uniform distribution"!

 Title: Re: [Tony] Creating multiple objects? Post by Mal on 10/13/08 at 12:44:03 One other oddity... in the Output Data file, the asteroids seem to be arranged randomly (i.e. the first asteroid shown isn't necessarily the closest asteroid to the sun, and the second asteroid isn't the one actually in the next orbit out). Would there be any way to list the asteroids in the output data file in the order that they are located from the sun?

 Title: Re: [Tony] Creating multiple objects? Post by Tony on 10/13/08 at 14:43:20 They are output in the order they appear in the dropdown lists.  Since they're being randomly created, this shuffles their order.  If I make the "linear" mode, that should fix this.

Title: Re: [Tony] Creating multiple objects?
Post by Tony on 10/13/08 at 20:20:54

Mal wrote:
 ... Can we please have a way to specify the width of the belt that isn't done by percentages? i.e. to specify a distance and then say "+X AU" and "-Y AU". It's much easier to specify the range that way. It'd be even easier to specify the belt's "minimum sma" and "maximum sma", so we could say "100 objects between 0.909 and 1.454 AU" without having to calculate where the middle is first.

http://orbitsimulator.com/gravity/beta/GravitySimulatorBeta2008october13.exe
This version includes a linear distribution for creating objects.

What was called "Uniform" was changed to "Random".  There are now 3 modes:
Random
Random Gaussian
Linear

To use Linear, enter a range, min,max seperated by a comma.  For example, to create objects between 1 and 5 sma, enter 1,5
I spent 2 hours programming this, and 20 minutes testing it, so there probably will be bugs.
I don't police the input yet, so you can probably crash the program if you forget the comma.

Also, you may now choose different distributions for different properties, instead of having to use the same distribution for everything.  Let me know how it works.

 Title: Re: [Tony] Creating multiple objects? Post by Mal on 10/13/08 at 21:25:57 Hooray, thanks! I'll try it out in the next few days :)