5 Reusable Code Snippet Topics
Remove Filter
|
|
If you draw a series of close spaced shapes your eyes get fooled to see Moire patterns. Here is one example of this. |
|
You can draw a number of shapes directly on the PyGame window, and then save the drawing to an image file. |
|
If you draw shapes that are closely spaced and shifted, you can create interesting interference patterns, so called moire patterns. Here is an example using the Python module PyGame to do the drawing. |
|
circle.h [code] // // circle.h // defines the functions to draw circle. // #ifndef CIRCLE_H #define CIRCLE_H #include <windows.h> typedef struct tagCircle { int x; int y; int radius; } Circle; /* set the window handle */ void SetWindowHandle(HWND); /* set pixel @parms int x xposition @parms int y yposition … |
|
Python programming can have its lighter moments. Here we use one of those moments to draw an optical illusion using the Tkinter canvas to draw a rectangle, some lines and circles. |
The End.