Windows application

65 views
Skip to first unread message

Ren Kow

unread,
Apr 6, 2022, 8:29:46 AM4/6/22
to Glowscript Users
Hello everyone! Is there some instructions about making a window application with vPython? I want to make a soccer free kick simulation. Pressure time and location of cursor on the ball(i'm using computer mouse) defines power of shot and direction

Bruce Sherwood

unread,
Apr 7, 2022, 1:46:22 PM4/7/22
to Glowscript Users
Not sure what you mean by "a window application". Could you please explain?

Bruce

Ren Kow

unread,
Apr 7, 2022, 2:10:24 PM4/7/22
to Glowscript Users
maybe something like this:
четверг, 7 апреля 2022 г. в 20:46:22 UTC+3, Bruce Sherwood:

Bruce Sherwood

unread,
Apr 7, 2022, 2:19:21 PM4/7/22
to Glowscript Users
Perhaps the author of that program, "perhhg", will comment on how he designed that presentation.

Note these instructions from the section "Share or export this program":
  • You can publish a link to https://www.glowscript.org/#/user/Bruce_Sherwood/folder/Examples/program/0a. Anyone can run the program here at glowscript.org, or view its source, without having to sign in. The program must be in a public folder, not a private folder.
  • You can publish a link to an entire public folder: https://www.glowscript.org/#/user/Bruce_Sherwood/folder/Examples/.
  • Export: you can embed the program, including from a private folder, directly in your own web page, using the HTML code provided below. If your page already uses jquery, you should delete that <script> tag.
  • Another option is to save the HTML code shown below in a file ending in ".html", then doubleclick the html file and it will run in your browser.
  • Or simply clickDownload as HTML and then double-click the downloaded file to run it.
  • You can also place the html file in an iframe portion of a web page by placing in the html of the web page a statement like this :
        <iframe src="test.html" width="320" height="340"></iframe>
    where "test.html" is the location of the program relative to the location of the iframe statement, and where the program has a canvas somewhat smaller than 320 by 340.
Here is an example of an exported Web VPython program embedded in a Wordpress document:


Bruce

Ren Kow

unread,
Apr 10, 2022, 6:18:56 AM4/10/22
to Glowscript Users
Thank you for the answer! One more question, is there any possibility to embed 3d VPython animation in PySide windows or something like that?(for example, i'm working in PyCharm)

четверг, 7 апреля 2022 г. в 21:19:21 UTC+3, Bruce Sherwood:

Bruce Sherwood

unread,
Apr 11, 2022, 8:15:27 PM4/11/22
to Glowscript Users
I know nothing about PySide and PyCharm.

Bruce
Reply all
Reply to author
Forward
0 new messages