Turtle Graphics Experiments on Python

in Programming & Dev4 months ago (edited)

I've been studying Python's Turtle Graphics for the past few days. It was really new to me because I had only recently encountered it for the first time. I'd like to note that I've only been studying and using Python for the past three weeks. Given that our professor's subject was Java, I picked up the minimum necessary by watching videos on YouTube. We've already covered HTML, CSS, C++, and Java. But if there was something else, I could learn, I didn't want to focus on what we had just learned.

An image edited in Canva. The original image was from yours truly.

There are many different programming compilers available, however, for Python I chose PyCharm. A Python-specific Integrated Development Environment (IDE), PyCharm offers a wide range of crucial tools for Python developers. These tools are tightly integrated to produce a practical environment for effective Python, web, and data science development. PyCharm has three editions available: Community, Professional, and Edu. I installed the Community since I cannot afford to buy the Professional.

A shiruken with a spiral color in the middle.

A turtle was used to design the desired shapes, lines, and colors to create the image. Every time I finished the entire code, it was enjoyable to code, create, and run. Basically, several instructions like import turtle, import colorsys, forward(), left(), and right() can be used to create turtle graphics (). By using the commands pendown() and penup, you may also manage the turtle pen (). Use color(), fillcolor(), begin fill(), and end fill to then alter the color().

A simple shiruken that I would like to edit as a dragon.

Actually, I was trying to make a good shuriken, but I was always failing. If you look closely, the faulty shuriken in the first picture had a spiral color on it, but not in this one. He was pretty talented at coding, but he didn't explain how he produced things the first time I copied his programs on YouTube, where I was learning. I had to conduct research on other websites that provided explanations of various functions.

A snowflake-inspired output.

Perfecting a shape was challenging, especially when the desired result was not appearing. Despite the fact that you can enter and navigate the commands, it was not the issue at hand. I had difficulty getting the form and size just as I had imagined. It was the snowflakes in this case. The proper number for left(), right(), and range() truly baffled me. Maybe it was because my understanding and experience with turtle graphic instructions were still quite inadequate. My results are actually quite good considering that I've just been learning turtle graphics for three days.

A spinner-inspired output from my sister's stuff.

You might be able to understand more complex shapes if you learn the fundamental shapes. It's because I created more complicated shapes by combining simpler ones, and yes, it was my pattern. In my sister's room, I noticed a spinner that she had purchased in the past. I was drawn to the shape, so I tried to replicate it using Python. Since I already had the fundamental form, I couldn't say if I was successful or unsuccessful. The lines simply won't bend the way I want them to. I'll thus let it go.

It's spiderweb-inspired, but I don't like spiders.

Even though I was startled to the core earlier today while feeding my rabbits at the back of our house by a massive spiderweb, my thoughts were racing over the forms for turtle images. I then developed a new example using that as a model. To be quite honest, I struggled to create something that looked like a spiderweb. In addition to the complicated design, I am unsure of the range of the webs and the number of lines I should write. Anyway, after a half-hour of experimenting, I succeeded! Could you please react to it honestly? Does it resemble a web of spiders?

It's a flower-inspired design with big petals.

This is what I came up with when I tried to create a flower with six petals. But I don't think it looks well. However, I simply appreciated it since I worked hard to create a decent shape like this, which is difficult given where I am in my development. Add another spiral color and a solid circle to the middle, please. But the more I tried previously, the more I was at a loss for what to do.

A doughnut-shaped failed design, but it looks like a space hole.

So, I recently had a quick interaction on a chat with @ayane-chan. Some of my samples and experiments were forwarded to her. She next requested that I draw a doughnut shape for her. I have made multiple attempts to create a smaller hole in that shape but was never successful. The rest will also alter if the size increases. It was obvious that I was unable to create such a precise shape at this time. I decided to try to fix it tomorrow because I was already experiencing head-spinning sensations.

Python with Turtle Graphics gave me a new way to appreciate coding. In fact, because I was finding it difficult to digest all the knowledge we covered in class at once, I utilized this Turtle to help me relax while I was coding Java. My younger sister was begging for additional forms like hearts, hexagons, and rectangles since she liked the ones I made. I informed her, though, that I had to learn it first and that she would have to hold off on seeing it for at least a few days.

Sort:  


The rewards earned on this comment will go directly to the people( @dennnmarc ) sharing the post on Twitter as long as they are registered with @poshtoken. Sign up at https://hiveposh.com.

Even though napag aralan namin to before, most of them is limot na talaga. I wish I can go back there to remember it all. Masaya sana ang coding ee if di lang ako tamad noon lol. Way to go denden 💪✨

Really? That was so nice! So it means you took a subject related to this before? That's awesome @ruffatotmeee. Yeah, I guess coding is suitable for you if you're not lazy to code since you are investing time.

Ibang level to ng art ahhh,nice work.

It was fun creating these shapes and arts. On the other hand, quite stressful since I was learning it just recently. I appreciated it kuya.

What do you do with these shapes?

!1UP

Oh, I actually took an interest in Turtle Graphics using Python and I had so much fun. It was an experiment @gwajnberg. Thanks so much!

Nice designs Den. The color combi are perfect too. May talent ka pla 😊

Awieee. Thanks so much ate Jane. Ngayon lang talaga ako nagshashare ng mga ganitong stuff. Nahihiya kasi talaga ako since I'm new to this kind of art designs.

Kpg makabili ako laptop. Gawin ko rin to hehe

Ang ganda ng mga color combinations. They are all attractive and appealing to the eyes! Sana matutunan ko din yan.

The colors are based on HSV_RGB, I don't add command specific to colors to some of these. I just let what the colors will come to become exciting. Thus, I'm suck at making a color combo.

You used python to create these designs? That's very impressive! This is the first time I am actually coming across something like this, well done

Yes, bro. Isn't it fun and creative? I love the colors and designs. But it's hard to figure out the right numbers of turns to create a specific art. Trial and error, always. Thanks!

I always thought na ang Phyton will be just drag and drop stuff but never knew that you can also do such.

Galing, this can be called an art too via a different medium. The fidget spinner's lit btw. Pero parang pinaka maganda ay yung doughnut. Simple colors lang at di ganun kasakit sa mata.

More of these and share the codeee!

Yeah, but there are a lot of things you can do in Python. I was actually surprised about this Turtle Graphics since this was actually intended for kids. Yet, it was pleasing in our eyes too.

Love the doughnuts, too. But I'll try to fix it since the hole is too huge for me. Thus, the color combo is just okay. Lol! Actually kuya, I plan to share the codes, but it's long. If I share at least one, but I saw that it'll take a lot of words. I'll insert the codes next time.

Wow the art of codings hehe.

I was impressed how the lights and shaped formes a beautiful eye less spots but I wondered is this only for shapes? How about names and logo? Could also have the opportunity to have one?

Sorry no idea about it for now bro, so I asked questions. If there will be uwuu make something with my name haha. Morning...

1UP-PIZZA.png

You have received a 1UP from @gwajnberg!

The @oneup-cartel will soon upvote you with:
@stem-curator
And they will bring !PIZZA 🍕.

Learn more about our delegation service to earn daily rewards. Join the Cartel on Discord.

Thanks for your contribution to the STEMsocial community. Feel free to join us on discord to get to know the rest of us!

Please consider delegating to the @stemsocial account (85% of the curation rewards are returned).

You may also include @stemsocial as a beneficiary of the rewards of this post to get a stronger support. 
 

Congratulations @dennnmarc! You received a personal badge!

You powered-up at least 10 HIVE on Hive Power Up Day!
Wait until the end of Power Up Day to find out the size of your Power-Bee.
May the Hive Power be with you!

You can view your badges on your board and compare yourself to others in the Ranking

Check out the last post from @hivebuzz:

Be ready for the 10th edition of the Hive Power Up Month!
Hive Power Up Day - October 1st 2022
Support the HiveBuzz project. Vote for our proposal!

Thank you for sharing this amazing post on HIVE!

Your content got selected by our fellow curator tibfox & you just received a little thank you upvote from our non-profit curation initiative!

You will be featured in one of our recurring curation compilations which is aiming to offer you a stage to widen your audience within the DIY scene of Hive.

Make sure to always post / cross-post your creations within the DIYHub community on HIVE so we never miss your content. We also have a discord server where you can connect with us and other DIYers. If you want to support our goal to motivate other DIY/art/music/gardening/... creators just delegate to us and earn 100% of your curation rewards!

Stay creative & hive on!

Wow. These are very nice designs.
This is the first time I'm actually coming across someone that uses Turtle. I know of similar libraries like Tkinter, but it's nice to see that one can do lots of cool stuff with Python other than lists and functions. 😅

I'm also learning Python and like you, I'm also documenting my learning process here on Hive.
Wish you the very best in your programming journey and I'll be looking forward to reading more of your posts.