Heart Rate Rotating

How can I adjust the rotation of the arm for the heart?
I examined a few examples but I was not successful.

A100_040

1 Like

From you picture, I believe the angle range is between -60 and 60 degrees.
So total is 120 degrees. The ZRH goes from 0 up to 200. So the rotating hand will have to fit the 200 in the 120 degrees, which give you a scale multiplier of 0.6.

And since you are not starting at 0, you need to subtract 60.

Therefore your rotation formula is: (#ZHR#*0.6-60)

To avoid having the hand go beyond the 120 range, you could limit the formula between
the -60 and 60: (clamp(#ZHR#*0.6-60,-60,60))

3 Likes

Thank you for your information. But when I use this code, if the heart is zero, the arm is closer to the middle, not at the beginning. Likewise, when active, it just oscillates between the beginning of the red area and the beginning of the middle area.

1 Like

It works like this but it goes past the red zone

(160+(#ZHR#*2))

1 Like

did you test it with the heart rate slider in preview?
#ZHR#*2 will give you more than one full circle on the preview range 0-200.

2 Likes

If the template you are talking about is also a view area, yes, I look at it from there.

1 Like

I’m having a hard time understanding the rotation logic here. Is there any template for this? It shouldn’t be this hard :slight_smile:

1 Like

I think I found it :slight_smile:

(clamp(((#ZHR#-50)*240/150)-120,-60,60))

It is not hard.
The hand templates we have in creator for hours minutes and seconds always point upwards when inserted with 0 rotation. So we consider it a standard how to draw hand image (same like hand images that can be found in the resources section of this forum).
From your tiny image Tom assumed the scale you want to use, corresponds with circle section between 10 and 2h which is 120 degree (when I inserted and zoomed that image in creator, it seems you want the hand pivot a bit off-center and range slightly more wide, but those are details in compare to general function of the hand here).


The formula from Tom needs only little tweaks, but in general should work like this in preview


4 Likes

Everything is very clear now. I didn’t know this part. I am grateful.

2 Likes
2 Likes

Nice, seems you managed to make it work in the end :slight_smile:
I would make the hand little brighter to be more visible on the dark gauge background.

3 Likes