graphics

How to make games that use graphic instead of text?

How to make games that use graphic instead of text? Question: Hi I was wondering if anyone could answer my question, how would I go about making a game with graphics in python instead of text based games. I’m only new though so if it involves another programming language then I’m probably can’t do it …

Total answers: 2

Move origin from center to top left corner in Python turtle?

Move origin from center to top left corner in Python turtle? Question: I want the top left corner to be the reference point (0,0) and the origin represented by other coordinates (x>0, y>0). Asked By: user8193156 || Source Answers: You can change coordinates using turtle.setworldcoordinates(llx, lly, urx, ury) Documentation: https://docs.python.org/3.0/library/turtle.html#turtle.setworldcoordinates Answered By: custom_user didn’t solve …

Total answers: 2

3D *.stl surface model convert to 2D image stack?

3D *.stl surface model convert to 2D image stack? Question: OK to start with let me be clear, I am not interested in converting an image stack into a 3D model. I have an *.stl file (a triangulated surface mesh) & I would like to slice it back into an image stack. I’ve had a …

Total answers: 3

Animating "growing" line plot in Python/Matplotlib

Animating "growing" line plot in Python/Matplotlib Question: I want to produce a set of frames that can be used to animate a plot of a growing line. In the past, I have always used plt.draw() and set_ydata() to redraw the y-data as it changed over time. This time, I wish to draw a “growing” line, …

Total answers: 1

Is it possible to change turtle's pen stroke?

Is it possible to change turtle's pen stroke? Question: I need to draw a bar graph using Python’s turtle graphics and I figured it would be easier to simply make the pen a thick square so I could draw the bars like that and not have to worry about making dozens of rectangles and filling …

Total answers: 5

Python Turtle Graphics Window only Opens Briefly then Closes

Python Turtle Graphics Window only Opens Briefly then Closes Question: I have recently begun using the turtle module in Python, and I admit, I am a complete novice. I have been having trouble getting the graphics window in which the turtle does its drawing to stay open. Even when I try to run something as …

Total answers: 7

How to visualize a hidden Markov model in Python?

How to visualize a hidden Markov model in Python? Question: I think the question is clear enough. I want to make a hidden Markov model in Python and draw a vizualization model of it. So, it’s something like this picture: Is there any module to do that? I’ve googled it and found nothing. Asked By: …

Total answers: 3

Saving images in Python at a very high quality

Saving images in Python at a very high quality Question: How can I save Python plots at very high quality? That is, when I keep zooming in on the object saved in a PDF file, why isn’t there any blurring? Also, what would be the best mode to save it in? png, eps? Or some …

Total answers: 5

How to speed up python's 'turtle' function and stop it freezing at the end

How to speed up python's 'turtle' function and stop it freezing at the end Question: I have written a turtle program in python, but there are two problems. It goes way too slow for larger numbers, I was wonder how I can speed up turtle. It freezes after it finishes and when clicked on, says …

Total answers: 3

Ray and square/rectangle intersection in 3D

Ray and square/rectangle intersection in 3D Question: Hei. Are making a game and are looking for a ray intersection onto a square or a rectangle only in 3D space. Have search the web and found many solutions but nothing i can understand have a line and line segment intersection script in 2D but i cant …

Total answers: 3