1

I have a set of data in the following format:

 0.90000000   0.90000000 -2133.80472139
 0.90000000   0.95000000 -2133.84134433
 ...
 1.87500000   1.82500000 -2133.96171262
 1.87500000   1.87500000 -2133.95550450

And I can plot this set of data as a surface using plot_trisurf

My question is: how can I plot the 2D "intersection curve"(or the "cut") of the surface plotted by plot_trisurf and z-plane?

Kindly note that I notice that contour can probably plot that curve but it is 3D.

I'm not sure if it is possible to draw that curve in 2D plot(on the plane that is parallel with z-plane).

CodingNow
  • 998
  • 1
  • 11
  • 23
  • 1
    For precise 3D stuff with Python, [Mayavi](https://docs.enthought.com/mayavi/mayavi/) seems to be the most adequate tool – JohanC Dec 02 '19 at 23:28
  • 2
    You have to calculate the intersection yourself, but once you have it [this question](https://stackoverflow.com/questions/59000001/how-to-draw-a-line-behind-a-surface-plot-using-pyplot) and [answer](https://stackoverflow.com/questions/59000001/how-to-draw-a-line-behind-a-surface-plot-using-pyplot/59002165#59002165) outline how you can go about plotting something like that. – William Miller Dec 02 '19 at 23:40
  • @WilliamMiller Thank you so much sir and also thank you for the detailed explanation in my other question. Just a quick question: do we have any APIs or libraries or established algorithms that can compute the intersection? Thank you again! – CodingNow Dec 10 '19 at 17:29
  • 1
    @CodingNow I’m not aware of any APIs or libraries but Wolfram Alpha and Mathematic can both handle finding an intersection if the two surfaces can be represented symbolically. Mathematica might even be able to handle a set of discrete points, I’m not sure – William Miller Dec 10 '19 at 17:42

0 Answers0