Written Mar 30 and forgot
I realize I didn't actually put anything for negative density (last post) so I’m gonna retroactively add it to the best of my writing ability.
When you put an object’s density in the negative range, physics acts very weird. (Refer to as anti-objects)
One example is how the anti-object will fall (or stay in place if there’s no gravity) as if it has infinite airFrictionMult, this will be the case no matter how big the air multiplier is, nor if it’s negative.
- Side note, if an object has an infinite airFrictionMult, changing the air multiplier into a negative value will delete it, same goes if it’s a negative infinite airFrictionMult and a positive air multiplier. Another neat part about airFrictionMult is if it AND the air multiplier are both negative, they don’t get the acceleration effect.
If you disable/put the air multiplier to zero, anti-objects react normally to gravity, well mostly. Instead of pushing an object whenever colliding with another object, they clip inside it and pull on it instead of the expected push; often extremely accelerating them, this works best on bigger objects since anti-objects colliding with objects with identical size and mass tend to disintegrate each other.
Anti-objects colliding with other anti-objects (best done in zero gravity) demonstrated this pulling property fairly well, it shares some similarities to adhesion, but it’s better described as “grabbing” rather than simply being sticky, and often very weak and easy to break off.
If you glue an anti-object with an object that has an identical density and size, it will destroy both of them, possibly due to it reaching an equilibrium of 0 density (which the game automatically deletes said objects if you put that value). You can however glue an anti-object and object together if they are different masses, which leads to some really strange behaviors unless perfectly centered.
- There is a possible loophole where you can glue both an anti-object with an object to the background, and then loosen them so that they’re both attached to each other, thus creating a very messy unstable object that can shortly accelerate to astronomical speeds, however I’ve only had one scene with specifically an anti-circle and a circle where I could actually pull this off, any recreations elsewhere seem to not work.
- Big anti-object + small object = passive, tends to either spin in place, or drift off into space
- Small anti-object + big object = active, tends to accelerate off into space
Anti-objects glued to the background function basically the same as if they were normal objects (minus attraction being reversed).
Attraction is pretty neat when it comes to anti-objects. Object attraction is based on Nm^2/kg^2 (or Nm/kg^2 if linear), and since anti-object mass is a negative number, raising the attraction would actually increase its repulsion. Anti-object attraction will be called repulsion to fit with this reversal aspect.
Anti-objects seem to chase the things it repulses (positive repulsion), and get pushed away by things it attracts (negative repulsion), whereas normal objects mutually attract and are attracted (positive attraction), or mutually repulse and are repulsed (negative attraction).
When an anti-object is fully in the center of what it’s attracted to, it randomly teleports to a place in the radius of the attractive object.
When gravity is on, anti-objects tend to hang off the bottom of background glued objects like stalactites or bats.
Topic of springs and anti-objects: compared to two objects tied together by spring, two anti-objects tied by springs are less stable and often assume an oscillation/accordion momentum until they successfully grab onto each other (i.e can’t clump happily /ref), the spring reaches a stable formation, or face certain annihilation.
Anti-object formed springs and object formed springs are inverses of each other. If you create an anti-object spring, then attach it to a normal object, instead of simply pushing back when compressed or pulling back when stretched, it will pull in the object when compressed and push away the object when stretched. Same goes for an object spring and an anti-object.
- This is because unlike the spring constant values in an object spring, an anti-object spring’s constant is in the negative, this is why you can’t normally access an anti-object spring’s spring menu unless viewing it in the script menu as negative spring constants seems to disable the spring menu.
- This can also be simply done by attaching two objects with a spring and turning the constant negative (or positive if it’s two anti-objects)
Alternatively, if you tie an object and an anti-object with a spring, many things can happen, if they are identical in mass they will end up getting deleted if one of the objects is even slightly moving. Likewise in the gluing section, when the object and anti-object tied by spring are different in mass, they can exist more easily, although it’s still very unstable.
When you simply attach a spring to both of these, the big one takes priority:
- Big anti-object + small object = negative constant
- Small anti-object + big object = positive constant
If you glue an object with negative infinity density, it will delete everything that is background glued, causing anything new that gets background glued to act as if it was simply glued together instead of the intended function. It will possibly crash at some point in this limbo state, and when you reopen Algodoo the background glued objects will behave normally again.
P.S. I made scenes testing off anti-objects and should probably share them at some point.