VGAclocks


Author Message
dddns
Guru

Joined: 20/09/2024
Location: Germany
Posts: 456
Posted: 01:02pm 05 May 2025      

Hello!

after taking some hours of sleep and doing some more life near things, I want to finish this now untill I can call it version 1.
As lizby stated right this all seems like pure playground but I think this is not.
For me it was more to get in touch closer with Pythagoras and finally we became friends just within this project. I was looking for something sense making in the graphical vector universe for which PicoMite seems to be made for. I discovered all these wonderful math commands and with open eyes I could read the beautiful mind of the developer who intended just this I think.

The project has grown and I made up my mind. I think this will be in the end a graphical creator/design GUI for vector graphic objects on which a complete object
can be arranged and designed and then it dumps all variables and a runtime version of the drawing routine in a file, which is a complete basic program with an empty main loop. So it will create itself. That's way to go but should be not that hard to do.

And coming back to lizby's statement, it could as well be easily a very small box with some hardware buttons which can be attached to an old 50" TV and it's a display for small stores, your private party or just sell it over ebay and there you go.
But _this_ is not my interest even though I'm poor!

Back to technique:

one cycle through the routine which draws one complete object takes about 100ms for a 600 diameter object

The memory consumption is so low that it runs on any PicoMite, with small modifications on a RP2040 with a LCD attached even though there are about 120 arrays
dimension-ed.

The only problem is the framebuffer which is needed to have a flicker free picture.
Now RP2350 with PSRAM is the only way to have a framebuffer at 800x600 with 16 colours. But PSRAM is slow so it increases the cycletime up to 200ms in total 300ms.

The numbers took almost a week for me to get them done correctly as they keep position and change text font and text scale according to the scale of the complete object. You can use your own font. Every number is a string and can be any printable charater. if you define it to "" then noting will be printed at that position.
Auto positioning can be configured to a static one of your choise as well as font and its scale.

Minute and second labels are polygons with 6 corners but symmetric on y
on each position. You have an outer polygon with the setup dimensions. This will be scaled by keeping the aspect ratio and is drawn again in the same center. This is done with all polygons as well for the up to 16 corned clock hands.
And/or you can draw circles at these positions.
So you can have up to 4 different colours on those sub-objects.
Every dimension including line width and every colour can be set in the database which is pretty structured now.

The alignment of almost all sub-object take place on a radius centered in objects center. Every sub-object has an y-offset which can be set in database and this is the radius they are aligned on.

The gauge start and end can be any 30 degree position on the clock. Every position again can have any labeling. This is done by choosing an existing one and add 100 to the object number. object 101 would be layout of clock 1 in terms of colour and dimension and be drawn in gauge style. The clock time string is used to set the parameters: "120:240:210" would be a scale from 10 to 2 o'clock and the gauge hand is the second and would have position 5min past the hour. Movement in scaled mode is seamless.

Every sub-object can be disabled by setting its colour to 16. If a coulor is set to 16 no part of code gets touched except for the if statements. I took special care that it is done as efficiently as for me and my knowledge possible.

and last but not least: every parameter stored in an array of cause can be altered by your code and effects immediately the next drawing e.g.some colour.
Edited 2025-05-05 23:55 by dddns