It is currently March 28th, 2024, 11:51 pm

[reloaded] I am struggling with RoundLine

Get help with creating, editing & fixing problems with skins
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am

Re: [reloaded] I am struggling with RoundLine

Post by Mor3bane »

eclectic-tech wrote:... you were adding a Rad value to a Rad value calc...).
I added those values to create (without the correct formula since i cant figure it out) the gap between the arcs.
Untitled.jpg
You do not have the required permissions to view the files attached to this post.
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself - be amazing at it

The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
User avatar
FreeRaider
Posts: 826
Joined: November 20th, 2012, 11:58 pm

Re: [reloaded] I am struggling with RoundLine

Post by FreeRaider »

Sincerely, I do not understand your goal.

What does that golden color mean? And green-ish one?
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am

Re: [reloaded] I am struggling with RoundLine

Post by Mor3bane »

FreeRaider wrote:Sincerely, I do not understand your goal.

What does that golden color mean? And green-ish one?
The circle that looks like a clock is meant to be a visual measure of a 24 hour clock - with 24 divisions rather than 12.

00:00 am is at the bottom.

So, 06:00 am is on the left (moving clockwise just to have some resemblance to a standard clock) - and 18:00 pm is on the right, and 12:00 pm is at the top (to resemble the daytime paradigm of the sun being above us - or at the top).

Yellow-ish is the daylight "arc" covering the period of time - "on the dial-face" from sunrise to sunset.

Green-ish is the night "arc" covering the period of time - "om the dial-face" from sunset to sunrise.

I have heaps of meters using roundline in my suite. To appear more attractive (imo) there is a "gap" between arcs in every one I've done up.

So, I am trying to do the same thing in theory as this: https://forum.rainmeter.net/viewtopic.php?t=21478 only using roundline as an arc rather than a pie wedge (that example just confused me more btw) to show day and night on a "sundial"

Making only one half according to "the math" isn't what I am attempting to figure out as I hopefully explained above.

So, in the rmskin i attached on page 2 there are two Calc measures - one of them works correctly: [MeasureTimeUp] that eclectic-tech help with.

The other: [MeasureTimeDown] is my failed attempt at creating an accurate night arc - with the pedantic "gap" between the arcs of day and night, on the 24 hour clock dial.

The way I added a Rad to a Rad was to find aa way to illustrate the intended final result, rather than a true example of what I hoped to achieve.
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself - be amazing at it

The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5384
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: [reloaded] I am struggling with RoundLine

Post by eclectic-tech »

I will look at this later today and see if I can get your desired effects; it is definitely possible, but I can't look 'til later...

FreeRaider may beat me if he is so inclined ;-)
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5384
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: [reloaded] I am struggling with RoundLine

Post by eclectic-tech »

Hi Morbane!

Aside: (Yeah, all the files were in your package... I just didn't look close enough!) :oops:

Here is updated code that will display the sun up and sun down as arcs with some separation.
To determine the sun down percentage formula, I subtract the sunset time from midnight (1440 minutes), then add the sun rise time.
To get separation on the arcs, I fudged to start angle and rotation angle values. You can play with those to get a different separation. :)
I modified the 24 hours arc, making it thinner... looks better but you may be doing something else.
Sun Circle.png
(Put some notes in the code to remind us what is happening...)

Code: Select all

[Rainmeter]
Author=Morbane
Update=1000
Group=Big

[Variables]
@include=#@#RoundVariables.inc
Color=#GlobalFontColor#
Font=#GlobalFont#
ColorZ=#ColorOffset#
Wreath=#WreathColor#
Goth=#Gothic#
FreeColor=#Free#
UsedColor=#Used#
LocationCode=#GlobalLocation#
Units=c
WebParserSunRiseSet=<sunr>(.*):(.*) (.*)</sunr>.*<suns>(.*):(.*) (.*)</suns>

[Background]
Meter=Image
ImageName=#@#Background.png

[MeasureParent]
Measure=WebParser
URL=https://wxdata.weather.com/wxdata/weather/local/#LocationCode#?cc=*&unit=#Units#&dayf=1
RegExp="(?siU)#WebParserSunRiseSet#"
;Debug=2

;===== MeasureSunrise/set ======;

[SunriseHour]
Measure=WebParser
URL=[MeasureParent]
StringIndex=1

[SunriseMin]
Measure=WebParser
URL=[MeasureParent]
StringIndex=2

[SunriseAMPM]
Measure=WebParser
URL=[MeasureParent]
StringIndex=3
Substitute="AM":"0","PM":"12"

[SunsetHour]
Measure=WebParser
URL=[MeasureParent]
StringIndex=4

[SunsetMin]
Measure=WebParser
URL=[MeasureParent]
StringIndex=5

[SunsetAMPM]
Measure=WebParser
URL=[MeasureParent]
StringIndex=6
Substitute="AM":"0","PM":"12"

[SunriseHourAdjust]
Measure=Calc
Formula=([SunriseAMPM]+SunriseHour)
Percentual=1
DynamicVariables=1

[SunsetHourAdjust]
Measure=Calc
Formula=([SunsetAMPM]+SunsetHour)
Percentual=1
DynamicVariables=1

[MeasureTimeUp]
Measure=Calc
Formula=((SunsetHourAdjust * 60 + SunsetMin)-(SunriseHour * 60 + SunriseMin)) / 1440

; Subtract the sunset time from Midnight (1440), then add the sunrise time to get the sun down time percentage
[MeasureTimeDown]
Measure=Calc
Formula=((1440-(SunsetHourAdjust * 60 + SunsetMin))+(SunriseHour * 60 + SunriseMin)) / 1440

; To get separation regions, you need to limit the rotation value and shift the start angle
; The down time arc is drawn in the opposite direction (notice the neg rotation angle)
[MeterSunDown]
Meter=ROUNDLINE
MeasureName=MeasureTimeDown
X=129
Y=128
LineLength=88
LineStart=100
StartAngle=(Rad(90+([SunsetHour:]*15)+([SunsetMin:]*0.25)+2))
RotationAngle=(-Rad(354))
LineColor=#UsedColor#
Solid=1
AntiAlias=1
DynamicVariables=1

[MeterSunUp]
Meter=Roundline
MeasureName=MeasureTimeUp
X=129
Y=128
LineLength=88
LineStart=100
StartAngle=(Rad(90+([SunriseHour:]*15)+([SunriseMin:]*0.25)-2))
RotationAngle=(Rad(352)) 
LineColor=#Goth#
Solid=1
AntiAlias=1
DynamicVariables=1

[MeasureTime24]
Measure=Time
Format=%H
MinValue=0
MaxValue=24

[FreeCPU]
MeasureName=MeasureTime24
Meter=ROUNDLINE
X=r
Y=r
StartAngle=(Rad(90))
RotationAngle=(Rad(360))
LineLength=96
LineStart=100
LineColor=#FreeColor#
Solid=1
AntiAlias=10

[MeterDivisions]
Meter=Image
ImageName=#@#24 Faceb.png
ImageTint=#FreeColor#
X=46
Y=45
W=166
H=167
Hidden=0
Hope this is closer to what you are shooting for! :great:
You do not have the required permissions to view the files attached to this post.
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am

Re: [reloaded] I am struggling with RoundLine

Post by Mor3bane »

Wow - I would never have gotten this without help. This is because the inclusion of the midnight part of the MeasureSunDown. I do see why it is needed now though, since the 00:00 value of the 24 hour clock time value. Whereas the day arc does not go over or 'through' it. Hmmm.

MANY THANKS eclectic-tech. :D
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself - be amazing at it

The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5384
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: [reloaded] I am struggling with RoundLine

Post by eclectic-tech »

No problem... happy to help. :bow:

I struggle with roundline values too, I always revert to letting Rainmeter convert the degrees to radians, and usually get to an answer after some "Trial and Error"; not the best approach but it works for me :lol:
User avatar
FreeRaider
Posts: 826
Joined: November 20th, 2012, 11:58 pm

Re: [reloaded] I am struggling with RoundLine

Post by FreeRaider »

eclectic-tech wrote:FreeRaider may beat me if he is so inclined ;-)
Unfortunately I did not understand the final goal that Mor3bane wanted to achieve.
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am

Re: [reloaded] I am struggling with RoundLine

Post by Mor3bane »

eclectic-tech wrote: ...usually get to an answer after some "Trial and Error"; not the best approach but it works for me :lol:
My gospel :lol:

I am doing more with this skin but the questions are no longer for Roundline - so they will be posted separately for clarity.
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself - be amazing at it

The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that it requires luck to achieve.
User avatar
Mordasius
Posts: 1167
Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8

Re: [reloaded] I am struggling with RoundLine

Post by Mordasius »

I've been following this thread with interest and would like to throw a small firecracker in the air if I may. My question is why have a fixed gap between the end of night and sunrise and between sunset and the beginning of night?

These times are twilight, oft referred to as dawn and dusk, when the sun is below the horizon but there is still enough light to see. Such a lovely light that is favoured by photographers and artists alike owing to the absence of shadows. Why not make that little gap between night and day represent the twilight? Be it Civil, Nautical or Astonomical.