Since learned the Turtle module, drew a lot of simple strokes. Like Piglet Paige, Doraemon and so on, but these still do not allow people around to feel the power of Python, is still every time the force will be beaten face. It's like you painted this with turtle.
Someone else took out this.
What to do? In the face of the library so rich Python, not a library, we have another library. That's the Pyray library.
Pyray Library Introduction
The Pyray library was created in January 2018, although the best tool for rendering 3D scenes is still POV ray. But why can't we use this functionality in Python (rendering 2D, 3D, and higher-dimensional objects and scenes), a language that may already be widely used, And it will only become more and more popular. So through the Pyray library This code to achieve the first step towards this goal, we can use the concise Python language to do what the POV ray does-rendering complex 3D objects, scenes and animations, etc., and this will be used in video, video games, physics simulations or beautiful pictures. Most importantly, this library is very simple to use, minimizing dependencies on external libraries so that more people can run them.
Pyray Installation
Pyray Library has been uploaded to PyPI and installed via PIP command
Alternatively, you can download the code and run the installation from the home folder
It is more convenient to install with PIP.
Install third-party dependent libraries
PIL, NumPy, and scipy are required, and matptlib and Syry are required if you are writing mathematical equation images using the methods in writeonimage.py.
Using the example
1. Cube
Effect
2. Plane
Effect
3. Spherical
Effect
Effect
4. Parabolic
Effect
5. Multi-faceted body
Effect
6, Scattered points
Effect
See here, is not feeling Python is very powerful, is not a kind of want to try the impulse. But at present Pyray library only supports Python2, only partial function in Python3. Python3 's little Buddy will have to wait a while longer.
I have a public number, and I often share some of the stuff about Python technology, and if you like my share, you can search for "Python language learning"
Concern
Welcome to join thousands of people to exchange questions and answers skirt: 699+749+852
Python old driver takes you to play cool 3D rendering, cool!