Rotation without rotating.

preview_player
Показать описание


CORRECTIONS
- None yet, let me know if you spot anything!

Filming by Alex Genn-Bash
Editing by Dan Daniel
Written and performed by Matt Parker
Graphics by Matt Parker and Andrew Taylor
Produced by Nicole Jacobus
Music by Howard Carter
Design by Simon Wright and Adam Robinson

MATT PARKER: Stand-up Mathematician
Рекомендации по теме
Комментарии
Автор

A different problem happened when scientists first tried to watch the earth rotate for 24 straight hours. They got super tired...so they called it a day.

SciShow
Автор

Next video: "Someone improved my skew code by 40, 832, 277, 770%"

Xphomegra
Автор

Finally someone calls out low-res art for defying the pixel grid!

altreusplays
Автор

Crazy that the day after this video released, SethBling released a video where skew rotation was actually useful and integral to his project

sol_in.victus
Автор

I'm a retro game dev, so this technique is right up my alley. I'm shocked I didn't know about this already. Thanks for making this video!

I actually wrote my own matrix math transformation routines for translation/rotation/scale in C for SGI workstations/supercomputer in C 30 years ago, for an artificial life virtual reality game that I was developing for SGI. I had found the routines in GL (which soon evolved into OpenGL) at the time to be inadequate for real-time virtual reality, and my own routines solved my problems.

Back then I was all about VR on the highest-end systems possible (I had an Onyx RealityEngine2 as my personal computer, provided by the company I worked for, for several months back then), but anymore I am far more interested in developing for the microcomputers and consoles that came out from the 70s until the early 90s and the handhelds up until the early 2000s.

RetroDawn
Автор

14:25 The hand waving rationalization of "This is fine." after successful completion of a perfect "Parker Rotation."

Ixions
Автор

I think this is more honest than most youtubers. I love that you kept the erroneous skew in the video, Matt. However I probably would have left it in as a blooper, and "reskewed" it correctly.

In the spirit of your honesty I'll admit, that I have only tried doing a rotation with two skew matrices, but never three. Once you learn about skew matrices for the first time, I think that trying this out seems a very intuititive thing to infer, attempt at it, fail at it, let go of with the intent to try again at a later point, and finally forget about it to never ever try it again. Thank you for setting me straight!

krabbediem
Автор

6:24 "my code is not so much a blender as it is a juice loosener" 🤣🤣

EricSullenberger
Автор

Wait, this is the math that Sethbling used in his new Rigid Body Minecraft Datapack. Because Minecraft’s native Block Display Entity only does skews, stretches, and translations. So he could only do rotations via skews

evansaschow
Автор

You can use this information to rotate images in Microsoft Paint.
Step 1: Horizontal skew by theta/2 degrees.
Step 2: Vertical skew by -arctan(sin theta).
Step 3: Same as Step 1.

Bug workaround: you have to paste a minus sign into the text field, because you can't type it in

txikitofandango
Автор

8:25 code review:
1) int() doesn't round to a whole number, it truncates. That may actually be what you want, since it means you only move the pixel right or left if it passes the full pixel width threshold.

2) You're using mod to clip the image, which creates the weird wraparound. If the width needs to be accounted for at all, you probably would be better off by doing a pure clip. Drop the information for pixels outside of the range.

3) Put the image into a numpy array, use linear algebra to apply the transform to the entire image instead of calculating a new location for each pixel.

chrism
Автор

I remember almost discovering this myself as a kid playing with old MS Paint. There weren't free rotation functions in Paint, but there were skew functions. I figured out that I could "rotate" images by skewing them equally horizontally and vertically, and then fiddle about with the aspect ratio a bit. Never thought of applying a third skew!

twotothehalf
Автор

Article from 1986 has always stuck with me. Multiple single direction skews of a picture quickly devolves into chaos with intermittent return of part of original pattern (Chaos, Scientific American 54:12 (1986) 46-57). Phenomenon related to Poincaré Recurrence. Potential video topic.

jonellingson
Автор

1:10 YES!!! Finally somebody says it, it annoys me so much when "lo-fi" sprites are rotated in a very high resolution "canvas"

georgH
Автор

Kind of glad to see this, I remember when I was a kid I would try to do this in MSPaint, because you couldn't do non-90-degree rotates in MSPaint, but I could get very close to getting "clean rotations" with skew operations. I could never get it to be quite exactly right looking, though.

tciddados
Автор

Back in oldschool microsoft paint, you weren't able to rotate stuff, so instead i eyeballed it with 2 skews. Even back then i recall thinking there's probably a perfect way to do it, i just didn't know it. So yea i'm prety much the exact person this video is made for.

Jeroen_Ech
Автор

I've been working on a video game for a lil bit and decided to take a break by watching this video only to realize this exact thing can be used to fix an issue ive been having! Thanks Matt!

FelicitousFerret
Автор

Matt saying "look up matrices if you don't already know them" reminds me that a great deal of us have already heard of what he's on about but, heck, we love him for the joy he brings to the material we... ought to know better than we do...

mattbox
Автор

I believe this is how Mode 7 on the SNES works. it achieves rotation by skewing various amounts in both the x and y axes.

gravelstudios
Автор

I was chipping away at a tool for rendering the signed distance functions of shapes in Blender when I ran into trouble with rotation. Little did I know, this treasure of a video had just been uploaded two hours ago and recommended to me by pure chance! It's exactly what I needed, my shapes are rotating perfectly, and you've definitely earned my subscription with this. Thank you so much!

earzo