0

I am unfortunately quite inexperienced with python, and programming in general. I am devoting a lot of time to get better but this one really got me. I need to evaluate a time evolving funtion happening within the boundaries of a solid, a cube if you like. My idea was to plot a 3D surface with x, y and z being the dimensions of my solid, and the colormap being the values of the function i mentioned at a given point in time. The final result would be a video with the sequence of plots for a given time interval.

I smashed my head with matplotlib recently but I don't seem to understand the idea behind the need for numpy 2D arrays for surface plotting. The examples given in the docs are somewhat not revelant as my function values come from a numerical solution, hence there is no explicit relation between x,y and z and F(x,y,z).

Does anyone have any suggestion? I hope I haven't been negligent on the doc reading on the topic.

  • You mean something [looking like this](https://stackoverflow.com/a/48673738/565489), but animated such that the colours change over time, right? And you've got both the coordinates and "numerical solution" e.g. in a text file? – Asmus Feb 19 '20 at 11:20
  • I am not sure, but it look more or less what I had in mind. Actually fits nicely the fact that I am using a discrete numerical solution to find my f(x,y,z) values so each voxel could be a volume element? the coordinates and the f(x,y,z) are being calculated in the script, to add the animation I was just thinking to put the plot render in a for loop and produce a new image at every 'time step'. Thanks! – Lorenzo Pedrazzetti Feb 19 '20 at 13:36

0 Answers0