It is currently April 23rd, 2024, 6:40 am

ROUNDLINE: An easier way...

Tips and Tricks from the Rainmeter Community
User avatar
JoBu
Posts: 271
Joined: February 16th, 2011, 12:46 am
Location: California

ROUNDLINE: An easier way...

Post by JoBu »

Not sure if this is listed somewhere else, or if a better way exists...


Was working on a mod for Arcs by Kaelri when I did this:

Add the following to your variables list:

Code: Select all


[Variables]
; Position ------------------

Pos01=5.2359877
Pos015=5.4977871
Pos02=5.7595865
Pos025=6.0213859
Pos03=6.2831853
Pos035=6.5449846
Pos04=0.5235987
Pos045=0.7853981
Pos05=1.0471975
Pos055=1.3089969
Pos06=1.5707963
Pos065=1.8325957
Pos07=2.0943951
Pos075=2.3561944
Pos08=2.6179938
Pos085=2.8797932
Pos09=3.1415926
Pos095=3.4033920
Pos10=3.6651914
Pos105=3.9269908
Pos11=4.1887902
Pos115=4.4505895
Pos12=4.7123889
Pos125=4.9741883

; Degrees -------------------

15deg=0.26179935
30deg=0.5235987
45deg=0.7853981
60deg=1.0471975
75deg=1.3089969
90deg=1.5707963
105deg=1.8325957
120deg=2.0943951
135deg=2.3561944
150deg=2.6179938
165deg=2.8797932
180deg=3.1415926
195deg=3.4033920
210deg=3.6651914
225deg=3.9269908
240deg=4.1887902
255deg=4.4505895
270deg=4.7123889
285deg=4.9741883
300deg=5.2359877
315deg=5.4977871
330deg=5.7595865
345deg=6.0213859
360deg=6.2831853

Now for "StartAngle=" you can use "#Pos02#" to start the metered line at the 2'clock position. (025 is 2:30, 035 is 3:30, etc - 5 minute increments.)
Also, for "RotationAngle=" you can use "#90deg#" to create a 90' or "#180deg#" to create a 180', etc. ("#360deg#" would make it a complete circle.)

Makes it a lot easier in my brain... hopefully it can be of help to others too.

Cheers all.

//JoBu
Last edited by JoBu on May 4th, 2011, 4:47 am, edited 1 time in total.
Jarhead
Posts: 28
Joined: April 7th, 2011, 7:20 pm

Re: ROUNDLINE: An easier way...

Post by Jarhead »

Thanks, I'm using them right now!
User avatar
JoBu
Posts: 271
Joined: February 16th, 2011, 12:46 am
Location: California

Re: ROUNDLINE: An easier way...

Post by JoBu »

No problem! Glad you're finding them useful! :)
User avatar
santa_ryan
Posts: 397
Joined: June 22nd, 2010, 4:11 am

Re: ROUNDLINE: An easier way...

Post by santa_ryan »

Degree*0.0174532925=Radians

Just a suggestion, you might want to include the above equation just for grins and giggles...
I have three rules when I'm trying to help you.
  • Don't get mad when you don't understand something
  • Be VERY specific with what you ask for.
    The more specific you are, the higher the quality of support you receive.
  • Do not just copy and paste what I put in examples and come back saying it doesn't work.
    It does work, but I purposely left blanks that you need to fill for your specific needs.
User avatar
JoBu
Posts: 271
Joined: February 16th, 2011, 12:46 am
Location: California

Re: ROUNDLINE: An easier way...

Post by JoBu »

Santa, did you just throw maths at me?

kung fu treachery!
Last edited by JoBu on May 4th, 2011, 1:52 am, edited 2 times in total.
User avatar
Waldensamkeit
Posts: 83
Joined: March 15th, 2011, 12:39 pm
Location: Hamilton, New Jersey

Re: ROUNDLINE: An easier way...

Post by Waldensamkeit »

Ok, I think something finally clicked but i'll have to do some more testing to figure that out for sure. After staring dumbly at your modded arcs skin and changing values in a single roundline meter taken from circuitous I am finally able to get the results I am looking for without getting massive headaches.

Your cheat sheet above made the entire process that much quicker. It also proved invaluable in acquiring "click". I still have miles to go with the different measures as far as NetIn/Out, HDD Read/Writes, so on and so forth, but the basic metering(?) finally makes sense.

Something I am curious about is why it seems that "LineWidth=X" in roundline meters seems to have no real effect once I get "LineStart" and "LineLength" set.

Well at least now I have come to a place to start and a clear direction to move forward...
User avatar
JoBu
Posts: 271
Joined: February 16th, 2011, 12:46 am
Location: California

Re: ROUNDLINE: An easier way...

Post by JoBu »

If you think of the Roundline Meters as pie charts it helps. The linestart/linelength tell the meter how to size each individual slice.
The closer linestart is to 0, the closer to the center it begins.
The further linelength is from 0, the wider the slice.
Linewidth is of no use because the slice charts a range, rather than a specific value. That range creates the pie-chart slice.

Linewidth comes into play when you are creating a single line - like the hand of a clock - and it requires a measure that produces an exact value. So, for the hour hand of a clock you might have the following measure and meter - and remember that the measure gives an "instance-value" such as "3", rather than a "range-value" like "0%-100%" or "0GHz-3.44GHz".

Code: Select all


[MeasureTimeHours]
Measure=Time
Format="%I"

[MeterHours]
Meter=ROUNDLINE
MeasureName=MeasureTime
X=0
Y=0
W=429
H=429
LineWidth=3
StartAngle=#Pos12#
RotationAngle=#360deg#
LineLength=142
LineStart=0
LineColor=#Color7#
Solid=0
AntiAlias=1
ValueReminder=43200

So in this meter, because of the value created in the measure, the pie-slice will reduce down to a single line.
If the measure was a percentage, or range, the line would increase to a pie-slice to cover that range.

This is my understanding of it anyways... not sure if I'm 100% correct in this, and I should really read the manual... but it makes sense to me this way.

Hope it helps!


Regarding the NetIn/Out and other meters, reading up on the plugins that they use really helped me to understand them a little better.
Then you get into RegExp, those garbled GET formulas, Calc formulas... and I realize that I was never meant to be a codemonkey.

But I can do a pretty nifty website in HTML... lol.

Cheers.
User avatar
Waldensamkeit
Posts: 83
Joined: March 15th, 2011, 12:39 pm
Location: Hamilton, New Jersey

Re: ROUNDLINE: An easier way...

Post by Waldensamkeit »

Yeah I got to a really good point with websites, up to being able to read and edit php and sql, using notepad to code everything else, Html, css is the easy part. Writing PHP from scratch will probably never be in the cards.

I kinda felt the same here, not nearly to the extent as this seems much more attainable, and yes your posts and tips and explanations absolutely help. The click happened and I seem to get it now. The pie chart example you stated just validates what I most recently thought I understood and now pretty much get.

RegExp and calcs? Well calcs might be just remain at a cut and paste/edit level and im ok with that but I plan on trying to take on RegExp once i get the roundline down...

Thank you very much for all of your help and your posts and what I imagine was some pretty mindwrenching coding.
User avatar
santa_ryan
Posts: 397
Joined: June 22nd, 2010, 4:11 am

Re: ROUNDLINE: An easier way...

Post by santa_ryan »

This site will be of great use to you wald, in my opinion. It most certainly has been to my benefit of finding it (=
http://www.regular-expressions.info/
I have three rules when I'm trying to help you.
  • Don't get mad when you don't understand something
  • Be VERY specific with what you ask for.
    The more specific you are, the higher the quality of support you receive.
  • Do not just copy and paste what I put in examples and come back saying it doesn't work.
    It does work, but I purposely left blanks that you need to fill for your specific needs.