# \[x\] Forces of Gravitational Repulsion

**URL:** <https://forum.kirupa.com/t/x-forces-of-gravitational-repulsion/207341>\
**Category:** flash\
**Created:** [November 16, 2006, 5:06pm UTC](https://forum.kirupa.com/t/x-forces-of-gravitational-repulsion/207341 "2006-11-16T17:06:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Strength](https://avatars.discourse-cdn.com/v4/letter/s/43a26b/32.png) [@Strength](https://forum.kirupa.com/u/Strength)\
**Post date:** [November 16, 2006, 5:06pm UTC](https://forum.kirupa.com/t/x-forces-of-gravitational-repulsion/207341/1 "2006-11-16T17:06:18Z")

</div>

[LEFT]

> _Denizens of the forums, I beseech you!  
> Aid me in my desperate time of need!_

I have been pondering many a thought recently, and among these are what I like to think of as “thought applets”, sort of a theoretical Flash application (complete with acting forces, motions, variables and an understanding of what I want to achieve) but without it being actually engraved in code.

The most interesting one I’ve found so far has to do with an anti-gravitational force of repulsion, acting on an object. In flash, this would be the mouse exerting a strong repulsive force against another object within proximity. The object in question would have a mild elasticity “chain”, tethering it to a specified (root) position.

Graphically, this would be the opposite force of gravity acting like a large spring to the Earth’s current position, bringing Jupiter nearby. The force of attraction between these two bodies would be normally:

\*\*((6.67E-11 **//“G”** )(M**1 //Mass of the Earth)(M**2 **//Mass of Jupiter** )) / (R \*\*\*\*// **Dist. between 2 bodies** )^\*\ ***2**

But here, we would want the negative, repulsive value of this.

The potential energy of a spring is **PEs=1/2k\*x^2** , where “k” is a spring constant (less than one) and x is the distance stretched from it’s neutral position. Because x is squared, whether it is positive or negative is irrelevant.

My question(s) to you:[LIST=1]  
[_]When writing out the actionscript code for these two effects, should they be written separately? Together?  
[_]Can you think of a simpler method that would achieve the same effect.[/LIST]  
🙂 Cheers!

[/LEFT]
