Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Impossible Oval
#1
I had to try this QB64pe style: https://qb64phoenix.com/forum/showthread...2#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
b = b + ...
Reply
#2
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!
Of all the places on Earth, and all the planets in the Universe, I'd rather live here (Perth, W.A.) Big Grin
Please visit my Website at: http://oldendayskids.blogspot.com/
Reply
#3
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
b = b + ...
Reply
#4
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
Of all the places on Earth, and all the planets in the Universe, I'd rather live here (Perth, W.A.) Big Grin
Please visit my Website at: http://oldendayskids.blogspot.com/
Reply
#5
Moebius Strip! I remember making these out of paper as a kid. Beautiful representation, too. My paper ones never looked that good!
RokCoder - dabbling in QB64pe for fun
Reply
#6
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
Of all the places on Earth, and all the planets in the Universe, I'd rather live here (Perth, W.A.) Big Grin
Please visit my Website at: http://oldendayskids.blogspot.com/
Reply




Users browsing this thread: 1 Guest(s)