That's very cool! I used to do a calculation for length of day, but yes, it got very easy to depend on tools online (however, I am having trouble making rainmeter see the wolfram page).
So is there any way of externalizing the matrix calculations so I can call them with different parameters for different planets?
It is currently April 28th, 2024, 2:19 am
Rotate a meter?
-
- Posts: 11
- Joined: February 15th, 2017, 3:34 pm
-
- Rainmeter Sage
- Posts: 16182
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Rotate a meter?
Also done. The skin is saving the length of each new day, since you've installed the skin, into the @Resources\DayLength.inc file. To open this file, just click the date on the skin.baerdric wrote:I used to do a calculation for length of day,
If that page needs logon, Rainmeter can't parse it. The WebParser plugin can't retrieve information from web sites requiring a login. Read the second paragraph here.baerdric wrote:(however, I am having trouble making rainmeter see the wolfram page).
Actually it is. I modified a bit my previous code, adding a second planet. I used the same image for this second planet, probably you'll want to use another one. I replace the angle calculation formulas (the new formulas don't use the [MeasureTime] measure, so I removed it), renamed the variables and added a few new ones:baerdric wrote:So is there any way of externalizing the matrix calculations so I can call them with different parameters for different planets?
Code: Select all
[Rainmeter]
Update=100
AccurateText=1
[Variables]
Radius1=100
Radius2=200
PlanetDiameter1=15
PlanetDiameter2=30
Period1=30
Period2=45
[MeterSun]
Meter=Shape
Shape=Ellipse 50,50,50
X=300
Y=200
[MeterPlanet]
Meter=Image
Shape=Ellipse 175,175,5
ImageName=#@#Images\Moonhalf.jpg
H=10
W=10
[MeasureAngle1]
Measure=Calc
Formula=(( -2 * ( COUNT % #Period1# ) * PI ) / #Period1# )
[MeasureAngle2]
Measure=Calc
Formula=(( -2 * ( COUNT % #Period2# ) * PI ) / #Period2# )
[MeterPlanet1]
Meter=Image
ImageName=#@#Images\Moonhalf.jpg
X=([MeterSun:X]+[MeterSun:W]/2-#Radius1#*Cos(-[MeasureAngle1])-([MeterPlanet1:W]/2))
Y=([MeterSun:Y]+[MeterSun:H]/2-#Radius1#*Sin(-[MeasureAngle1])-([MeterPlanet1:H]/2))
W=#PlanetDiameter1#
H=#PlanetDiameter1#
PreserveAspectRatio=1
TransformationMatrix=(Cos([MeasureAngle1]));(-Sin([MeasureAngle1]));(Sin([MeasureAngle1]));(Cos([MeasureAngle1]));(([MeterPlanet1:X]+([MeterPlanet1:W]/2))-([MeterPlanet1:X]+([MeterPlanet1:W]/2))*Cos([MeasureAngle1])-([MeterPlanet1:Y]+([MeterPlanet1:H]/2))*Sin([MeasureAngle1]));(([MeterPlanet1:Y]+([MeterPlanet1:H]/2))+([MeterPlanet1:X]+([MeterPlanet1:W]/2))*Sin([MeasureAngle1])-([MeterPlanet1:Y]+([MeterPlanet1:H]/2))*Cos([MeasureAngle1]))
DynamicVariables=1
[MeterPlanet2]
Meter=Image
ImageName=#@#Images\Moonhalf.jpg
X=([MeterSun:X]+[MeterSun:W]/2-#Radius2#*Cos(-[MeasureAngle2])-([MeterPlanet2:W]/2))
Y=([MeterSun:Y]+[MeterSun:H]/2-#Radius2#*Sin(-[MeasureAngle2])-([MeterPlanet2:H]/2))
W=#PlanetDiameter2#
H=#PlanetDiameter2#
PreserveAspectRatio=1
TransformationMatrix=(Cos([MeasureAngle2]));(-Sin([MeasureAngle2]));(Sin([MeasureAngle2]));(Cos([MeasureAngle2]));(([MeterPlanet2:X]+([MeterPlanet2:W]/2))-([MeterPlanet2:X]+([MeterPlanet2:W]/2))*Cos([MeasureAngle2])-([MeterPlanet2:Y]+([MeterPlanet2:H]/2))*Sin([MeasureAngle2]));(([MeterPlanet2:Y]+([MeterPlanet2:H]/2))+([MeterPlanet2:X]+([MeterPlanet2:W]/2))*Sin([MeasureAngle2])-([MeterPlanet2:Y]+([MeterPlanet2:H]/2))*Cos([MeasureAngle2]))
DynamicVariables=1
If you want, you can add further planets, just have to add the new variables, the new [MeasureAngleX] measures and the appropriate [MeterPlanetX] meters.
-
- Posts: 11
- Joined: February 15th, 2017, 3:34 pm
Re: Rotate a meter?
Sorry, I didn't see the notification for your previous reply. I've been working on getting Tasker to send messages to RainMeter.
I'm going to dig into what you posted in the morning and set up some things. Thanks for the time and effort you put into this, I hope it's also useful for you in some way.
I'm going to dig into what you posted in the morning and set up some things. Thanks for the time and effort you put into this, I hope it's also useful for you in some way.
-
- Posts: 11
- Joined: February 15th, 2017, 3:34 pm
Re: Rotate a meter?
Can you send me your preferred citation metadata info? I would be pleased to credit you (as if anyone but me would ever see it).
-
- Rainmeter Sage
- Posts: 16182
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Rotate a meter?
I'm glad if I could help. And don't worry, if you want, just mention me somewhere as helper.baerdric wrote:Can you send me your preferred citation metadata info? I would be pleased to credit you (as if anyone but me would ever see it).