To all SSC Station occupants
Thank you for the donations over the past year (2024), it is much appreciated. I am still trying to figure out how to migrate the forums to another community software (probably phpbb) but in the meantime I have updated the forum software to the latest version. SSC has been around a while so their is some very long time members here still using the site, thanks for making SSC home and sorry I haven't been as vocal as I should be in the forums I will try to improve my posting frequency.
Thank you again to all of the members that do take the time to donate a little, it helps keep this station functioning on the outer reaches of space.
-D1-
Can someone explain to me what these line is doing?
I see a distance calculation, that is then mul'd by 10 and the result has 9 added, before we find the square root... so that looks a bit like a distance calculation with some kind of scaling???
Then we divide by fixed(3,1) which appears to be another arbitrary huge value in integer terms but the divide might not be doing a straight integer div, in fact I think it's doing it in fixed terms.
Some more of Brianetta's fearfully crazy math, maybe? 😆
Hey,
It looks to be: 3 / sqrt(9+10 *(x^2+y^2+z^2))
so for sector 1,1,1:
3/ (isqrt(9+10*(1+1+1)) = 3/isqrt(39) = 3/6 = fixed(1,2) or 0.5
So... that gives a number from 1.0 down to something really small depending on how far away you are from Earth.
the 9 is so that sector 0,0,0 provides a 1.0 value for human proximity. Sqrt of 9 is.. 🙂
Unless I'm mistaken the use of fixed() is to ensure different platforms always arrive at the same result, its used a lot in galaxy generation to ensure each system is identical on every platform.
Cheers dan 🙂
my hangover maths isn't what it used to be!
It's actually related (-:
my hangover maths isn't what it used to be!
hehe, yw 🙂
Some more of Brianetta's fearfully crazy math, maybe? 😆
Tomm's, he wrote the 3d galaxy.
Some more of Brianetta's fearfully crazy math, maybe? 😆
Tomm's, he wrote the 3d galaxy.
Actually that's ancient sysgen code, but Tomm did write that too 🙂