S3Dlib, Matplotlib, 3D rendering – spheres in front of a surface

Recently, I needed a certain type of 3D-illustration for a post series about cosmology. I wanted to show a 2-dimensional manifold above a mesh grid with respective coordinate lines on the surface. In front of the surface I wanted to place some opaque spheres. Such illustrations are often used in physics to demonstrate the effect of some objects on a physical quantity – e.g. of spherical bodies on the gravitational potential or on a component of the metric tensor of space-time.

The simple problem to get a correct rendering of objects along a defined line of view upon a 3D scene posed a problem for Matplotlib’s 3D renderer for multiple objects in a 3D axis frame (created by ax = plt.axes(projection=’3d’)). The occlusion of objects was displayed wrongly for most view ports and viewing angles.

In this post, I briefly want to outline how this problem can be solved with the help of S3Dlib. As a beginner regarding the use of S3Dlib, I had to overcome some problems there, too. So, this small exercise with some options of S3Dlib might be interesting for some readers which want to use Python and Matplotlib for rendering simple 3D scenes.

The following plot shows what I wanted to achieve:

Correct rendering of two spheres in front of a surface by S3Dlib
Correct rendering of two spheres in front of a surface by S3Dlib
Continue reading

Bye, bye Opera … welcome Vivaldi

These are hard times regarding politics and IT. Present developments, in particular in the USA, in China and Russia have an indirect or direct impact on various types of IT-components – concerning e.g. production sites, quality, tariffs and prices, data control, digital privacy. We in Europe who have supported Opensource and Opensource-based applications for decades, can – in my opinion – not ignore tendencies both of dictatorial regimes and capitalistic tech-giants to control the future of IT in general, the production of IT-related products and the efforts to control and analyze more and more of user-generated traffic. Be it for the surveillance and control of citizens or to earn money via analyzing user profiles and spamming them indirectly with advertisement. Even more concerning is the growing power of a handful of companies and institutions over the development and the ultimate direction of AI. The risks in all of these sectors to harm digital privacy (aside of the un-social media) are growing.

But we Europeans should also have an eye on who invests in what – and whether such investments come from countries which support aggressors against European countries or the EU. We sometimes need to take a clear position. Better late than never as in my case.

Continue reading