Math behind the diameter of a carousel

Greetings all,

I was wondering if anyone could tell me what is the math relationship behind the carousel diameter? I can see that it goes from 0 to 2 and I get that as you go from 0 to 2 the diameter gets bigger, but how is that figured?

I’m looking to have a carousel whose quantity of elements vary by user selection. All the elements have the same size (HD video 1920x1080), and I don’t want a gap between them.

I figure if I can somehow bind the diameter size to the number of elements with a linear converter, I can keep all the elements butted up to each other no matter how many elements the user selects. But I need to know the math in order to do that.

Any thoughts?

Hi David,

The Carousel diameter is a ratio based on its width.

Regards,

Alex.

Thanks for taking a moment to respond, Alex. I understand that there is a ratio based on width, I was kinda hoping for some more specifics. How do I calculate the width? Since the carousel is made from images, is it actually a polygon or is there a circle hidden in there, and if so, where is the diameter calculated from (e.g. the middle of an image, the edge of an image, or an arbitrary spot?)

I figured out an alternate method in the absence of not knowing, but I still have another application where I don’t think my workaround will work.

Thanks!
Dave

Actually, you don’t have to “calculate the width”, it’s a property, the width of the carousel element itself.