[Python]: Basic drawing script

el01

King of Cable Management
Original poster
Jun 4, 2018
770
588
Hello all!
Here is my very barebones and very basic Python drawing script, potentially useful for basic 2d drawings of anything with lots of straight lines. Hope you like it!
http://py3.codeskulptor.org/#user301_SQe9434ET6_3.py

Notes:
Menu functions: STR means Store, RCL means recall, DEL means delete.
Render times are in seconds.
More documentation is inside the code.

-el01
 

el01

King of Cable Management
Original poster
Jun 4, 2018
770
588
Hello all!
Here is my very barebones and very basic Python drawing script, potentially useful for basic 2d drawings of anything with lots of straight lines. Hope you like it!
http://py3.codeskulptor.org/#user301_SQe9434ET6_3.py

Notes:
Menu functions: STR means Store, RCL means recall, DEL means delete.
Render times are in seconds.
More documentation is inside the code.

-el01
@Soul_Est
Does it work well enough to be considered "not trash"? I tried a couple different scenarios, not sure how it performs for you.
 

Soul_Est

SFF Guru
SFFn Staff
Feb 12, 2016
1,536
1,928
@Soul_Est
Does it work well enough to be considered "not trash"? I tried a couple different scenarios, not sure how it performs for you.
It works very well with the points that I entered. The coordinates were not given a numerical order though. They came up as 0, 0, 2, and 2. It still worked though. May have to try this in Chromium to see if it's the rendering engine.
 

el01

King of Cable Management
Original poster
Jun 4, 2018
770
588
It works very well with the points that I entered. The coordinates were not given a numerical order though. They came up as 0, 0, 2, and 2. It still worked though. May have to try this in Chromium to see if it's the rendering engine.
Thanks for the feedback! On Chrome, it seems to work for me, but I will try to see what may cause this issue.
 

el01

King of Cable Management
Original poster
Jun 4, 2018
770
588
@Soul_Est

Sorry if I am disturbing your day, but I tested it further in Chrome, and it worked fine. However, it would be nice if you could take a screenshot and send it to me so I could figure out what is causing the problem.


On the other hand, here is an updated version (which includes circle functionality, point definitions so you can see your points, and small improvements to the way information is displayed):
http://py3.codeskulptor.org/#user301_SQe9434ET6_4.py
 
  • Like
Reactions: Soul_Est

Soul_Est

SFF Guru
SFFn Staff
Feb 12, 2016
1,536
1,928
@Soul_Est

Sorry if I am disturbing your day, but I tested it further in Chrome, and it worked fine. However, it would be nice if you could take a screenshot and send it to me so I could figure out what is causing the problem.


On the other hand, here is an updated version (which includes circle functionality, point definitions so you can see your points, and small improvements to the way information is displayed):
http://py3.codeskulptor.org/#user301_SQe9434ET6_4.py
Not at all. Thanks for the update. I'll check it out after I get home from work and post a picture of what I get in Firefox.
 

GuilleAcoustic

Chief Procrastination Officer
SFFn Staff
LOSIAS
Jun 29, 2015
2,972
4,397
guilleacoustic.wordpress.com
I didn't read the script at all, stopped at while 1==1, but here are my 2 cents as an experienced developper:
  • please use a main function: def main
  • never use infinite loop (while true), leave the opportunity to end the program with something else than Ctrl-C or process killing.
Take a look at this prehistoric language called LOGO. This is basically what you are doing ;-)
 
  • Like
Reactions: el01

el01

King of Cable Management
Original poster
Jun 4, 2018
770
588
I didn't read the script at all, stopped at while 1==1, but here are my 2 cents as an experienced developper:
  • please use a main function: def main
  • never use infinite loop (while true), leave the opportunity to end the program with something else than Ctrl-C or process killing.
Take a look at this prehistoric language called LOGO. This is basically what you are doing ;-)
Will do tomorrow. Thanks!

I will name the "end" command "PURGE" because Ubuntu makes deleting programs fun ;)

@jtd871 If you want a rush of nostalgia, use Trinket.IO. You'll see what I mean after viewing some of their content.