It is currently February 25th, 2020, 8:18 am

## Using Roundline to divide a full circle into 6 equal arcs [solution found]

Help with creating, editing & fixing problems with skins Mor3bane
Posts: 760
Joined: May 7th, 2016, 7:32 am

### Using Roundline to divide a full circle into 6 equal arcs [solution found]

Hello,

I am having trouble using roundline to divide a circle into 6 equal arcs - each arc will essentially be a button. The divisions will fall where normally the shape of a star's points would be.

I am ok using Roundline to show say a volume arc that changes with a mouse action, but the basic math of this division is confusing me. My hope would be that each arc would be a separate Roundline meter completing an overall circle. So each startangle and rotationangle are what is driving me bonkers - since there is no control measure - other than what I imagine to be a calc measure but the formula per se - I ain't getting it.

Any help gisting this out would be great.
Last edited by Mor3bane on January 15th, 2020, 1:06 pm, edited 1 time in total.
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself
mak_kawa
Posts: 510
Joined: December 30th, 2015, 9:47 am

### Re: Using Roundline to divide a full circle into 6 equal arcs

Something like this?

Code: Select all

``````[Rainmeter]
Update=-1

[Circle0-60]
Meter=Roundline
X=0
Y=0
W=100
H=100
LineLength=40
LineColor=32,32,32,160
Solid=1

[Circle60-120]
Meter=Roundline
X=0
Y=0
W=100
H=100
LineLength=40
LineColor=64,64,64,160
Solid=1

[Circle120-180]
Meter=Roundline
X=0
Y=0
W=100
H=100
LineLength=40
LineColor=96,96,96,160
Solid=1

[Circle180-240]
Meter=Roundline
X=0
Y=0
W=100
H=100
LineLength=40
LineColor=128,128,128,160
Solid=1

[Circle240-300]
Meter=Roundline
X=0
Y=0
W=100
H=100
LineLength=40
LineColor=160,160,160,160
Solid=1

[Circle300-360]
Meter=Roundline
X=0
Y=0
W=100
H=100
LineLength=40
LineColor=192,192,192,160
Solid=1
`````` Mor3bane
Posts: 760
Joined: May 7th, 2016, 7:32 am

### Re: Using Roundline to divide a full circle into 6 equal arcs

Beautiful!

THANKS mak_kawa!

Exactly what I needed.

I got hung up on the decimal radians rather than your formulaic way.   My DevArt Gallery

There are many ways to be different - there is only one way to be yourself balala
Rainmeter Sage
Posts: 9758
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

### Re: Using Roundline to divide a full circle into 6 equal arcs

Mor3bane wrote:
January 15th, 2020, 1:03 pm
I got hung up on the decimal radians rather than your formulaic way.
Don't have to. Radians can be easily using, the only thing you have to know is that 1 PI = 180 degrees. So you can use the angles either expressed into degrees, converted to radians with a Rad() function, or expressed directly into radians and in this case you can use the PI constant:
[Circle0-60]
...
StartAngle=((9/2)*(PI/3))
RotationAngle=(PI/3)
...

[Circle60-120]
...
StartAngle=((11/2)*(PI/3))
RotationAngle=(PI/3)
...

[Circle120-180]
...
StartAngle=((1/2)*(PI/3))
RotationAngle=(PI/3)
...

[Circle180-240]
...
StartAngle=((3/2)*(PI/3))
RotationAngle=(PI/3)
...

[Circle240-300]
...
StartAngle=((5/2)*(PI/3))
RotationAngle=(PI/3)
...

[Circle300-360]
...
StartAngle=((7/2)*(PI/3))
RotationAngle=(PI/3)
...
Note that besides rewriting the angles into radians, I also decreased the values of StartAngle on the meters from [Circle120-180] to [Circle300-360], because the initial values have been going above 360. Definitely works this way as well, however not needed or useful, because from the point of view of the trigonometry, any angle is the same as the angle added with 360. For instance the StartAngle of the initial [Circle120-180] meter is StartAngle=(Rad(390)), which is the same as StartAngle=(Rad(390-360)) = StartAngle=(Rad(30)). So I reduced the angles which are larger than 360 degrees.
mak_kawa
Posts: 510
Joined: December 30th, 2015, 9:47 am

### Re: Using Roundline to divide a full circle into 6 equal arcs [solution found]

Hi Mor3bane

Sorry for bringing up solved thread.

In the Roundline meter, apparent "fill" color of a sector is in fact defined by LineColor option. That is, maybe, the outline and "fill" colors of a sector can not be drawn separately.

So, I have made a code displaying sectors with independent outline and fill colors using the Shape meter.
Untitled-1.png

Code: Select all

``````[Rainmeter]
Update=-1

[Variables]

[Circle0-60]
Meter=Shape
Shape=Path MyPath | Fill Color 32,32,32,192

[Circle60-120]
Meter=Shape
Shape=Path MyPath | Fill Color 64,64,64,192

[Circle120-180]
Meter=Shape
Shape=Path MyPath | Fill Color 96,96,96,192

[Circle180-240]
Meter=Shape
Shape=Path MyPath | Fill Color 128,128,128,192

[Circle240-300]
Meter=Shape
Shape=Path MyPath | Fill Color 160,160,160,192

[Circle300-360]
Meter=Shape
Shape=Path MyPath | Fill Color 192,192,192,192
``````
Possibly, this code can be written more smart... balala, I have not used PI constant with no reason... maybe I am lazy. You do not have the required permissions to view the files attached to this post. balala
Rainmeter Sage
Posts: 9758
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

### Re: Using Roundline to divide a full circle into 6 equal arcs [solution found]

mak_kawa wrote:
January 16th, 2020, 12:42 am
balala, I have not used PI constant with no reason... maybe I am lazy. No, you are not. Probably it is not obvious for everyone it can be used, however it can easier very much the work you have to do.