[sdiy] Pots vs Encoders, was Re: [sdiy] dave smith *instruments*
cheater cheater
cheater00 at gmail.com
Thu Feb 4 11:18:03 CET 2010
Ah of course, 'interpolation' is the word we were looking for here :-)
So in fact, Jerry, if I understand correctly what you said, you are
suggesting an algorithm similar to what I suggested above.
The problem I have with my algorithm is that what you mention works
well with infinitesimally small points, or at least points that are
much smaller than the image we are trying to reproduce. The diodes
here are actually bigger than the point they are simulating. So I
think we might have some sort of problems with the motion appearing to
be non-linear, or to put it differently, if the speed of the knob is
constant, then the speed of the point being interpolated would not
appear to be constant. However this cannot be properly tested without
a practical, working, example of the hardware in question :-) I am
happy we have come up with a consensus and a good enough algorithm.
Perhaps to go further we could consider something like this:
consider each led a square that is represented by an array of 8x8
points. Let's talk about 'meter bridge' style led strips to make it
simpler. So those arrays are lined up one next to each other, sort of
like this:
[][][][][][][][]
where each [] is a square diode.
Now let's consider the equations of the sort that you suggest:
when the point is between diodes 1 and 2:
for all m in {1, 2}:
for all k in {0, ..., 15}:
leds[m][k].luminosity =
distance_between_locations(leds[m][k].location, point.location)
/* leds is an array that contains the 8 leds.
Each led = leds[m] is a 16-element array of
brightness-point objects that has the properties luminosity
and location. */
for all k1, k2 in {0, ..., 15}:
leds[m][k1].luminosity = leds[m][k2].luminosity
/* the above is to constrain the leds to having
constant brightness. This is not *exactly* the
situation and I am sure that by using lenses
and some nice measurements we could come
up with an even better approximation. But if
we take a matte diode, it should be good
enough for basic needs. Of course, it would
be nice to have a much better approximation
in some final version of what ever we are
building here :-) */
I guess solving this system of equations would involve some sort of
linear programming exercise, which should become apparent right after
the formula for the distance-based location is simplified down to an
equation in k, and the point's x and y locations. I am sure that a
smart, simple algorithm could be synthesized from this approach.
D.
On Thu, Feb 4, 2010 at 02:26, Jerry Gray-Eskue <jerryge at cableone.net> wrote:
> This type technique is sometimes called dithering in graphics.
> Basically you use interpolation or vector math to determine the illumination
> level of each pixel, LED in this case.
> The illumination level is proportional to the tangent (I think that is the
> correct term) of the vectors distance to each led with the total light
> output a constant sum of the levels.
> With the total light output constant and the eye interprets the point source
> as between the LEDs.
> See the Relative Luminous Intensity vs. Forward Current chart in a Vishay
> Semiconductors LED data sheet for an example of the drive levels to light
> output function.
> The higher the resolution (number of LEDS) and closer the spacing of the
> LEDs the better the illusion works.
> With the light levels properly controlled the motion will appear steady.
>
> - Jerry
>
> -----Original Message-----
> From: synth-diy-bounces at dropmix.xs4all.nl
> [mailto:synth-diy-bounces at dropmix.xs4all.nl]On Behalf Of cheater cheater
> Sent: Wednesday, February 03, 2010 6:32 PM
> To: Tom Wiltshire
> Cc: Synth DIY
> Subject: Re: [sdiy] Pots vs Encoders, was Re: [sdiy] dave smith
> *instruments*
>
>
> Tom,
> hmm!
>
> This is a simple way of doing this:
> Say you have 16 leds and your knob scans to 128 values. Say you are at
> value = 0. Then, only the first led is turned on. For value = 1, the
> first led is at 7/8 and the second led is at 1/8. Then at value = 8,
> only the second led is lit. For value = 9, the second led is 7/8 lit
> and the third led is 1/8 lit.
>
> If you do that, as you are moving the knob, the point will seem to
> accelerate and slow down. This is because our algorithm of
> interpolation does not really correspond to the physical nature of the
> medium we are displaying on. I wonder if there is a best worked out
> way of doing this. I am sure this is a pretty basic technique in 2d
> graphics.
>
> Of course one way would be to scan the knob at a much higher
> resolution. Then you could correct the position of the virtual point
> by using a specific, 1-1 function. The question of what this function
> should look like is quite interesting, but I'm pretty sure it has been
> worked out already. Perhaps the specific form of the medium in
> question could require a much more general approach than is common
> with 2d computer graphics, which usually deal with raster graphics.
> Has anyone got experience with 2d graphics here?
>
> I will need to look into some weird new books to figure this out :-)
>
> D.
>
> On Thu, Feb 4, 2010 at 01:13, Tom Wiltshire <tom at electricdruid.net> wrote:
>> If you used PWM to control the brightness of the LEDs, the 'extra'
>> resolution would be the resolution of the PWM - 8 or 10 bit is easily
>> possible.
>>
>> You wouldn't be able to tell much beyond 16 or 32 levels though, I'd have
>> thought. The effect would just get smoother looking. Still, it's a good
>> idea.
>>
>> T.
>>
>>
>> On 3 Feb 2010, at 23:39, cheater cheater wrote:
>>
>>> I wonder what is actually the maximum bit depth available with this
>>> sort of approach. Anyone know what the accuracy improvement with this
>>> sort of... hmm.. how do we call this? Anti-aliasing? Interpolation?
>>>
>>> D.
>>>
>>> On Wed, Feb 3, 2010 at 21:26, Ingo Debus <igg.debus at t-online.de> wrote:
>>>>
>>>> Am 02.02.2010 um 15:22 schrieb Tom Wiltshire:
>>>>
>>>>> you typically get 15 or 31 LEDs around the ring, which is 5-bit
>>>>> accuracy
>>>>> at best
>>>>
>>>> Only if you allow only one LED lit at a time. If you allow one or two
> lit
>>>> (one = spot on, two = value is in between) you get almost twice the
>>>> resolution. If you can control the LEDs' brightness you can get even
>>>> more.
>>>>
>>>> Ingo
>>>> _______________________________________________
>>>> Synth-diy mailing list
>>>> Synth-diy at dropmix.xs4all.nl
>>>> http://dropmix.xs4all.nl/mailman/listinfo/synth-diy
>>>>
>>>
>>> _______________________________________________
>>> Synth-diy mailing list
>>> Synth-diy at dropmix.xs4all.nl
>>> http://dropmix.xs4all.nl/mailman/listinfo/synth-diy
>>
>>
>
> _______________________________________________
> Synth-diy mailing list
> Synth-diy at dropmix.xs4all.nl
> http://dropmix.xs4all.nl/mailman/listinfo/synth-diy
>
>
More information about the Synth-diy
mailing list