(not)Happy end of Sunday! And yes, just like the Boomtown Rats, I don’t like Mondays either.
A question was posed in a new post just a couple of hours ago, with a partial image of a new dial the author was working on, showing 7 days of the week on an arc of around 42 degrees, wanting to use an arrow on its side to show the day of the week. I started typing an answer and even created an inspectable test face to demonstrate, but by the time I finished typing the original author deleted the post.
So… I copied the answer and I’m pasting it here as a new post if anyone else can benefit from it. The lack of detailed expression/tag documentation (as usual ) for this relatively new expression further prompted me to paste my answer here.
Here’s an example you can inspect to see how the answer works, and obviously the proper answer for your situation depends on the exact angles you used for your week’s days. In this test example, the days of the week are precisely laid out (from the center of the dial) in 7 degree steps, so the entire scale of the week runs from -21° for Sunday to +21° for Saturday, so the week goes through 42° total. The weekday arrow here is also properly centered to the dial, and its rotation is calculated using 42 as the “size” value and -21 as the “offset” value. The “current” value is the day of the week number and its min/max are 0 and 6. You can use the relatively new interpDial(current, min, max, size, offset) expression:
(interpDial(#DOW#, 0, 6, 42, -21))
In the case of this test, the arrow is a 1000x1000 PNG image with a transparent background, same exact size as the dial image itself, so both of their centers are at x=160 y=160. The weekdays are precisely 7° from each other, centered on the dial’s center, with WED at the vertical center of the dial.
The image files I used:
5 Likes
Thanks - bookmarked - you and other contributors are what makes this community so great!
2 Likes
Yeah .I got the same enquiry as a DM . We used to do that at work .Ask 3 Makers how to make someting if you want Three Different answers .
Jolly Nice work @kourosh as Always . As @BIELITZ has said .A special thanks for a Bookmark able piece of work ::::)))
1 Like
Well, in this case there’s at least 2 different answers!
(interpDial(#DOW#, 0, 6, 42, -21))
((#DOW#*42/6)-21)
Frankly, #2 is a shorter answer!
2 Likes
It is Great to see a Master illustrating an example of the operation of one of the new ( Voodoo ) Tags . Thank You :::)))
Here is an old face of mine with days, month and AM/PM hands, inspection open…
but yes, need to check out interpDial function…
4 Likes
I’m quite the amateur with Facer and its limitations, picking up on this and that as I come along.
But in another life back in my programming days… it was different. You brought up my vintage pride and I needed to find a photo I had posted, buried deep in 10+ years of Facebook posts: a homemade award I was presented at work sometime 1989-90… took me 2 hours to find. I miss some aspect of those days, particularly the freedom to program with all flexibility, although in the case of the micro in the photo, programming in a mere 4096 bytes of code space using a mere 192 bytes of RAM has long been utterly laughable. This micro, as implemented in that company’s products, ran at a breakneck speed of precisely 1.7897725MHz. (quadruple that and google it to see why)
Meanwhile it’s 2:52am and I can’t sleep because my stoned-out-of-his-skull idiot neighbor is singing and yelping at the top of his lungs.
2 Likes
We had EPROMS when I was playing with Psion Organisers . We had a parallel port on them and the only Assembler I ever did was to PEEK and POKE the PORT . I can not remember the chip but i am sure it was a HITACHI one . I had to debug the manual I got hold of to get the job done . I think the whole Thing was about 8 lines of Code . Never Again . We used them for timing special effects for a bit . The timings were entered in BCD not that Popular with the lads. :::)))
BTW Congratulations on your award all that time ago .
That Chip should be Cleared by now.
2 Likes
Hitachi 6301, a clone of the Motorola 6801 with the same basic architecture and instruction set, which in turn is the core of the micro in the photo which added built-in EPROM, RAM, serial and parallel interfaces. Hitachi had a low power clone of that one too, and instead of built-in EPROM it actually had a piggyback socket right on it to plug an EPROM directly into it. Hitachi HD68P01V07 Processor 680x 1MHz 8-Bit CPU Piggyback Ceramic DIP40 MCU | eBay
1 Like
Yeah . The Psion Organiser had two sockets for the Chips . I did a lot of my early Programming on a Two line screen . Thanks for the Reminders .
1 Like