+ 2
vpython
hi i would just like to know how do i use vpython here? and how can i get the actual diagram that i coded to show up and run Thanks! https://code.sololearn.com/WtPnzZ4tFvUN/?ref=app
2 Respostas
+ 4
Hi Batool
Sololearn's Python is console based, so there's no direct way of using graphics. But some of us have discovered clever ways to get them to work via web programs. For example, Burey showed us how we can use the turtle module via Skulpt on web.
https://code.sololearn.com/WnQZ0B7qvLjF/?ref=app
It appears that Kirk did something similar in the code you linked. I don't know how to do it, but perhaps Kirk Schafer can point you in the right direction?
+ 3
When I was exploring another way of embedding Python (turtle from trinket.io below), I found this 3D / VPython-related site and saw that it might be able to do sharables in various ways.
http://www.glowscript.org/docs/VPythonDocs/index.html
I believe I used trinket.io's integration with glowscript's site because the embedding from trinket was simpler, like:
Create a free account, save a code, copy the embed links.
Two demos:
https://trinket.io/glowscript (3D interactive box)
https://trinket.io/python (random graphics code)
Another version of that VPython 3D ring, +turtle using an iframe:
https://code.sololearn.com/W0ylF4Cfp6K1/?ref=app
https://code.sololearn.com/WTj6PC3737Cd/?ref=app