Hello, world!
We introduce the Taichi programming language through a very basic fractal example.
Running the Taichi code below (python3 fractal.py or ti example fractal) will give you an animation of Julia set:
https://github.com/yuanming-hu/public_files/raw/master/graphics/taichi/fractal.gif
# fractal.py
import taichi as ti
ti.init(arch=ti.gpu)
n = 320
pixels = ti.field(dtype=float, shape=(n * 2, n))
@ti.func
def complex_sqr(z):
return ti.Vector([z[0]**2 – z[1]**2, z[1] *z[0] * 2])
@ti.kernel
def paint(t: float):
for i, j in pixels: # Parallized over all pixels
c = ti.Vector([-0.8, ti.cos(t) * 0.2])
z = ti.Vector([i / n – 1, j / n – 0.5]) * 2 iterations = 0 while z.norm() < 20 and iterations < 50:
z = complex_sqr(z) + c
iterations += 1
pixels[i, j] = 1 – iterations * 0.02
gui = ti.GUI(“Julia Set”, res=(n * 2, n))
for i in range(1000000):
paint(i * 0.03)
gui.set_image(pixels)
gui.show()
Taichi (Tahex) 0.7.1 has been published as a programming language designed for high-performance computer graphics.

This version is updated as follows:
Highlights
- Bug fixes
- Fixing some missing actors, for example rlshift。
- CUDA backend
- Support for NVIDIA RTX 3000 series GPUs
- Language and syntax
- Add ti.loop_unique(val) to improve atomics disposition
- Type system
- Is_primitive and recreate the private check
未经允许不得转载:萌萌Apprentissage » PythonTaiichi Taipei Artificial Intelligence Tensoflow Graphic Processing
Python batches to extract mainstream search engine pictures
Python's word crawling across 100 degrees.
Selenium with Tor Browser using Python
I'm gonna get you a new one, shell.cloud.google on the line.
run crontab with python selenium tor browser display in linux
Lineux Environment Use python to call the ter browser random browser web page