Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Complex Spherical Pressure (collision) Map

Author
Message
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 27th Dec 2011 16:38
Hi
I'm trying to create a Galaxy Generator. It's a science project. The first thing I need is a special pressure map. I am struggling to code it, because my maths is no good.

Ok. Imagine a bubble. The membrane of the bubble is the thickest part. The centre of the bubble we will call the thinnest part. First I need to generate a DIM that simulates thickest to thinnest spherically. So using a coordinate system the bubble can be constructed with a membrane to a black hole in a nice linear fashion.

But there is a secondary bubble inside the first bubble. So the DIM needs to repeat half way through.

Thirdly, a Galaxy is flat. So having generated a perfect bubble, with another bubble inside it using a dim of linear spherical pressure, I need another value in the Y that is slightly pushing everything flat in the middle. So the Y decreases to the middle, and then grows again downwards.

It's not as complicated as it sounds, but it is if you aren't good at maths.

Once I have the DIM set up with two bubbles, and a slight Y push I will put particles in there. They should automatically move to their correct positions if the DIM is working properly.

Don't think about the black hole as a wide set of zeros. All I need is a linear scale change. I don't want to force the Galaxy to happen. I want it to automate itself.

MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 29th Dec 2011 00:51 Edited at: 29th Dec 2011 00:53
I gave up reading half way as you offended at least half the community... the rest... maybe as well...

Quote: " but it is if you aren't good at maths."


this could have been left out to be honest...

EDIT

My reason for calling the above statement rude... is we do not need maths to understand what you are saying...

Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 29th Dec 2011 02:58
In what possible way could his post have been offensive to anyone? And yes, his solution does require math, although I don't fully understand what he's trying to explain.

When you say DIM, you mean an array?

So you have particles inside a bubble. And when a force is pressed down upon the bubble, the particles will move inside to react to the pressure?

"You're not going crazy. You're going sane in a crazy world!" ~Tick
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 29th Dec 2011 03:04
Suggesting someone is inept or whatever anyway I get what he is trying to do just think he should do a diagram

Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 11th Feb 2012 13:38
Quote: "I gave up reading half way as you offended at least half the community... the rest... maybe as well...

Quote: " but it is if you aren't good at maths."

this could have been left out to be honest...

EDIT

My reason for calling the above statement rude... is we do not need maths to understand what you are saying..."


It's not offensive, it's me that isn't good at maths. The quote is about me.

Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 11th Feb 2012 13:44 Edited at: 11th Feb 2012 14:02
Quote: "In what possible way could his post have been offensive to anyone? And yes, his solution does require math, although I don't fully understand what he's trying to explain.

When you say DIM, you mean an array?

So you have particles inside a bubble. And when a force is pressed down upon the bubble, the particles will move inside to react to the pressure?"


It was based on a theory that I had in 2004. This was found some years later, and I thought I should try to re-create my theory...

http://news.bbc.co.uk/1/hi/8444038.stm

The idea was to create an array of numbers where the numbers represent particles. The array was to be spherical, and the outside numbers were to scale down to the middle. After the numbers were scaled down to the middle, I wanted to take all of those numbers and scale them down a second time in the Y to the centre from both ends of the array.

Once I got those numbers I would use them as scales for create Object sphere. The sphere would be then used as pressure points of gravity in a Galaxy. So you get a Black Hole in the middle, because the array scales down twice towards the centre. In the end I tried a different way.

My problem was that I couldn't figure out how you make a spherical array to scale the array down towards the centre. It might have been simpler just to ask.. How do you make a spherical array?

MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 11th Feb 2012 14:20


umm well an array is usually a square right?

######
######
######
######

wouldnt it be

@@##@@
@####@
######
@####@
@@##@@

something like that? where @ is 0 # is 1.......

just a thought

Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 11th Feb 2012 14:26
I need to write it as a dim in a loop.

So usually I have Dim(x,y,z), and then fill it with numbers, and get a cube.

I have no idea how to fill it with numbers to get a sphere..

For x = 1 to 1000
For y = 1 to 1000
for z = 1 to 1000

Next z
Next y
next x

????

Diggsey
20
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 11th Feb 2012 16:51
A solid sphere with radius r centred on the origin is defined in cartesian coordinates like so:
x²+y²+z² <= r²

So just fill all the elements in the array where that is true with the number you are using to reresent solid. You will need to subtract 500 from the coordinates first so that the sphere is centred on 500, 500, 500 instead, and you might also want to start looping from zero rather than one since that's where array indices start...

[b]
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 11th Feb 2012 17:00 Edited at: 11th Feb 2012 17:06
Quote: "A solid sphere with radius r centred on the origin is defined in cartesian coordinates like so:
x²+y²+z² <= r²

So just fill all the elements in the array where that is true with the number you are using to reresent solid. You will need to subtract 500 from the coordinates first so that the sphere is centred on 500, 500, 500 instead, and you might also want to start looping from zero rather than one since that's where array indices start..."


Yeah that's exactly what I want. I'm just not able to think of the nested loops, and also the larger numbers on the outside, and the smaller numbers in the middle, to get a Black Hole in the middle. I just need a spherical black hole to begin with, and then I will try to fix the Y.

IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 11th Feb 2012 21:05
The first bubble is simple - you simply calculate the distance of each cell in the array to the centre. To squash the Y direction, you multiply its effect on the distance.

The second bubble is just as simple. You do exactly the same again, rejecting distances above a certain level and add them to the values you had before (or maybe averaging them).

Finally, if the numbers aren't exactly what you want (you may want values ranging from 0.0 to 1.0 for simplicity) you can run through the array a final time and rescale them.

For speed, you can do the calculations for one octant (eg x>=0, y>=0, z>=0) and then mirror those values into the other octants at the end.

Neuro Fuzzy
19
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 12th Feb 2012 00:06 Edited at: 12th Feb 2012 00:26
Something like this?


To me the only method that doesn't force results is using physics!

[edit]
rereading your post, did you mean something like this:


Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 12th Feb 2012 00:56 Edited at: 12th Feb 2012 01:16
Not quite like that. My theory in 2004 was to do with Space-Time being a grain like sand. I need to re-create the grain structure of space-time. So if you imagine a Galaxy surrounded by an imaginary sphere.. which may, or may not be there. The sphere is full of imaginary sand (space-time), which may, or may not be there. So the Dim(x,y,z) is the coordinates of all of the grain structure, and the grain creates pressure towards the centre to create a Black Hole, so the grain scales down towards the centre.

So without really using any formulas, and just nested loops, I need something like...

Dim Space_Time(x,y,z)
scale = 1000
For x = 1 to 1000
For y = 1 to 1000
for z = 1 to 1000
dec scale
Space_Time(x,y,z) = Scale
Next z
Next y
next x

Then I will read the dim back, and use it to place sphere at those points.

For x = 1 to 1000
For y = 1 to 1000
for z = 1 to 1000
inc n
Create object sphere n , Space_Time(x,y,z)
Position object n,x,y,z
Next z
Next y
next x

After placing the sphere at those points, I intend to create an interaction between those sphere which improves the Grain stacking, and some other particle interactions. But my motto is "The Universe doesn't know maths", so I need to take a look at the nested loops, and then try to figure out what the Universe is doing that creates those nested loops. I think it has something to do with time, but without seeing how the nests work I can't picture it.

But of course those nested loops are completely wrong. The nested loops need to be spherical, and usually they can easily be made cubed. And the pseudo code above has no chance of working properly.

Here's a bodged way of doing it, and it works, but I don't like the code structure of it (sorry that I hardly ever indent my code)...


Neuro Fuzzy
19
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 12th Feb 2012 08:39
Quote: "and the grain creates pressure towards the centre to create a Black Hole"

mediated by what force? Why? Do you have any empirical evidence?

Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 12th Feb 2012 12:41
Quote: "mediated by what force? Why? Do you have any empirical evidence?"


Well space-Time grain has been seen, but only once, and a second attempt to find it was unsuccessful. The force that I use in my theory is inflation. The idea is that inflation is actually fundamental scale. Particles have scale, scale is relative to the next particle. I put the Big Bang everywhere, I put the singularity everywhere. What you get is scale from all points. So this loop will create scale at all points.

Login to post a reply

Server time is: 2026-07-09 21:19:56
Your offset time is: 2026-07-09 21:19:56