How to plot with Matlab a motion equation (in Frenet Serret coordinate)

261 Views Asked by At

I am stuck for a little while on a problem that I don't really know where I should start.

The aim is to plot in Matlab the motion of a ball governed by the following equation:

$$M \frac{d\mathbf{U}}{ds}U\mathbf{t}+M\frac{d\theta}{ds}\mathbf{n}=-\frac{1}{2} \rho U^2 S C_D \mathbf{t} + \rho R^3 {\Omega_0}{U}C_\Omega \mathbf{n}$$

knowing that:

$$\mathbf{U}(s)=U_0 \times e^{-\frac s {C_2}}$$

$$\frac{d\theta}{ds}=\frac{1}{C_1} e^{\frac s {C_2}}$$

I am trying from these equations to get back to cartesian coordinates in order to plot them but I fail every time.

Do someone have hints about where to start ?

Thanks in adavance !

1

There are 1 best solutions below

0
On

For a numerically obtained solution in a form of real valued matrix, say A, you can try

mesh(A) 
surf(A) 
pcolor(A) 
surface(A)

If the data isn't scattered, just in different coordinates than cartesian, these will visualize your result without the link to the coordinates, i.e. the indices of the matrix will be considered coordinates. This won't work with a scattered data though.

The first two will show you the density, the later two will colorize the height. For a non real matrix you can use visualize abs(A), real(A), imag(A)

If you know the connection between the coordinate in which you have the solution, then you compute x and y and use with any of the above plotting functions. x,y can be either vectors or meshgrid. if x,y are vectors, then you can make them mesh using [X,Y]=meshgrid(x,y);

example mesh(x,y',A) or mesh(X,Y,A)