It is currently May 2nd, 2024, 12:33 am

rotating in circles and ovals

Get help with creating, editing & fixing problems with skins
legion
Posts: 14
Joined: December 1st, 2012, 10:05 pm

rotating in circles and ovals

Post by legion »

So I have a skin that has an image that orbits around a clock, but is it possible to make something orbit in an oval pattern, rather than just a circle?
User avatar
MerlinTheRed
Rainmeter Sage
Posts: 889
Joined: September 6th, 2011, 6:34 am

Re: rotating in circles and ovals

Post by MerlinTheRed »

It is possible, but you'd have to do some math. I don't know what you use right now to rotate the image. If you want it to go in ovals, you'll need to use TransformationMatrix on the rotating image and figure out a way to set another TransformationMatrix in each animation step so the image goes round in ovals.

The general approach is having a separate calc measure for each element of the TransformationMatrix and then using the values of these measures to construct the matrix.

Code: Select all

[Calc11]
Measure=Calc
Formula=...

[Calc21]
Measure=Calc
Formula=...

...

[Calc23]
Measure=Calc
Formula=...

[Image]
Meter=Image
TranformationMatrix=[Calc11];[Calc21];[Calc12];[Calc22];[Calc13];[Calc23]
DynamicVariables=1
The formulas of the calc measure will likely contain some sine and cosine functions and will be dependent on the measure that controls the rotation (e.g. a time measure for a clock).

I don't know if this is already enough to get you started. If you need a more detailed explanation, please ask.
Have more fun creating skins with Sublime Text 2 and the Rainmeter Package!