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

Publicado el: 08 octubre 2022
en el canal de: 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


En esta página del sitio puede ver el video en línea Make a Rotating 3D chocolate Donut Using python vpython module | de Duración hora minuto segunda en buena calidad , que subió el usuario Akshaya H 08 octubre 2022, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 158 veces y le gustó 10 a los espectadores. Disfruta viendo!