Multivariate Calculus for a Game World

  • #1
Okay, I never took calculus 3 so I don't know how to write/solve an integral for a power I made up.

I want to flesh out my game world with math because it's cool and I can. Like Chester wrote some of the physics for the Bizarro universe. Applying physics and math to a fictitious universe is both ... bizarre ... and fun!

The issue is this integral has two changing variables.

So the power I'm working on now is telekinesis. As the distance from the TK user increases, the "spirit energy cost" goes up. So spirit energy cost = the limit of the sum of (spirit point constant for the game world) * (n * distance from character's body) * (displacement of the object) * (force applied to accelerate object), where the sum is for the instantaneous values of (distance from character's body) and (displacement of the object). These are the two variables in the integral I can't formulate or solve. n is just a number that, like the "spirit point constant", depends on how I want to set up the game world.

So let's say it takes all of a person's "spirit power" to move a 1500kg car 1 m in 1 second for a distance of 1 m to a distance of 2 m from the person's body.

Then I can write a sum for that. (spirit energy cost) is approximately equal to [(spirit point constant) * (force applied = 3000 N)]*[0*0 + 1.1*.1 + 1.2*.2 + 1.3*.3 + 1.4*.4 + 1.5*.5 + 1.6*.6 + 1.7*.7 + 1.8*.8 + 1.9*.9 + 2*1] = (spirit point constant) * 28050 J*m.

What I don't know is the integral for this or how to solve it, so I'm asking for help from anyone who knows multivariate calculus!

I also want to write the rules for using "spirit energy" to add heat explosively to air or other matter. So that should be fun! I guess I should learn multivariate calculus at some point ... it's not required for my major or possible minor, though, I don't think.

So the idea is that a person has a power rating which determines how much "spirit energy" they can use over a given time interval. In terms of game rules, this just means you can do more or less on your turn depending on the power rating. But I want to write rules for it and it gets tricky. It seems like you need some wiggle room in your rate of spirit energy application unless you have a smallest unit of time you want to use. Which, now that I think of it, is probably how I want to do things.
 

Answers and Replies

  • #2
1,990
168
Maybe if you assign those variables a symbol and write down the things it might be more helpfull to us see the solution or help.
 
  • Like
Likes gibberingmouther
  • #3
jbriggs444
Science Advisor
Homework Helper
9,767
4,366
O
The issue is this integral has two changing variables.

So spirit energy cost = the limit of the sum of (spirit point constant for the game world) * (n * distance from character's body) * (displacement of the object) * (force applied to accelerate object), where the sum is for the instantaneous values of (distance from character's body) and (displacement of the object). These are the two variables in the integral I can't formulate or solve. n is just a number that, like the "spirit point constant", depends on how I want to set up the game world.
First move would be to factor the spirit point constant and n out of the integral. They are constants.

So the cost is proportional to current distance times incremental displacement times force applied. At first glance one can take the dot product of incremental displacement and force applied to get work done. So this formula makes at least some level of sense.

But we want to tack on a scaling factor for distance from the source. That seems reasonable -- it takes twice as much spirit power to do work on an object when it is twice as far away.

You have to carefully squint your eyes and look away when it comes to spirit power doing work on an object that is nearby. The work done can be as large as you please and the required spirit cost can be as small as you please as long as the target is very close. It is almost a prescription for perpetual motion.

Then I can write a sum for that. (spirit energy cost) is approximately equal to [(spirit point constant) * (force applied = 3000 N)]*[0*0 + 1.1*.1 + 1.2*.2 + 1.3*.3 + 1.4*.4 + 1.5*.5 + 1.6*.6 + 1.7*.7 + 1.8*.8 + 1.9*.9 + 2*1] = (spirit point constant) * 28050 J*m.
If you want a constant 3000 N force, this should be...

0.1 meter incremental distance times 1.05 meter cost multiplier times 3000 N to get from 1.0 to 1.1 meters
0.1 meter incremental distance times 1.15 meter cost multiplier times 3000 N to get from 1.1 to 1.2 meters
0.1 meter incremental distance times 1.25 meter cost multiplier times 3000 N to get from 1.2 to 1.3 meters
[...]
0.1 meter incremental distance times 1.95 meter cost multipler times 3000 N to get from 1.9 to 2.0 meters

This is the product of incremental displacement times current distance times current force integrated over displacement.

$$S\ n\ \int{|x-x_0| ( F(x) \cdot dx )}$$
Where ##S## is the spirit cost multiplier, ##n## is your other factor, ##x_0## is your spirit user's location, ##x## is the target's position and ##F(x)## is the force applied at position x. You should worry about dimensions. Your spirit cost multiplier will likely have units of spirit cost per Joule-meter.

Taking ##x_0## = 0 and ##F(x)## as a constant 3000N, we are talking about integrating ##3000x## to get ##1500x^2##. Evaluating that from x=1.0 to x=2.0 yields 1500*4 - 1500*1 = 1500*3 = 4500 Joule-meters times S times n. [Barring any errors on my part]

Your spirit force user could have an advantage by pushing very hard at the start, supplying enough kinetic energy at the 1.0 meter displacement to allow the target to coast the rest of the way. That would only cost 3000 Joule-meters times S times n.
 
  • Like
Likes gibberingmouther
  • #4
You have to carefully squint your eyes and look away when it comes to spirit power doing work on an object that is nearby. The work done can be as large as you please and the required spirit cost can be as small as you please as long as the target is very close. It is almost a prescription for perpetual motion.
Any ideas how I can fix this? I now realize that since your "spirit body" channels the energy from your "divine spark" inside your "spirit nucleus" (about where your solar plexus is), if you're using telekinesis on yourself my current logic would imply you could apply infinite force to make you punch, like, as fast as the speed of light would allow. I don't want any glaring inconsistencies (or "logic discontinuities" is the wording I have used) in my game logic. This level of detail is more for the lore than for actually playing the tabletop version of the game, since the rules are written out in game terms, not math terms for that version of the game.

Why don't you have this problem with Coulomb's law? Is it because the charge is at the center of an electron/proton, so you have a buffer that prevents the value of the radius in Coulomb's law from being too small? I guess I would have to have a similar buffer for my game world's logic?
 
  • #6
Gravity and electromagnetism are not without their own concerns if one pushes them down to the realm of the infinitely small.

https://www.physicsforums.com/insights/struggles-continuum-part-1/
Cool! Yeah I realized I can just make it so there is a minimum value for the telekinesis. Not sure what the mathematical definitions would look like off the top of my head, but I'll probably sort that out later. Right now I'm still fleshing out the game world and lore.
 

Related Threads on Multivariate Calculus for a Game World

  • Last Post
Replies
7
Views
4K
Replies
0
Views
1K
Replies
3
Views
1K
Replies
3
Views
1K
  • Last Post
Replies
11
Views
960
  • Last Post
Replies
3
Views
2K
  • Last Post
Replies
2
Views
2K
  • Last Post
Replies
1
Views
1K
  • Last Post
Replies
3
Views
4K
  • Last Post
Replies
1
Views
5K
Top