QB64 Phoenix Edition
Impossible Oval - Printable Version

+- QB64 Phoenix Edition (https://qb64phoenix.com/forum)
+-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1)
+--- Forum: Code and Stuff (https://qb64phoenix.com/forum/forumdisplay.php?fid=3)
+---- Forum: Programs (https://qb64phoenix.com/forum/forumdisplay.php?fid=7)
+---- Thread: Impossible Oval (/showthread.php?tid=1417)



Impossible Oval - bplus - 01-23-2023

I had to try this QB64pe style: https://qb64phoenix.com/forum/showthread.php?tid=1398&pid=12972#pid12972

Code: (Select All)
_Title "Impossible Oval" 'b+ 2023-01-23

Screen _NewImage(800, 600, 32)
Dim As Long block
block = _NewImage(80, 40, 32)
_Dest block
For y = 0 To 40
    Line (0, y)-(100, y), midInk~&(80, 0, 0, 255, 100, 100, 1 - y / 40), BF
Next
_Dest 0
r = 230: a = 0
Do
    x = 410 + r * 1.5 * Cos(a): y = 300 + r * Sin(a)
    _PutImage (x - 50, y - 20), block, 0
    a = a + .002
    _Limit 1000
Loop Until a >= _Pi(2.47)

Function midInk~& (r1%, g1%, b1%, r2%, g2%, b2%, fr##)
    midInk~& = _RGB32(r1% + (r2% - r1%) * fr##, g1% + (g2% - g1%) * fr##, b1% + (b2% - b1%) * fr##)
End Function



RE: Impossible Oval - PhilOfPerth - 01-23-2023

Looks like the legendary Moebius Strip - a piece of paper that only has one surface!.
Had a lot of fun with that with my Grandkids, cutting it up and trying to guess the results.
Very nice presentation!


RE: Impossible Oval - bplus - 01-23-2023

I heard they tried using that for things like fan belts to take 2x's as long to wear out.

Thankyou, I got the idea from Charlie who is going though old QB snippets and finding some nice gems. Smile


RE: Impossible Oval - PhilOfPerth - 01-23-2023

I'd never thought about that sort of application for the Moebius Strip, that's very interesting.
Try and imagine a car tyre (tire) with this ability!  Of course, it would have to be flat to begin with! Tongue


RE: Impossible Oval - RokCoder - 01-27-2023

Moebius Strip! I remember making these out of paper as a kid. Beautiful representation, too. My paper ones never looked that good!


RE: Impossible Oval - PhilOfPerth - 01-27-2023

Yes, it's an intriguing device! 

I sometimes make one for the Grandkids or friends, and play a game with them. I ask them to cut the strip lengthwise, but write down first what the result will be, specifying how many pieces, how (or if) they are linked, and how many half-twists will be in each piece, then to repeat the operation on each piece. It's amusing to watch their eyes rolling as they try to imagine what will happen .  Big Grin