[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] pen/geometry




On Mar 3, 2006, at 8:18 PM, kubick wrote:

I'm trying to make a circle w/ blurred edges.  I

I have yet to dig into Pen... and don't have the time no to run your code and start... but I recently did something similar in Processing.
(Presented at the Chicago chapter of Dorkbot as part of a talk where graphics were being controlled from SC via OSC).

I used a half-cosine function to increase the alpha channel (transparency) to 100% radiating outwards towards to the edges of my shape.
I don't know if Pen supports alpha channels, but you can prolly twiddle the math so that the final RGB values are the same as your background color for an equal effect.
I used a cosine vs. a linear function because linearly (say going evenly from 0 to 255) results in a shape that mostly matches the background color with only a little solid color in the center, whereas a cosine 'ramps up' quickly from the background color to the solid color... resulting in a shape that looks 'fuzzy' around the edges.

Good luck


::-:: ::-:: ::-::-::-:: ::-:: ::-::-::-:: ::-:: ::-::

Robb Drinkwater

http://www.splintergroup.com/rdrink/

::-:: ::-:: ::-::-::-:: ::-:: ::-::-::-:: ::-:: ::-::