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

Показать описание
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)
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)
Комментарии