Python Draw Circles, Ellipses and Spiral Animation and source code - Lesson 1

preview_player
Показать описание
Join this channel to get access to the source code for all lessons (choose Platinum level for Python and Artificial Intelligence and any other level for Java, Javascript and Transcript):

Source code for Python applications.
See Python in action and run the source code on your computer
Learn to Paint in Python by creating animation with geometrical objects
Draw Circles, Ellipses, and Spiral in JavaScript with source code

Lesson 2 (contains source code for Lesson1 and Lesson 2 - The Spiral Draw)
Link to source code inside the description of Lesson 2

This lesson provides an introduction to drawing circles, ellipses, and spiral animations using Python, focusing on basic concepts and practical code implementations.
Key Points
1. Comments in Python:
- Use the pound notation (`#`) to create comments. These are not executed by the computer but help humans understand the code.
2. Using Pyplot:
- Pyplot is a drawing library used for showing charts and geometrical objects.
- The drawing area, or canvas, is defined with a size of 1000x1000 pixels.
3. Functions:
- Functions help eliminate duplicate code and encapsulate functionalities.
- Example functions:
- To get the canvas width.
- To get the canvas height.
- To get the radius of the drawing on the canvas.
4. Drawing Elements:
- Prepare data for line plotting.
- Draw lines between two points received as parameters.
- Get the plot area's axes.
5. Creating and Adding Circles:
- Create a yellow circle with a radius of 75, centered in the plot area. The alpha parameter sets a transparency of 40%.
- Add the yellow circle to the plot area.
- Create and add a red circle to the plot area. These circles will animate around the plot area's center.
6. Border and Coordinates:
- Define a border for the drawing.
- Retrieve the x and y coordinates of the canvas center.
7. Drawing Lines and Additional Circles:
- Create two points for each line and draw the line between them.
- Repeat the process to draw additional lines.
- Create and add a blue circle to the plot area.
8. Displaying the Plot:
- Show the plot area to the user.
9. Next Steps:
- The source code for the spiral drawing application is provided in Lesson 2, accessible via a link in the description of the video.
This lesson provides the foundational steps to understand and implement basic geometric drawings and animations using Python's Pyplot library.

Learn Python, Paint, Draw, and Animation
Enjoy!

(python spiral lesson1 v1 1)
Рекомендации по теме
Комментарии
Автор

All Source Code on Members Community link (use JOIN button to see the links)

DorinIonescu
Автор

Lesson 2 and source code (for Lesson1 and Lesson 2 - The Spiral Draw)

DorinIonescu
Автор

Programming Languages Courses for Python, Java, JavaScript, TypeScript. Access to source code and advanced lessons like Animation of a Sphere and a Spiral. Learn to draw complex geometrical objects in four languages with a promotional price of 1$ (available for a limited time).
For what other programming languages or geometrical objects do you need courses?

DorinIonescu
Автор

Hello friend nice imformation thank you for this sharing👋🤝💛

dodznb