Creating triangulated grid mesh using matplotlib - python

So I have been creating mesh's using software called BlueKenue for hydraulic models, which is great. In the document I am currently writing I would like to include an image of the mesh however the mesh's I have constructed are very long in the x-axis and short in the y direction. Unfortunately BlueKenue will not allow you to have different scale ranges on your axis (or if it does I have not been able to find a way), i.e. if you have increments of 5 on one axis you will have likewise on the other. I have included an image of the mesh I currently have to illustrate my problem. If I can construct this mesh in matplotlib I can then ensure my image is suitably clear.
My question is can I reproduce this mesh in Matplotlib in a relatively simple way? (I am fairly new to python). The mesh is a regular grid which has been triangulated.
Edit:
Mesh dimensions 29.76 x 2
x intervals = 0.16m (186 points along the x axis)
y intervals = 0.20m (10 points along the y axis)
Thanks

Related

Marking out points on surface directly above level curve in xy-plane

I have a 3D plot with a surface z = f(x,y) and a level curve g(x,y) = c. This last one lies in the xy-plane. I need to somehow mark out the points on the surface which lie directly above the level curve. I am trying to maximize f, but are restricted to the points directly above g(x,y)=c. Therefore, for illustrational purposes, it would be nice to make it clear for my readers which points we are evaluating. My current plot looks like this:
Current plot
My first idea was to somehow collect the points on g(x,y) = c, adding them to a list, and then again plot z = f(x,y) with these points as the argument. Is that overcomplicating things?
I know that Python has commands for projecting from surfaces to the xy-plane. What I am trying here is kinda the other way around. Does Python have a command for that?
Answers are highly appreciated.

Mayavi mlab moving object

I am a chemist, so programming isn't my daily work. However for one project, I am building a little programm on NMR product operators.
I have an vector with quiver, which always has its one point in [0,0,0] and just the head of the arrow is moveable, e.g. from the z to the y axis ([0,0,1] to [0,1,0]).
Right now I just can plot first the one vector and then the other. Is it possible to let the arrow rotate from one position to the other?

Plot Arbitray Slice of 3d points in Python

So I am a bit new to python and having a little trouble.
I am attempting to plot (project) a 3d data set onto an arbitrary plane. I can of course plot xy etc. but since my data has a particular orientation (all the points fall into an arbitrary orientated cylinder) I want project all the points onto a plane that slices that cylinder orthogonally and that plane would have a arbitrary orientation.
I am working with microseismic data if anyone is familiar with that and all the points are located around a wellbore with follows an arbitrary but fairly straight azimuth.
The data is in Cartesian coordinates.

plotting 2D slice of arbitrary orientation through 3D data in matplotlib

I have a 3D regular grid of data. I would like to write a routine allowing the user to specify a plane slicing through the data with arbitrary orientation and returning a contour plot of the data in the plane. Is there a ready-made way in matplotlib to do this? Could find anything in the docs.
You can use roll function of numpy to rotate your plane and make it parallel with a base plane. now you can choose your plane and plot. Only problem is that at close to edges the value from one side will be added to opposite side.

3D mapping of focused ultrasound signal

I have a 3D stage which carries a sensor and measures Ultrasonic signals in 3D space at specified points. What would be the best way of visualizing this data in python?
Your question can be interpreted in two ways:
1) What is a good python tool for drawing such a visualization?
2) What is a good visualization for such data?
I'll tackle both:
1) matplotlib looks sufficient.
2) I think a a 3D scatter plot is a good visualization for such data. This is because you can capture 4 dimensions of data: x,y,z and colour. Also, x,y,z closely resemble space. If it's possible to change the plots' sizes, then you have a 5th dimension.

Categories

Resources