cancel
Showing results for
Did you mean:
Continued Contributor

## Gallery Challenge - X,Y coordinates

I'm pretty sure I know the answer to this question but wanted to throw it out there in case I'm unaware of a possible solution. Can a gallery be used to place the following (circle) shapes in the same way they are placed in the screenshot.

3 ACCEPTED SOLUTIONS

Accepted Solutions
Resident Rockstar

Inspired by @h-nagao's work, I decided to throw my hat in the ring. I have exported and attached my attempt at generalizing the design. It will resize the gallery template height, circle shapes, and font size based on the number of items in the gallery and the height of the gallery itself. I used the tablet form factor to give myself more room to experiment but it could easily be translated to the phone form factor. The function used to generate the y-values could use some tweaking as the first and last items are a bit farther to the right that I like, but other than that I think it turned out okay.

Again, great challenge @tianaranjo! It was a lot of fun working on this.

General lookX-coordinate calculation

Impactful Individual

Great work @wyotim!! Here is another solution for this challenge, beased on polar coordinates.

(Result is almost same)

I attached msapp just in case.

Thank you @tianaranjo, for providing nice oppotunity!

Resident Rockstar

My attempt at fully generalizing @h-nagao's method:

And some notes on how superior his method is compared to what I was trying: whereas I was trying to fit the icons in the gallery, assuming uniform y-coordinates due to the uniform gallery template heights, he kept the angles between icons uniform and fit the icons in by breaking the boundaries of the gallery templates(!!!). Such a great approach! And much nicer looking as well.

In the attached app, I generalized his approach, keeping the resizing tweaks from my previous attempt. What I think would be a fun extension of this would be working on animating this (perhaps a vertical slide in where the icons follow the curve until they reach their stopping point?) as well as variations on the theme (quarter circle, horizontal half, etc.). Super fun stuff!

11 REPLIES 11
Skilled Sharer

Huge shout out to @mofumofu_dance (twitter handle) for this solution.  His use of algorithms in apps is amazing and definitly one to follow and learn from.

Resident Rockstar

I was just getting started on this challenge but it looks like it is already solved! Great work @h-nagao!

While this place doesn't usually get too math-y, I must say that a good understanding of the polar coordinate system and circular geometry can go a long way, as this challenge and awesome solution both show.

Thanks for sharing the solution @KickingApps and for the challenge @tianaranjo!

Resident Rockstar

Inspired by @h-nagao's work, I decided to throw my hat in the ring. I have exported and attached my attempt at generalizing the design. It will resize the gallery template height, circle shapes, and font size based on the number of items in the gallery and the height of the gallery itself. I used the tablet form factor to give myself more room to experiment but it could easily be translated to the phone form factor. The function used to generate the y-values could use some tweaking as the first and last items are a bit farther to the right that I like, but other than that I think it turned out okay.

Again, great challenge @tianaranjo! It was a lot of fun working on this.

General lookX-coordinate calculation

Continued Contributor

@wyotim Nice work!  I have just been diving into integrating calculations into my apps and learning these techniques for the first time; it's been so exciting.  I have another gallery challenge; if I cannot resolve it, I'll be throwing it out here and onto the twitter forum again with the hopes of generating the same curiosity.

Resident Rockstar

@tianaranjoAwesome! While I hope you are able to resolve your issue, I am also quite happy to investingate a good challenge. If anything in the app I attached needs further clarification, feel free to message me here or on twitter (@ShortForTim). It was a pretty sparse and quick build so I didn't comment too much of my approach.

And thanks again for posting!

Continued Contributor

@wyotim Following you now -- and I will reach out with questions if necessary. Thanks again!

Impactful Individual

Great work @wyotim!! Here is another solution for this challenge, beased on polar coordinates.

(Result is almost same)

I attached msapp just in case.

Thank you @tianaranjo, for providing nice oppotunity!

Skilled Sharer
@h-nagao - awesome contribution; thanks! I’ve been following you and learning from you for awhile. Amazing things your doing here. Appreciate the time y’all put into helping me find a solution. As mentioned earlier, another gallery challenge on the way if you’re up for it. I’ll tag you and @wyotim when I post details.
Resident Rockstar

@h-nagaoThat is awesome! Way better than my humble attempt. Thanks for attaching the file. I have learned so much from seeing what you do but getting to see how you do it is increadibly helpful!

Announcements