- #1

kairama15

- 31

- 0

- TL;DR Summary
- I'd like to understand movement along the surface of a 3 dimensional graph.

I'd like to understand the movement of a particle along the surface of a three dimensional graph. For example, if there is a flat two dimensional plane (z=2 for all x and y), and a unit vector describes its initial direction of movement (<sqrt(2)/2i+sqrt(2)/2j> for example), then the vector will just move in a straight line along the plane. However, if the surface of the function is curved like the surface of the sphere, the particle will move in a curved path. If the function is z=sqrt(1-x^2-y^2) and the initial direction of movement is <1i+0j> at point (0,0,1), the particle will move around the sphere in a circle. I imagine this somewhat like a coin going around the surface of one of those donation things at the mall. The coin moves around the curved surface and spirals into the middle where it falls down the hole (I know this isn't nearly a perfect example because gravity is involved, but the idea is similar.)

To make it easy and to get familiar with this, I first tried to make this happen on a two dimensional graph on function like y=sin(x). Ideally, I'd want to start at a point on the graph and move along the surface of the graph, tracing out the function. If I start at any point, (x,y) and a unit vector describing the initial slope (direction) of the movement along the graph <ai+bj>, the unit vector will move a differential distance "ds" and will rotate a differential angle "dtheta". I've worked out that the next x value will be [x+cos(atan(dy/dx)+k*ds)] and the next y value will be [y+sin(atan(dy/dx)+k*ds)] where k is the curvature of the function at that point. The unit vector's angle will rotate dtheta degrees (dtheta = ds/r = k*ds) , and the new unit vector describing the new direction of movement (the slope at the next point) is <(cos(atan(b/a)+k*ds)i + (sin(atan(b/a)+k*ds)j>. If I iterate this on a simple program like excel, the points generated trace out the function (like sin(x)).

So the question is, how do I extend this idea to a 3d graph like z=sin(x)+sin(y) ? Id like to know what the new point is after moving a differential distance "ds" along the surface, and how does the unit vector describing the direction of movement change?

To make it easy and to get familiar with this, I first tried to make this happen on a two dimensional graph on function like y=sin(x). Ideally, I'd want to start at a point on the graph and move along the surface of the graph, tracing out the function. If I start at any point, (x,y) and a unit vector describing the initial slope (direction) of the movement along the graph <ai+bj>, the unit vector will move a differential distance "ds" and will rotate a differential angle "dtheta". I've worked out that the next x value will be [x+cos(atan(dy/dx)+k*ds)] and the next y value will be [y+sin(atan(dy/dx)+k*ds)] where k is the curvature of the function at that point. The unit vector's angle will rotate dtheta degrees (dtheta = ds/r = k*ds) , and the new unit vector describing the new direction of movement (the slope at the next point) is <(cos(atan(b/a)+k*ds)i + (sin(atan(b/a)+k*ds)j>. If I iterate this on a simple program like excel, the points generated trace out the function (like sin(x)).

So the question is, how do I extend this idea to a 3d graph like z=sin(x)+sin(y) ? Id like to know what the new point is after moving a differential distance "ds" along the surface, and how does the unit vector describing the direction of movement change?