Move a point on a curve inside 3D world

48 Views Asked by At

I didn't do any maths since a long time, so I have even some trouble to explain my problem.

I have one position $(x,y,z)$ which is completely know. I have a equation which is know, let's say $z = ax + by + c$, even if I want something generic. I have also a $z$ limitation for the position allowed to be computed, $zMin$ and $zMax$.

Now if the original position is considered to be "on" the equation. How could I compute the position which can result of this equation for $z + 1$ and $z - 1$.

EDIT : I think my problem is that I don't know how to write the equation I need in fact. I thought it was Z = X + Y, but in reality I need something which is going to growth like that : $(Z -> Z + 1)$ => $(X -> X + 0.5)$ & $(Y -> Y + 0.5)$ : https://ggbm.at/hAPqreX3

EDIT: To be true I need a equation to replace a movement using a normalized vector3D translation which never change. Is there some good ressources about Curve equation in 3D?

1

There are 1 best solutions below

0
On

There are different ways to represent a 3D curve, such as with parametric equations $(x(t),y(t),z(t))$ or as the intersection of two surfaces $F(x,y,z)=0,G(x,y,z)=0$.

In your case, I guess that you can think in terms of the projections of the curve on the planes $xz$ and $yz$, and use explicit equations in the form

$$\begin{cases}x=f(z),\\y=g(z)\end{cases}$$

or possibly

$$\begin{cases}z=f(x),\\z=g(y)\end{cases}.$$

It will be easier for you to treat the two projections independently, and consider the corresponding 2D curves.

For instance, if you want a straight line through $(x_0,z_0)$ and $(x_1,z_1)$ in the plane $xz$, you can use the usual

$$z=z_0+\frac{z_1-z_0}{x_1-x_0}(x-x_0).$$