
Explore for and while loops in Python by iterating over lists and ranges. Use enumeration and indexing to modify lists, and control repetition with a counter.
Solve math problems with pure python using basics like variables, conditions, and loops. Tackle three exercises on divisors, fibonacci threshold, and moving zeros to end to build fluency.
Explore building a divisors function to find and print proper divisors, using integer division // to check up to n//2, with examples 1,2,3,4,6 and 248.
Explore a Fibonacci threshold search to find the last Fibonacci number below a threshold, using an iterative loop and break; recursion is optional but depth-limited.
Model a bank account as a Python class to illustrate OOP concepts like the init method, self, and attributes such as owner, balance, and interest rate.
Install modern GL and modern GL window, set OpenGL to 3.3, and enable vsync, program point size, and blending to support rendering in a window.
Create and render square cells on a grid by initializing parameters, preparing numpy arrays, compiling shaders, and updating buffers to handle movement and wall reflections.
Learn how a vertex shader defines a square cell in opengl glsl 330, using inputs, a resolution uniform, and passing color data to the fragment shader.
A correction.
Render ten square cell instances with a fragment shader and a single frag color output, using a vertex shader, while leveraging GPU parallelism and controlling point size in pixel space.
Create and animate square cell objects in python using modern GL window config, numpy random positions, and render them as points with color blending to show transitions and size changes.
Learn to implement a circle in modern GL using a fragment shader, handling solid and hollow circles by computing pixel distance, clipping with radius and thickness, and discarding nonconforming fragments.
Construct a 2d vertex shader with uniforms for frag colors and thickness, define start and end positions, and set gl position at the center using resolution.
Explore rendering thick lines in a fragment shader for modern GL by projecting a point onto a line, computing distance, and discarding fragments outside the thickness.
Master part four of a sandpile simulation in 2d generative python with primitive moderngl, importing sandpile, updating buffers, and rendering a grid of cells to visualize emergent patterns.
Explore how orbital patterns are created in 2d generative python, building lissajous models with differing angular velocities and drawing the line between two orbiting objects to visualize the motion.
Welcome to Generative Python: Arts and Maths with ModernGL. This course is designed for curious minds who want to bridge the gap between programming, mathematics, and visual creativity using Python and GPU-accelerated graphics.
We'll start from the absolute basics of Python—variables, loops, functions—and gradually move toward advanced topics like NumPy, object-oriented programming, and GPU rendering with ModernGL. Each section is filled with practical, project-driven exercises designed to help you learn by doing, not just watching.
You’ll build visually stunning and mathematically rich projects, such as sandpile simulations, Fourier drawing, and Perlin noise-generated continents—all while developing a solid understanding of shaders and real-time graphics.
This course is ideal for beginners with a basic grasp of Python or complete newcomers ready to explore coding through art and science. Whether you're a student, a hobbyist, or a developer looking to expand your creative skill set, this course will provide the tools and knowledge to bring your ideas to life on the screen.
No prior experience with graphics programming is required. You'll learn step-by-step, and by the end of the course, you'll be able to create your own GPU-powered visual simulations with confidence. I hope you will enjoy your stay and learn some ModernGL along the way!