It is currently September 30th, 2024, 1:18 am
Why Did You Choose Radians?
-
- Posts: 24
- Joined: July 30th, 2012, 2:06 pm
Why Did You Choose Radians?
It seems less than useful for doing many things. e.g. I've made an analogue clock that only ticks over on the minute and hour, rather than update each hand every second. The problem is that using FRAC and FLOOR functions means that sometimes the minute and hour hands move when they should but sometimes they don't move until a second later. I assume that is because decimals are being rounded down with too little precision. It's hardly the end of the world but it is slightly annoying and wouldn't happen if Rainmeter used degrees.
-
- Developer
- Posts: 1721
- Joined: July 25th, 2009, 4:47 am
Re: Why Did You Choose Radians?
I can't be sure without seeing your code, but I really doubt radians are the problem. Rainmeter uses 16 decimal places of pi, so unless you're calibrating a nuclear reactor, it should be fine for anything you can conceivably be doing. If you post your formulas, there's a good chance we can help you find a better approach.
-
- Posts: 446
- Joined: August 7th, 2012, 9:18 pm
Re: Why Did You Choose Radians?
I guess he has a point.
cause if you want to do simple rotations like 90°
you need to calc
90 = 180n/pi
which is about
n = 1,5707963267948966192313216916398
I'm not so sure in the point of view of a skin author, where the benefits lie?
cause if you want to do simple rotations like 90°
you need to calc
90 = 180n/pi
which is about
n = 1,5707963267948966192313216916398
I'm not so sure in the point of view of a skin author, where the benefits lie?
Powered by Sublime Text 3 with Rainmeter-Package
Re: Why Did You Choose Radians?
the benefit of radians is that they use the decimal system.
degrees are divided by minutes.
you can use calculations in meters, so for example:
works just fine, no need to use super long numbers.
degrees are divided by minutes.
you can use calculations in meters, so for example:
Code: Select all
StartAngle=(2*PI)
RotationAngle=(2*PI)
-
- Posts: 608
- Joined: February 7th, 2011, 7:27 pm
- Location: Thessaloniki, GR
Re: Why Did You Choose Radians?
I have no idea where you could experience a problem using radians, but especially regarding the analog clock; You are not trying to update the minute and hour hand using special functions in UpdateDivider, do you? Because if that's your problem, take a look at the manual for ValueRemainder.
-
- Posts: 24
- Joined: July 30th, 2012, 2:06 pm
Re: Why Did You Choose Radians?
ValueRemainder doesn't do what I want to do. My formula, below, makes it redundant in this case.
My code is below but the question still stands - why did you choose radians? What is the advantage? To me it just seems geeky for geeky's sake.Kaelri wrote:I can't be sure without seeing your code, but I really doubt radians are the problem. Rainmeter uses 16 decimal places of pi, so unless you're calibrating a nuclear reactor, it should be fine for anything you can conceivably be doing. If you post your formulas, there's a good chance we can help you find a better approach.
Code: Select all
[mTime1]
Measure=Time
[mMinutes]
measure=calc
formula=(FLOOR(FRAC(mTime1/3600)*60))/60
[mHours]
measure=calc
formula=(FLOOR(FRAC(mTime1/43200)*12))/12
[Seconds]
Meter=ROUNDLINE
MeasureName=mTime1
MeterStyle=sRound
X=533
Y=47
W=12
H=12
LineStart=26
LineLength=29
ValueReminder=60
LineColor=#HIcolour#99
Solid=1
[Minutes]
Meter=ROUNDLINE
MeasureName=MeasureMinutes
MeterStyle=sRound
X=526
Y=40
W=26
H=26
LineStart=30
LineLength=35
LineColor=#HIcolour#99
Solid=1
[Hours]
Meter=ROUNDLINE
MeasureName=MeasureHours
MeterStyle=sRound
X=519
Y=33
W=40
H=40
LineStart=36
LineLength=42
LineColor=#HIcolour#99
Solid=1
You can divide degrees by whatever you like, you don't have to slavishly stick to minutes and seconds. Degrees are so much easier to work with for this stuff, metres are not.Alex Becherer wrote:the benefit of radians is that they use the decimal system.
degrees are divided by minutes.
-
- Developer
- Posts: 22793
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Why Did You Choose Radians?
http://ask.metafilter.com/85719/Why-do-we-use-radians
Everyone who is not a math geek (myself most certainly included) asks this question sooner or later. Everyone who is a math geek just assumes that you would use radians for this kind of math.
At this point it is what it is. We are not going to change it to degrees or confuse things by adding redundant options to use degrees on the meters.
We did add a new function to automate converting degrees to radians in a formula to use with options for meters that require them.
RAD(x) - Converts x from degrees to radians.
Everyone who is not a math geek (myself most certainly included) asks this question sooner or later. Everyone who is a math geek just assumes that you would use radians for this kind of math.
At this point it is what it is. We are not going to change it to degrees or confuse things by adding redundant options to use degrees on the meters.
We did add a new function to automate converting degrees to radians in a formula to use with options for meters that require them.
RAD(x) - Converts x from degrees to radians.
-
- Developer
- Posts: 1721
- Joined: July 25th, 2009, 4:47 am
Re: Why Did You Choose Radians?
Your problem has nothing to do with degrees or radians. If you watch the measure values in the Rainmeter "About" console, you can see that the values are stuttering before they ever get to to the Roundline meters. I suspect there's a rounding error of some kind in either Frac or Floor, which I will pursue further. In any case, there is absolutely no relationship between this issue and degrees/radians; you'd see the same behavior with a Bar meter or anything else.
In the meantime, try this instead:
On the topic: as a (minor league) math geek, I favor radians because they actually mean something. There's nothing special about "360 degrees" that makes it any more intuitive or useful. It's just a number that somebody plucked out of the clear blue sky.
A radian, on the other hand, has a meaning: it's the ratio between an angle's arc and its radius. In other words, if you had a circle, and you cut a pie slice out of that circle with an angle of 1 radian, the "crust" would the same length as the sides. This might sound kind of specific, but it has huge implications in geometry, which is why functions like sin/cos/tan require it.
In short, radians vs. degrees is like pounds vs. kilograms, or feet vs. meters. One makes sense. The other does not. :)
In the meantime, try this instead:
Code: Select all
[mMinutes]
Measure=Calc
Formula=FRAC(FLOOR(mTime1 / 60) / 60)
[mHours]
Measure=Calc
Formula=FRAC(FLOOR(mTime1 / 3600) / 12)
A radian, on the other hand, has a meaning: it's the ratio between an angle's arc and its radius. In other words, if you had a circle, and you cut a pie slice out of that circle with an angle of 1 radian, the "crust" would the same length as the sides. This might sound kind of specific, but it has huge implications in geometry, which is why functions like sin/cos/tan require it.
In short, radians vs. degrees is like pounds vs. kilograms, or feet vs. meters. One makes sense. The other does not. :)
You do not have the required permissions to view the files attached to this post.
-
- Posts: 24
- Joined: July 30th, 2012, 2:06 pm
Re: Why Did You Choose Radians?
I suppose it depends on what sort of maths geek you are. Maths was my degree major back in the 1970s but when it comes to doing Rainmeter, I prefer to do all the maths in my head. I can remember Pi to 5 decimal places but putting that to use in my head is really hard work ( especially as my head doesn't work as well as it used to). OTOH, 360 degrees has so many divisors that it is child's play to work out almost anything in your head using it.
Radians make great sense for practical things like navigation and for complex maths but for simple things like this, they definitely make things harder than they need to be. I'm not suggesting you change it, I was just wondering why you chose it in the first place.
Radians make great sense for practical things like navigation and for complex maths but for simple things like this, they definitely make things harder than they need to be. I'm not suggesting you change it, I was just wondering why you chose it in the first place.
Re: Why Did You Choose Radians?
how about:
Code: Select all
StartAngle=(RAD(360))
RotationAngle=(RAD(360))