Tag: Math
-
Coding Tutorial: 3D Gravity

Learn how to code 3D gravity in this coding tutorial using vectors and forces to move an object around a planet and jump between planets.
-
Coding Tutorial: Orbiting a Point in Space

Learn how to use polar coordinates to make an object orbit a point in space.
-
Drawing random shapes using probability in Processing

Learn how to use random numbers and probability to draw random shapes in Processing using the Java programming language.
-
Generating terrain in an infinite world

It would be impossible to hand craft an infinite world, so instead I generate a terrain sprite outside the camera viewport. I use the length of the camera and terrain rectangles, the direction the player is currently moving in and circles to position the terrain, so it is always just outside the viewport. Old terrain…
-
Snapping images to a grid in Processing

Learn how to draw a grid and snap images to the grid using Processing and Java. Easily portable to other programming languages.
-
Creating a spotlight effect in Shadertoy

This tutorial will show you how to create a animated spotlight effect in Shadertoy. You will learn how to animate the circle using time and a sine wave. So the circle moves back-and-forth across the screen.
-
Creating a simple vignette in Shadertoy

Creating a vignette shader effect in Shadertoy is easy and fun. You can learn to manipulate UV coordinates, create a circle function, and add ambient light to enhance the effect. Experiment with ambient light, circle position, radius, and smoothness to perfect your vignette. Start creating on Shadertoy and unleash your creativity!
-
A gentle introduction to Shadertoy

Learn how to create and share shaders online using the easy to use Shadertoy from scratch. No math or programming knowledge is required to complete this tutorial. This tutorial will teach you all you need to know to get started, so I encourage you to give it a go :)
-
How to create a shining coin using a shader

Learn how to create a stunning shining coin effect using a line segment SDF in a GLSL shader. Step by step instructions help you achieve a professional finish. Play with brightness and smoothing for your unique touch. Check out the examples for inspiration. Get creative and enjoy the process!
-
Simple edge detection shader using a kernel

This tutorial guides you in creating an edge detection shader using the GLSL shading language and a kernel. After duplicating the shader code from the previous gaussian blur tutorial, you adjust the kernel values to achieve the desired effect. The tutorial concludes with sample images. Happy coding!
