Show HN: Test your shape rotation skills (0xf00ff00f.github.io)
Hi all, hope someone enjoys (or not) my weekend project. See how many matching pairs you can find in two minutes.
This is written in C++ and built to WebAssembly with Emscripten. The code is at https://github.com/0xf00ff00f/rotator
209 comments
[ 0.22 ms ] story [ 280 ms ] threadI like it. Great fun, thanks.
Additionally, the auto rotation itself is mostly confusing, could be better to enable manual mouse rotation.
Cool game nonetheless!
Edit: The bug seems to be that shapes with different "DNA" can still be isometric in some cases: https://github.com/0xf00ff00f/rotator/blob/master/demo.cc#L4...
For a "fast filter" generate the center of gravity for each (just the average of the voxel points as doubles) and abs+sort the resulting vector and assume they match if the "Sorted Cog Vector" matches. It will have false positives sometimes but no false negatives.
https://en.wikipedia.org/wiki/International_Chemical_Identif...
https://i.ibb.co/y4p4JSM/20220220-231734.jpg
Thank you!
If you are looking for tweeks consider calling it Shapdle and put them in a row, and color yellow if close and green if right (only slightly joking :)
Also, I have always wondered if there's a way to translate these shapes to strings for quick "mental algorithm" matching. Something like, "5, left turn, 3, right turn..."
I guess you'd need a normal form. The first turn can be defined as always "right" or "left," and subsequent turns can be right, left, up or down. The first turn that's "up" or "down," can be defined as "up." That leaves two ways to read any shape, but that's an uhh constant-factor overhead. :)
(I can't think of a way to define a normal form reading direction that wouldn't involve potentially reading an arbitrary distance in before having to re-start the other way.)
*In most people.
No it can’t, not in 3D... it is just a turn.
You can however choose to rotate about the first segment until the turn is Right, then use this orientation for the rest.
In terms of normal form and restarts, who cares? Just generate the string both ways, it’s 2n computations, choose the lowest in lexicographic order, and life is good. If you get to billions of turns are humans really going to be doing the comparison? Surely we’d just stream the string into a hash function or something...
You can always rotate this to (n, 0, m) and view from the +y axis looking down, and it is a right turn.
The L shape is not complex enough to be chiral, but the post is (and you are!) is claiming that you need an extra bit of information to specify “which L, the right handed one or the left handed one?” ... That is a distinctively 2D question.
You can just define the first turn to be Right no matter how it is oriented.
If you are not happy with that then just rotate the first segment until it looks Right to you. Then label the other turns.
If you are still not happy with the word Right to denote the first term then just make up new notation. Define the first turn to be 1. Use numbers to denote turns if you object to using Left and Right.
Not if it is chiral. then whatever turn is defined as right is not left
I was once measured to have abysmal spatial reasoning (which is probably backed up by poor hand-eye coordination and sense of direction) but I had no problem doing molecular geometry and group theory, I suspect it was because I applied logic rather than visualisation to compensate. (I am terrible at walking into an empty place an imagining how I might want to fill it)
feedback: Sometimes the shapes get too occluded by it's own body. Not sure bug or a feature. Also could be fun to increasing or decreasing difficulty curve depending on performance
- Turn selection outline to green on success
- Show incremental progress (num matched)
So this game going to the top of HN is likely part of the meme where shape rotators strike back against wordcels after wordle became popular, something like that.
Once you do it a couple times, you can skip a lot of the conparison
16 shapes (3rd try)
18 shapes (4th try)
24 shapes (5th try, no brute-force)
P.S. I had 7 years of art school in addition to engineering
I only managed to break 10 after about a dozen tries..
(Notices this comment) "...Hmph!" (Tries harder, focuses)
-> 12
-> 10
:(
Nothing like neural training, eh? Hmph :)
Now I'm curious what you think of https://news.ycombinator.com/item?id=30409693.
If the site is recording telemetry on scores, but it would be fantastic to have a percentile rank at the end.
I see how human sins are the drivers of technology development
no qualifications, other than liking physical 3d puzzles