5 Reusable Code Snippet Topics

Remove Filter
Member Avatar for
Member Avatar for vegaseat

If you draw a series of close spaced shapes your eyes get fooled to see Moire patterns. Here is one example of this.

2
2K
Member Avatar for vegaseat

You can draw a number of shapes directly on the PyGame window, and then save the drawing to an image file.

3
5K
Member Avatar for vegaseat

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.

2
725
Member Avatar for NicAx64

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 …

2
484
Member Avatar for vegaseat

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.

2
626

The End.