Make a Rotating 3D chocolate Donut Using python vpython module |

Veröffentlicht am: 08 Oktober 2022
auf dem Kanal: Akshaya H
158
10

To do this firstly we want to install vpython module
_______________

pip install vpython

By typing above line in the terminal you can install the vpython module

code
_____


from vpython import *
canvas(background= color.black)
top = ring(radius=0.4, thickness=0.24, color=vector(1, 1, 0))
choco = ring(radius=0.55, thickness=0.25, color=vector(0.4, 0.2, 0))
radius = 0
while True:
rate(30)
top.pos = vector(4*cos(radius), sin(radius), 0)
choco.pos = vector(4*cos(radius), sin(radius), 0)
radius = radius + 0.01


You can try with different color and different angles 😊

#pythonprogramming
#shorts
#python


Auf dieser Seite können Sie das Online-Video Make a Rotating 3D chocolate Donut Using python vpython module | mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Akshaya H 08 Oktober 2022 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 158 Mal angesehen und es wurde von 10 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!