[PD] Somewhat nice circles using data structures with anti-aliasing implementing Xiaolin Wu circle algorithm (vanilla)

Alexandre Torres Porres porres at gmail.com
Mon Dec 2 05:24:25 CET 2019


proof of concept


[image: Screen Shot 2019-12-02 at 01.14.53.png]

Em seg., 2 de dez. de 2019 às 01:21, Alexandre Torres Porres <
porres at gmail.com> escreveu:

> I guess if the goal is to design GUI objects, I should pretty much just
> learn how to properly code them with tcl/tk... it's the ideal situation
> anyway and I'm just sweating a lot to design things that will never be as
> good as having a proper GUI.
>
> As far as drawing circles for Data Structures, I don't see why it'd be too
> hard.
>
> But anyway, having circles is definitely cool and may allow us to design
> many interesting things. But for my purposes (designing a circular slider
> or a simple knob), I just realised there's a simple hacky trick, which is
> just having a dummy bang object in the background for a circular shape.
> It's lighter and even looks better.
>
> The only thingy is that you can't change the color of the circle line. So
> you can't do something like having a full background color of black and
> draw the circle line in white. But... if you work with only the background
> color of the circle and ignore the background of the out of bounds, then
> it's not a real issue.
>
> So I'm now thinking of doing that instead of this trick in order to make
> things lighter, and then I can also design a grid of several knobs together
> to implement a matrix grid.
>
> cheers
>
>
> Em dom., 1 de dez. de 2019 às 20:29, Alexandre Torres Porres <
> porres at gmail.com> escreveu:
>
>> I didn't implement a [knob], it's a two dimensional slider but the
>> boundaries are a circle, anyway, still working on it.
>>
>> I feel like implementing knob also and it'd be cool if I could implement
>> a grid of knobs to control a routing matrix, but then I think it'd be way
>> too heavy and impractical, so the best option would be to just have a way
>> to draw circles in Data Structures with a dedicated object.
>>
>> I see Purr Data has a [draw] object that draws circles and stuff, but
>> it's a whole different GUI language that we can't use, but we could use one
>> for vanilla.
>>
>> It's out of my league, but I hope someone else could propose the
>> inclusion of such object.
>>
>> cheers
>>
>> Em dom., 1 de dez. de 2019 às 12:55, oliver <oliver at klingt.org> escreveu:
>>
>>> Alexandre Torres Porres wrote:
>>> > Thanks very much for this, just used it to make a two dimensional
>>> > circular slider!
>>>
>>> did you include an extra dot for position reference in this ? would you
>>> mind posting your knob ?
>>>
>>> and yes: this is actually a very nice and beautiful circle rendering.
>>>
>>> but i also share alex' concern that it might be too "heavy" on PD's
>>> memory or the GUI if several of these knobs are present in a patch.
>>>
>>> can somebody give a brief prediction whether this is a practicable
>>> approach in a patch with let's say 50 knobs like this ?
>>>
>>> best
>>>
>>> oliver
>>>
>>>
>>>
>>> _______________________________________________
>>> Pd-list at lists.iem.at mailing list
>>> UNSUBSCRIBE and account-management ->
>>> https://lists.puredata.info/listinfo/pd-list
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20191202/139b222c/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2019-12-02 at 01.14.53.png
Type: image/png
Size: 32257 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20191202/139b222c/attachment-0001.png>


More information about the Pd-list mailing list