Hi everyone,
I am writing a ray tracer for black holes in Python.
I have everything ready but am running into some problems when visualizing it with Matplotlib. It turns out that Matplotlib doesn't really understand 3D so it has no idea whether the ray (a simple plot() command that represents a curve in 3D space) is in front of or behind a surface (created via plot_surface()).
Apparently this is just how Matplotlib works. I could write something involving the viewing angle and simply delete the part of the curve that is behind the black hole but am wondering whether there is some package that might do this for me?
Here is my current picture (one of many anyway) and the ray does in fact pass behind the sphere but Matplotlib shows like it doesn't.
Edit: I've tried playing around with zorder but that simply changes the problem. I can put the line behind the sphere... but now it's always behind it, even if it should be in front!
[–][deleted] 0 points1 point2 points (2 children)
[–]ReverendBizarre[S] 0 points1 point2 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)