Advertisement Jump to content
Sign in to follow this  
Nathan2222_old

1D, 2D and 3D

This topic is 1808 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts


I tried joining physicsforums.com to ask but kept getting an invisible random error.

I was just wondering what's the difference between 1D, 2D and 3D physics.
Does v = u + at apply when calculating the velocity of a 3d car.
Thanks.

Share this post


Link to post
Share on other sites
Advertisement

The basic form of velocity = start_velocity + (acceleration) * (time) is valid in any number of spatial dimensions. The only thing that changes is the number of components in the relevant vectors.


is this true for other physics formula/equations

Share this post


Link to post
Share on other sites

All physics stuff I can think of that works on a vector works regardless of how many spatial dimensions you have, 1D, 2D or 3D doesn't really matter.

As ApochPiQ said, it just changes the vector from being e.g. direction.x to direction.x, direction.y, direction.z.

Share this post


Link to post
Share on other sites

Physics generalizes pretty well to higher dimensions, so the vector functions like v = u + at, F = ma, and so on apply in any number of dimensions. However some things are different due to the changes in geometry. For instance, there is no rotation in the usual sense in 1D, the cross product operation is not closed in neither one nor two dimensions (but you can still define something which works similarly from a physics perspective). While physics in general is typically first defined in three dimensions because, as far as we can tell, this is the space in which we exist,  along with a temporal dimension, there is no reason we can't come up with generalizations in lower or higher dimensions where all or most of the known laws of physics still apply in some sense, even if we can't visualize or test them directly. In fact, generalizations often guide physicists to find simplifications or improvements to existing theories, so it's actually beneficial to seek them.

 

So, to answer your question, yes, people have tried very hard to make sure that all of the physics equations are applicable in as many different situations as possible, and that includes different number of dimensions. However, you may need to make some changes to some of the code between 2D and 3D to account for fundamental changes in how the various operations which physics builds on are defined (and whether they apply at all in a meaningful way, e.g. rotation in one-dimensional space). Overall you can probably think of 2D as being 3D constrained to two dimensions.

 

However v = u + at probably doesn't "apply" that well in any dimension to find the velocity of a car, since a car generally is not accelerating in a constant direction at a constant rate. You probably want dv = a * dt where the acceleration of the car is integrated over time to obtain its change in velocity (and you can then integrate that to obtain its change in position).

 

--

 

More formally, modern physics does not assume that space is three-dimensional, or even euclidean. The formulas apply to any type of space-time geometry which meets specific mathematical requirements (which depend on the theory being considered, e.g. classical newtonian physics, general relativity, etc.). If you've learnt polymorphism and/or interfaces and/or contracts, this is the same idea: the Physics class uses a Space interface, such as euclidean R^3, which defines what distances, points, and vectors are, as well as a Time interface which describes the flow of time, and applies the (very generic) laws of physics to these. How these interfaces are implemented doesn't matter as long as they behave as expected by the Physics class. Thus you can create different "kinds" of physics which look different, but which ultimately all behave the same on some level. Apologies if I've used poor terminology, I'm not a physicist, just trying to convey that physics can be generalized. (and, no, those aren't *real* classes to be coded up, they are an analogy that I thought might be easier to understand to someone with a programming background)

Share this post


Link to post
Share on other sites

Euclidean distance -- Add the squared difference in each dimension. Square root of the sum.

Doesn't matter how many dimensions.

Edited by CoreLactose

Share this post


Link to post
Share on other sites

What of distance etc. because i saw a formula that is dx/something + dy/something. I can't remember what it was divided by


Look, if you can't remember the formula, we won't be able to tell you whether it works in any number of dimensions. To first order, everything works the same. Things having to do with rotations might look a bit different, because the group of rotations in 3D is significantly harder to handle than the group of rotations in 2D (and there is only one "rotation" in 1D). Edited by Álvaro

Share this post


Link to post
Share on other sites

Distance depends on the topology though. The distance between 2 points on the surface of the Earth is not the Euclidean distance unless you build a tunnel. Same kind of thing applies in Manhattan.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!