Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Drawing circles - LED matrix

Status
Not open for further replies.

atferrari

Well-Known Member
Most Helpful Member
Given a matrix of LEDs (vertical columns / horizontal rows) I plan to draw circles with extreme LEDs staying from 1 to 8 positions from the center (shown in gray).

I came with these 8 distributions and believe they are the best approach to a circle. For eventual reference, consider the start at the top, in the column containing the center position albeit the circle is "drawn" on/off at once. Any could coexist with one or more, always concentric.

Point in question is the number / relative position of the LEDs to the center. Distance between rows / columns is fixed so out of question.

Comments appreciated.

Circles 1 to 8 - standard matrix.png
 
If you can control brightness of individual LEDs, you can do anti-aliasing, which should considerably improve the results.
 
If you can control brightness of individual LEDs, you can do anti-aliasing, which should considerably improve the results.

Hola North,

Gracias for replying.

Brightness control was in my plans but actually as part of some effects (undefined yet).

Could you elaborate briefly?
 
Could you elaborate briefly?

You light the pixels with different brightness to create an appearance of a smooth circle. Pixels directly on the circle are full brightness, pixels outside the circle are dark. Pixels on the border have intermediary brightness.

Copy a letter from your screen, paste the picture into paintbrush and magnify as much as you can. You will see pixels of different brightness (neglect the colors). This is how they make letters look smooth on a pixelated display.
 
Could you elaborate briefly?
In this case; There are four LEDs that are a long distance from another. North, South, East, West.
There are four pair of LEDs that should have the brightness reduced. They will appear too bright.
upload_2016-7-24_9-29-10.png
 
You light the pixels with different brightness to create an appearance of a smooth circle. Pixels directly on the circle are full brightness, pixels outside the circle are dark. Pixels on the border have intermediary brightness.

Copy a letter from your screen, paste the picture into paintbrush and magnify as much as you can. You will see pixels of different brightness (neglect the colors). This is how they make letters look smooth on a pixelated display.

Got it, North. What they do with certain fonts in printers. Don Lancaster's explanations was the 1st time I read about that.

In my case I did not relate it to my circles; I expected to go away with the thinnest possible lines. For that type of smoothing I will need thicker "strokes". Food for thought. Now aware of Xiaolin Wu as well.

Gracias NG.
 
In this case; There are four LEDs that are a long distance from another. North, South, East, West.
There are four pair of LEDs that should have the brightness reduced. They will appear too bright.
View attachment 100578

Yes Ron. A simpler alternative to the smoothing suggested by NorthGuy. A simpler algorithm as well!

Gracias for replying.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top