Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 113 114 [115] 116 117 ... 173

Author Topic: Mathematics Help Thread  (Read 228549 times)

MonkeyHead

  • Bay Watcher
  • Yma o hyd...
    • View Profile
Re: Mathematics Help Thread
« Reply #1710 on: January 16, 2015, 02:31:37 pm »

Gentlemen, I am in need of a function.



I want it to look like this, but I can't seem to figure out a way to get the result I want.

EDIT: y = ( -((x-2)^2) )/(x^2)+1 seems to be correct.

EDIT2:
Spoiler: What it was for (click to show/hide)

You might want to look into flocking simulations - it might be your thing.

Furtuka

  • Bay Watcher
  • High Priest of Mecha
    • View Profile
Re: Mathematics Help Thread
« Reply #1711 on: February 03, 2015, 09:01:48 pm »

line l = vector->x(t) = (1-t, 1+t, t) 
Find the unit tangent vector, the curvature, and the tangent line to the l at the point where (a) t=2 and (b) at any point on the line.

I think I got the unit tangent vector and curvature, but how do I get the tangent line? For a is it (-2t/√(62), 7t/√(62), 3t/√(62))?
« Last Edit: February 03, 2015, 09:11:13 pm by Furtuka »
Logged
It's FEF, not FEOF

Reelya

  • Bay Watcher
    • View Profile
Re: Mathematics Help Thread
« Reply #1712 on: February 03, 2015, 09:06:53 pm »

If you have a vector and a point it passes through, those define a unique line. The most basic form of the line equation is y=ax+b. You already worked out "a" from the tangent vector's direction, and you know the tangent point (call it x1,y1), so you substitute in the knowns into this equation:

y1 = ax1 + b

And solve for "b", which is the only unknown.
« Last Edit: February 03, 2015, 09:15:33 pm by Reelya »
Logged

Furtuka

  • Bay Watcher
  • High Priest of Mecha
    • View Profile
Re: Mathematics Help Thread
« Reply #1713 on: February 03, 2015, 09:37:12 pm »

I think I might have been putting the tangent line where it should be vector then. Would the non unit tangent vector for the first one be (-2, 7, 3)?
Logged
It's FEF, not FEOF

Furtuka

  • Bay Watcher
  • High Priest of Mecha
    • View Profile
Re: Mathematics Help Thread
« Reply #1714 on: February 03, 2015, 11:56:10 pm »

Spoiler (click to show/hide)

I've been staring at this problem for a very long time and have no idea what I'm doing. Please help
Logged
It's FEF, not FEOF

crazysheep

  • Bay Watcher
  • [PREFSTRING:fluffy wool]
    • View Profile
Re: Mathematics Help Thread
« Reply #1715 on: February 04, 2015, 12:14:24 am »

@Caroline: If I understand your spoilered notes correctly, you have 3 variables but only 2 equations, which makes it harder to get to the answer without some other criteria to eliminate nonsensical answers.

Spoiler: my working (click to show/hide)
Logged
"Don't be in such a hurry to grow up, for there's nothing a kid can't do."

Furtuka

  • Bay Watcher
  • High Priest of Mecha
    • View Profile
Re: Mathematics Help Thread
« Reply #1716 on: February 04, 2015, 01:13:57 am »

I'm still confused. In the first one how do I use the drawing to show that it has the same length as v?
Logged
It's FEF, not FEOF

crazysheep

  • Bay Watcher
  • [PREFSTRING:fluffy wool]
    • View Profile
Re: Mathematics Help Thread
« Reply #1717 on: February 04, 2015, 07:27:32 am »

Thank you.
 :DIt didn't confuse me very much at all, but I'll reread it when I'm not extremely sleepy to make sure I caught everything.
No worries then :)
Logged
"Don't be in such a hurry to grow up, for there's nothing a kid can't do."

Furtuka

  • Bay Watcher
  • High Priest of Mecha
    • View Profile
Re: Mathematics Help Thread
« Reply #1718 on: February 04, 2015, 03:47:57 pm »

I'm still confused. In the first one how do I use the drawing to show that it has the same length as v?


Well, you know what v is supposed to be- that's the arrow with the line pointing to it to the equation is v. You have the line r, which is equal to x. All you need to do is draw in w (should be vertical), draw in the cross product of w and x, and show that that's the same direction and distance.
If x and w are variable values, how am I suppose to know what the distance of their cross product is?
Logged
It's FEF, not FEOF

da_nang

  • Bay Watcher
  • Argonian Overlord
    • View Profile
Re: Mathematics Help Thread
« Reply #1719 on: February 04, 2015, 03:59:30 pm »

I'm still confused. In the first one how do I use the drawing to show that it has the same length as v?


Well, you know what v is supposed to be- that's the arrow with the line pointing to it to the equation is v. You have the line r, which is equal to x. All you need to do is draw in w (should be vertical), draw in the cross product of w and x, and show that that's the same direction and distance.
If x and w are variable values, how am I suppose to know what the distance of their cross product is?
Since they're perpendicular to one another, the magnitude of the cross product is the product of the magnitudes of the cross product operands.
« Last Edit: February 04, 2015, 04:01:29 pm by da_nang »
Logged
"Deliver yesterday, code today, think tomorrow."
Ceterum censeo Unionem Europaeam esse delendam.
Future supplanter of humanity.

Furtuka

  • Bay Watcher
  • High Priest of Mecha
    • View Profile
Re: Mathematics Help Thread
« Reply #1720 on: February 04, 2015, 04:02:56 pm »

By factor do you mean each of the vectors? And I still don't understand how I can assume it to be the same distance as v
Logged
It's FEF, not FEOF

da_nang

  • Bay Watcher
  • Argonian Overlord
    • View Profile
Re: Mathematics Help Thread
« Reply #1721 on: February 04, 2015, 04:07:09 pm »

Yes, each vector. You can also prove it's the same magnitude if you recall that |v| = |w||r| for circular motion.
Logged
"Deliver yesterday, code today, think tomorrow."
Ceterum censeo Unionem Europaeam esse delendam.
Future supplanter of humanity.

Bauglir

  • Bay Watcher
  • Let us make Good
    • View Profile
Re: Mathematics Help Thread
« Reply #1722 on: February 06, 2015, 06:21:56 pm »

I'm looking for a function that behaves similarly to the exponential function, but whose inversion is a bit friendlier to algebra than a logarithm. To be more specific, I want an always-increasing, smooth y = f(x) such that y approaches 0 as x approaches -∞, y approaches ∞ as x approaches +∞, there are no inflection points, and f-1(g(y)/x + 1) = x can be separated to give x as some function in terms of only y. It's that last bit that's ruling out an exponential function.

To give more information, and because I'm sure I've worded that last bit in a way that's not technically correct, right now I'm working with y = arctan(x*(1+e^x)), and I need to invert it. Having an explicit inversion is an important goal for the thing I'm working on, which is a number generation scheme (that formula is its CDF). Getting to x = ln(tan(y)/x -1) is straightforward enough, but can't separate that logarithm and so I can't separate the variables and get a result that gives x in terms of y. What I need is a function that I can replace the exponential with that will let me proceed, but I can't for the life of me think of one.

Is there such a function?

Note, I'm not actually terribly attached to the x*(1+e^x) thing - what I really need is a function of x that's close to y = x below 0, and rapidly diverges from it above 0 (in any direction, actually - as long as the difference between the two is always increasing, and the no inflection points thing holds, it'll do what I need). What I've asked for above is framing the question in what seems the easiest way to me, but it might well not be, and I'll happily take better ideas. I gave a logarithm a shot as the obvious next guess, and it's not much better (you wind up having (ex)x in terms of y, unless I've missed something obvious).
Logged
In the days when Sussman was a novice, Minsky once came to him as he sat hacking at the PDP-6.
“What are you doing?”, asked Minsky. “I am training a randomly wired neural net to play Tic-Tac-Toe” Sussman replied. “Why is the net wired randomly?”, asked Minsky. “I do not want it to have any preconceptions of how to play”, Sussman said.
Minsky then shut his eyes. “Why do you close your eyes?”, Sussman asked his teacher.
“So that the room will be empty.”
At that moment, Sussman was enlightened.

MagmaMcFry

  • Bay Watcher
  • [EXISTS]
    • View Profile
Re: Mathematics Help Thread
« Reply #1723 on: February 06, 2015, 07:00:54 pm »

Note, I'm not actually terribly attached to the x*(1+e^x) thing - what I really need is a function of x that's close to y = x below 0, and rapidly diverges from it above 0 (in any direction, actually - as long as the difference between the two is always increasing, and the no inflection points thing holds, it'll do what I need).
How about y=-sqrt(x²+1)? It doesn't really diverge rapidly, but it has no inflection and its inversion is given by x=+-sqrt(y²-1) for any y < -1.

If you want a completely invertible function, then I propose y = (3x-sqrt(5x²+4))/4, its inversion is given by x = 3y+sqrt(5y²+1).
Logged

Bauglir

  • Bay Watcher
  • Let us make Good
    • View Profile
Re: Mathematics Help Thread
« Reply #1724 on: February 06, 2015, 07:07:43 pm »

Glancing at that second one, it looks like it ought to do quite nicely. I'll see what happens. Thank you for being amazing.
Logged
In the days when Sussman was a novice, Minsky once came to him as he sat hacking at the PDP-6.
“What are you doing?”, asked Minsky. “I am training a randomly wired neural net to play Tic-Tac-Toe” Sussman replied. “Why is the net wired randomly?”, asked Minsky. “I do not want it to have any preconceptions of how to play”, Sussman said.
Minsky then shut his eyes. “Why do you close your eyes?”, Sussman asked his teacher.
“So that the room will be empty.”
At that moment, Sussman was enlightened.
Pages: 1 ... 113 114 [115] 116 117 ... 173