Search
51 results for “RodStephens”
-
Make an HSL-based LinearGradientBrush class for use with PIL in Python
https://rodstephensbooks.com/pil_hsl_linear_gradient_brush.html
-
Convert between RGB and HSL color models in Python
-
Prevent event cascades and easily update read-only Edit widgets in tkinter and Python
-
Verify Pick's Theorem in Python
This example uses techniques from four previous examples to use Pick's Theorem to calculate polygon areas relatively easily.
-
Find the shortest distance between a point and a line segment in Python
-
Determine whether a point is inside a polygon in Python
-
Draw a polygon while snapping its vertices to a grid in Python
-
Calculate the area of a polygon in Python
-
A small experiment with Claude and ChatGPT
This post asks ChatGPT and Claude to compare the broken window parable to a scene in the move "The Fifth Element."
https://rodstephensbooks.com/small_ai_experiment.html
#AI #ArtificialIntelligence #ChatGPT #Claude #GenerativeAI #TheFifthElement
-
Use Warnsdorf's rule to find a closed knight's tour in Python
-
Find a closed knight's tour in Python
-
Make a flash card app in Python
(Finally, the flash card app!)
-
Make a font dialog with Python and tkinter
A brief digression from the ongoing flash card series.
-
Fit an image to a target rectangle and center it in Python
(This is the first in a series of posts leading to a flash card application that you can use to learn about Japanese hiragana characters.)
-
Use PIL to make an analog clock out of cake slice images in Python
This somewhat silly example demonstrates several useful PIL techniques including image scaling, rotation, and pasting with a transparency mask.
-
Learn about numeric data types (and the number 998,001) in Python
The value 1 / 998,001 has an interesting property, but to see it in Python you need to learn about numeric data types.
-
Make buttons grow and shrink when the mouse moves over them with tkinter in Python
-
Make buttons grow and shrink when the mouse moves over them with tkinter in Python
-
Make buttons grow and shrink when the mouse moves over them with tkinter in Python
-
Add buttons to a row container made with tkinter in Python
-
Make a row container with tkinter in Python
A handy trick that's already part of tkinter.
-
Make an improved interactive unit converter with tkinter in Python
-
Make an interactive unit converter with tkinter in Python
-
Reflect images to make little flags in Python
-
Draw a filled chrysanthemum curve in Python
This example draws a pretty picture but the real interesting part is learning how to draw translucent colors on top of each other.
https://rodstephensbooks.com/chrysanthemum_curve_filled.html
-
Use Pygame to visualize bubble sort in Python, Part 2
This part explains how the program creates its sprites and runs its event loop.
https://rodstephensbooks.com/bubble_sort3.html
#Python #Algorithms #Pygame #Animation -
Use Pygame to visualize bubble sort in Python, Part 1
https://rodstephensbooks.com/bubble_sort2.html
#Python #Algorithms #Pygame #Animation -
Implement bubble sort in Python
This post introduces the bubble sort algorithm. My next post (or two) will use Pygame to visualize the algorithm.
https://rodstephensbooks.com/bubble_sort1.html
#Python #Algorithms #BubbleSort -
Use a color matrix to remove red, green, and blue color components from images in Python
https://rodstephensbooks.com/image_filters_v5.html
#Python #ImageProcessing #PIL #SepiaTone #Sepia -
Blur an area on an image in Python
https://rodstephensbooks.com/blur_area.html
#Python #Privacy #ImageProcessing #PIL #Drawing