RSS Amplifier

Fun Programming

148. Drawing shapes with glow or shadow

0
Sign in to vote or save

funprogramming.org

148. Drawing shapes with glow or shadow

By drawing the stroke of a shape multiple times with low opacity we can easily achieve glows and shadows. A simple concept that can produce good looking images. Here some examples: http://hamoid.tumblr.com/post/76579918775/84932-jpg-34758-jpg-and-49862-jpg-as-saved-by

Tip: the darkness of the shadow or glow should not decrease in a linear fashion (like 8, 6, 4, 2) or it will not look too real. That's why I used distances like 2*2, 3*3, 4*4 and 5*5. I'll try to record an episode in the future about linear vs exponential and other interesting curves. Meanwhile here you can find information about curves at: http://www.robertpenner.com/easing/

Tags: glow, shadow, stroke

Code editor

You can make changes to the code below. Then

Questions and comments

Read the original on funprogramming.org

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.