Show HN: Test your shape rotation skills (opens in a new tab)0xf00ff00f.github.io
659 pointsHi 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
Comments (195) 98 threads
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)
After the first couple of wrong guesses (though I'm pretty sure one guess was correct - could be the bug https://news.ycombinator.com/item?id=30408567) I started to count segment lengths rather than relying on mental shape rotation.
The shapes generally progress in difficulty until they are deemed “impossible” for any human shape rotator to figure out.
If you reduce the problem to counting instead of shape rotation (3D matrix multiplication) many humans can “shape rotate” to impossibly high levels of IQ
Continue this thread — 1 reply
Inspired by Super Hexagon (remember that?), you need to repeatedly tell a "snake" which way to go with the left and right arrow keys... while the game viewport twists and rotates randomly as it continually zooms out.
GoOd lUcK.
(It's from here, 1 month ago: https://news.ycombinator.com/item?id=29923707)
I incidentally find I have to mute the background music, as I really get into it (used to listen to it often!) and zone out... welp
(Also, for completeness - the APK link is sadly dead, but it still lives on on the scary APK sites that are out there, and my phone doesn't seem to mind it.)
https://woodgears.ca/eyeball/index.html
Thanks for the pointer!
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!
All comments shown.
Couldn't load more comments. Check your connection and try again.