It’s a fairly specific question, but I don’t really know where else to ask it.
Situation outline:
I have created a menger sponge, but at an iteration stage of 3 or more, computer runs very slowly. So if I want to keep doing this in Python, I will have to optimize my code. I have now been working with the library Matplotlib and for my cubes I draw the 6 faces each time.
I was thinking that instead of drawing all the faces, I could draw only the outer ones, that you don’t draw the inner ones anymore. Like a cube, now take the cube at the bottom left front face, that only the bottom face, left face & front face are there and the others are removed.
Any idea how to do this?
I’m a beginner in Python… So I don’t know all the features, properties and things you can do with it, so that’s why I wrote this post in this chat. Thanks in advance!
submitted by /u/Resident-Taste8831
[link] [comments]
r/learnpython It’s a fairly specific question, but I don’t really know where else to ask it. Situation outline: I have created a menger sponge, but at an iteration stage of 3 or more, computer runs very slowly. So if I want to keep doing this in Python, I will have to optimize my code. I have now been working with the library Matplotlib and for my cubes I draw the 6 faces each time. I was thinking that instead of drawing all the faces, I could draw only the outer ones, that you don’t draw the inner ones anymore. Like a cube, now take the cube at the bottom left front face, that only the bottom face, left face & front face are there and the others are removed. Any idea how to do this? I’m a beginner in Python… So I don’t know all the features, properties and things you can do with it, so that’s why I wrote this post in this chat. Thanks in advance! submitted by /u/Resident-Taste8831 [link] [comments]
It’s a fairly specific question, but I don’t really know where else to ask it.
Situation outline:
I have created a menger sponge, but at an iteration stage of 3 or more, computer runs very slowly. So if I want to keep doing this in Python, I will have to optimize my code. I have now been working with the library Matplotlib and for my cubes I draw the 6 faces each time.
I was thinking that instead of drawing all the faces, I could draw only the outer ones, that you don’t draw the inner ones anymore. Like a cube, now take the cube at the bottom left front face, that only the bottom face, left face & front face are there and the others are removed.
Any idea how to do this?
I’m a beginner in Python… So I don’t know all the features, properties and things you can do with it, so that’s why I wrote this post in this chat. Thanks in advance!
submitted by /u/Resident-Taste8831
[link] [comments]