Tilted Forum Project Discussion Community  

Go Back   Tilted Forum Project Discussion Community > Interests > Tilted Technology


 
 
LinkBack Thread Tools
Old 10-15-2004, 07:04 AM   #1 (permalink)
Junkie
 
Location: RI
Figuring out coordinates in 3D Space

On an online game that I run, I'm going to try to design a simulation of actual planetary movement around a central point or star. The only problem is, I can't figure out the relationship between the central point to the planet and how it'd move.
If anyone has some ideas on what to look around for and where I should look, I would be greatly appriciative.
Fallon is offline  
Old 10-15-2004, 07:48 AM   #2 (permalink)
d*d
Addict
 
d*d's Avatar
 
I would use trignometry. use the hypotenuse as the distance from the centre point to the planet. using a trig formula such as sin(angle) = opp/hyp increasing the angle between the line created by the plant and central point at the start and the same line as it moves round should create circular motion around a point

hope this makes sense
d*d is offline  
Old 10-15-2004, 08:54 AM   #3 (permalink)
Junkie
 
Location: RI
Ya it does, only issue becomes when I star playing with the third dimension.
Fallon is offline  
Old 10-15-2004, 09:24 AM   #4 (permalink)
Junkie
 
filtherton's Avatar
 
Location: In the land of ice and snow.
http://www-istp.gsfc.nasa.gov/stargaze/Smotion.htm

This website is called "How orbital motion is calculated"

I don't know if it will help, since my math and physics and programming aren't at a level where this stuff makes sense to me.
filtherton is offline  
Old 10-15-2004, 04:50 PM   #5 (permalink)
Junkie
 
Location: RI
Woah...that's what I wanted, but holy crap...didn't think it'd be total rocket science...
Fallon is offline  
Old 10-15-2004, 05:13 PM   #6 (permalink)
Junkie
 
filtherton's Avatar
 
Location: In the land of ice and snow.
Well, unless you're going for complete accuracy there is probably a way to fudge it, right?
filtherton is offline  
Old 10-15-2004, 08:41 PM   #7 (permalink)
Junkie
 
The easiest way to do this is calculate all axis's independent of each other. Don't combine all the components into a single vector. Just use 3 seperate vectors (one for x, y and z) and do your operations on them.
Rekna is offline  
Old 10-15-2004, 08:50 PM   #8 (permalink)
Junkie
 
I thought I would expand (let's see if my memory serves me right)

You are probably useing an equation for the force between 2 objects is F=g(M1)(M2)/D^2. I think that is the equation for force between 2 objects. Then you use F=MA to determine acceleration, ect.

Now let's say you have 2 objects one at point (x1,y1,z1) and another at point (x2,y2,z2).

Calculate the Force on each axis by doing this

Fx=g(M1)(M2)/(x2-x1)^2
Fy=g(M1)(M2)/(y2-y1)^2
Fz=g(M1)(M2)/(z2-z1)^2

from there calculate acceleration one each axis followed by velocity followed by the new position. Never compile the forces/accel/velocity into the combined force (there is no reason to do it)
Rekna is offline  
Old 10-15-2004, 09:19 PM   #9 (permalink)
Crazy
 
Location: Salt Town, UT
Rekna, I'm probably missing something here, so just correct me if I'm wrong.

But don't you need to determine the total distance to figure out the gravitational force? I mean, if X1 and X2 are really close, but Y1,Z1 and Y2,Z2 are really far apart, the X force shouldn't be huge, should it? Because if the distance is huge, all the forces are going to be small, no matter how close some of the coordinates are.

Of course, I could be totally wrong, but at first and second glance, I'm just not seeing how that would produce accurate results.
Rawb is offline  
Old 10-15-2004, 09:26 PM   #10 (permalink)
Crazy
 
Location: Salt Town, UT
Figuring out the distance between two points on a 3d plane is not all that difficult, the way I am thinking (which could be wrong, mind you), but it's definitely a two step process, and there is probably someone out there that has the real equasion(sp) to figure this out quickly and correctly in one step, but until that person comes around, here is my "solution":

Step 1. Ignore Z (for now), calculate the distance on just the XY plane between the two points. Now, keep the distance between the two points handy, because you will need it in the next step.

Step 2. Take the distance from step 1, use it as one side of the triangle, now, take the Z difference and use that as the second side of the triangle, calculate the distance on that, and bang. All done, the distance between two three dimensional points.

With that distance, you can multiply the force out, and split it into it's three vectored components (which I can't remember how to do, so it's up to you). Anyways, even if I am wrong, it was fun even thinking about it, thanks for the change up from the regular web-programming side of things (read from db, draw form, handle form, write to db)
Rawb is offline  
Old 10-16-2004, 01:59 AM   #11 (permalink)
Junkie
 
Quote:
Originally Posted by aoeuhtns
Rekna, I'm probably missing something here, so just correct me if I'm wrong.

But don't you need to determine the total distance to figure out the gravitational force? I mean, if X1 and X2 are really close, but Y1,Z1 and Y2,Z2 are really far apart, the X force shouldn't be huge, should it? Because if the distance is huge, all the forces are going to be small, no matter how close some of the coordinates are.

Of course, I could be totally wrong, but at first and second glance, I'm just not seeing how that would produce accurate results.
Actually your right been a long time since i did this, I think when we did this we kept track of the velocities and such independently but did the force using 3d vectors.

It has been a long time since I have done this but breaking up a 3d vector into components wasn't to hard.

I'll see if i can find a link.
Rekna is offline  
Old 10-16-2004, 10:36 AM   #12 (permalink)
Junkie
 
http://tutorial.math.lamar.edu/AllBr...icalCoords.asp

then all you have to do is figure out theta and phi. Which is pretty trivial.
Rekna is offline  
Old 11-05-2004, 10:10 AM   #13 (permalink)
Once upon a time...
 
Quote:
Which is pretty trivial.
but slow, since the conversion back involves trig ops.
__________________
--
Man Alone
=======
Abstainer: a weak person who yields to the temptation of denying himself a pleasure.
Ambrose Bierce, The Devil's Dictionary.
manalone is offline  
Old 11-05-2004, 04:10 PM   #14 (permalink)
a-j
Tilted
 
You say you want to create a simulation of actual planetary movement, but I think you have to first decide how accurate you want it, and for what time range. I'm going to outline some different options that vary starting from the least accurate to most accurate:

1) Assume elliptical plantary movement with constant angular velocity. Then all you need to do is plug in 1 parametric variable for time into three eqns for x, y, and z.

2) Same as above but using Kepler's law to take into account the angular velocity differences depending on the distance from barycenter.

3) Use an analytical solution such as VSOP87. This would be accurate to about an arcsecond. The VSOP87 solution doesn't give Pluto

4) Attempt "solve" an n-body problem as suggested above. I wouldn't recommend it.

5) Use an integrated solution (basically the n-body problem has already been done). DE200, DE403 are probably your best bet. This would give sub arcsecond resolution.
a-j is offline  
 

Tags
coordinates, figuring, space


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -8. The time now is 09:26 AM.

Tilted Forum Project

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2
© 2002-2012 Tilted Forum Project

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360