Author Topic: 3 Dogs Rebuses  (Read 2242 times)

0 Members and 1 Guest are viewing this topic.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
3 Dogs Rebuses
« on: August 28, 2020, 01:52:33 pm »
https://www.qb64.org/forum/index.php?topic=2961.msg122153#msg122153

Google: What the heck is a rebus?

Ohhhh.... heh, heh

Here are 3 Dogs Rebuses, I just made up:
Code: QB64: [Select]
  1. _TITLE "3 Dogs Rebuses" 'b+ 2020-08-28
  2. ' who will get the 3rd one? ha, ha, ha
  3.  
  4. SCREEN _NEWIMAGE(800, 600, 32)
  5. _DELAY .25
  6.  
  7. f60 = _LOADFONT("Arial.ttf", 84)
  8. _FONT f60
  9. FOR i = 1 TO 3
  10.     LOCATE 2 + i, (800 - _PRINTWIDTH("dog")) / 2: PRINT "dog"; 'well that's wierd but works
  11. FOR r = 1 TO 3 STEP .1
  12.     Ellipse 400, 210, 150 + .5 * r, 50 + r, &HFFFFFFFF
  13. FOR i = 1 TO 3
  14.     _PRINTSTRING (i * 168, 450), "dog"
  15. fcirc 650, 120, 60, &HFFFFFFFF
  16. fcirc 600, 120, 60, &HFF000000
  17.  
  18. SUB Ellipse (CX, CY, xRadius AS INTEGER, yRadius AS INTEGER, C AS _UNSIGNED LONG)
  19.     '  CX = center x coordinate
  20.     '  CY = center y coordinate
  21.     '  xRadius = x axis radius
  22.     '  yRadius = y axis radius
  23.     '   C = fill color
  24.     DIM a, x, y, sq, delta, lastDelta
  25.     IF xRadius = 0 AND yRadius = 0 THEN EXIT SUB
  26.     IF xRadius = 0 THEN
  27.         LINE (CX, CY + yRadius)-(CX, CY - yRadius), C
  28.     ELSEIF yRadius = 0 THEN
  29.         LINE (CX + xRadius, CY)-(CX - xRadius, CY), C
  30.     ELSE
  31.         IF xRadius >= yRadius THEN
  32.             a = yRadius / xRadius: sq = xRadius * xRadius
  33.             FOR x = 0 TO xRadius
  34.                 IF x = 0 THEN
  35.                     lastDelta = SQR(sq - x * x) * a
  36.                 ELSE
  37.                     delta = SQR(sq - x * x) * a
  38.                     LINE (CX + (x - 1), CY + lastDelta)-(CX + x, CY + delta), C
  39.                     LINE (CX + (x - 1), CY - lastDelta)-(CX + x, CY - delta), C
  40.                     LINE (CX - (x - 1), CY + lastDelta)-(CX - x, CY + delta), C
  41.                     LINE (CX - (x - 1), CY - lastDelta)-(CX - x, CY - delta), C
  42.                     lastDelta = delta
  43.                 END IF
  44.             NEXT
  45.         ELSE
  46.             a = xRadius / yRadius: sq = yRadius * yRadius
  47.             FOR y = 0 TO yRadius
  48.                 IF y = 0 THEN
  49.                     lastDelta = SQR(sq - y * y) * a
  50.                 ELSE
  51.                     delta = SQR(sq - y * y) * a
  52.                     LINE (CX + lastDelta, CY + (y - 1))-(CX + delta, CY + y), C
  53.                     LINE (CX - lastDelta, CY + (y - 1))-(CX - delta, CY + y), C
  54.                     LINE (CX + lastDelta, CY - (y - 1))-(CX + delta, CY - y), C
  55.                     LINE (CX - lastDelta, CY - (y - 1))-(CX - delta, CY - y), C
  56.                     lastDelta = delta
  57.                 END IF
  58.             NEXT
  59.         END IF
  60.     END IF
  61.  
  62. SUB fcirc (CX AS INTEGER, CY AS INTEGER, R AS INTEGER, C AS _UNSIGNED LONG)
  63.     DIM Radius AS INTEGER, RadiusError AS INTEGER
  64.     DIM X AS INTEGER, Y AS INTEGER
  65.     Radius = ABS(R): RadiusError = -Radius: X = Radius: Y = 0
  66.     IF Radius = 0 THEN PSET (CX, CY), C: EXIT SUB
  67.     LINE (CX - X, CY)-(CX + X, CY), C, BF
  68.     WHILE X > Y
  69.         RadiusError = RadiusError + Y * 2 + 1
  70.         IF RadiusError >= 0 THEN
  71.             IF X <> Y + 1 THEN
  72.                 LINE (CX - Y, CY - X)-(CX + Y, CY - X), C, BF
  73.                 LINE (CX - Y, CY + X)-(CX + Y, CY + X), C, BF
  74.             END IF
  75.             X = X - 1
  76.             RadiusError = RadiusError - X * 2
  77.         END IF
  78.         Y = Y + 1
  79.         LINE (CX - X, CY - Y)-(CX + X, CY - Y), C, BF
  80.         LINE (CX - X, CY + Y)-(CX + X, CY + Y), C, BF
  81.     WEND
  82.  
  83.  

Here is a clue for the 3rd one: Meat Loaf

 
« Last Edit: August 28, 2020, 02:02:38 pm by bplus »

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
Re: 3 Dogs Rebuses
« Reply #1 on: August 28, 2020, 02:15:58 pm »
Extra Bonus Dog Rebus:
Code: QB64: [Select]
  1. _TITLE "Dog Rebus xtra bonus" 'b+ 2020-08-28
  2.  
  3. SCREEN _NEWIMAGE(800, 600, 32)
  4. _DELAY .25
  5.  
  6. f60 = _LOADFONT("Arial.ttf", 84)
  7. _FONT f60
  8. LOCATE 4, (800 - _PRINTWIDTH("dog")) / 2: PRINT "dog"; 'well that's wierd but works
  9. FOR r = 1 TO 3 STEP .1
  10.     Ellipse 400, 410, 150 + .5 * r, 50 + r, &HFFFFFFFF
  11.  
  12. SUB Ellipse (CX, CY, xRadius AS INTEGER, yRadius AS INTEGER, C AS _UNSIGNED LONG)
  13.     '  CX = center x coordinate
  14.     '  CY = center y coordinate
  15.     '  xRadius = x axis radius
  16.     '  yRadius = y axis radius
  17.     '   C = fill color
  18.     DIM a, x, y, sq, delta, lastDelta
  19.     IF xRadius = 0 AND yRadius = 0 THEN EXIT SUB
  20.     IF xRadius = 0 THEN
  21.         LINE (CX, CY + yRadius)-(CX, CY - yRadius), C
  22.     ELSEIF yRadius = 0 THEN
  23.         LINE (CX + xRadius, CY)-(CX - xRadius, CY), C
  24.     ELSE
  25.         IF xRadius >= yRadius THEN
  26.             a = yRadius / xRadius: sq = xRadius * xRadius
  27.             FOR x = 0 TO xRadius
  28.                 IF x = 0 THEN
  29.                     lastDelta = SQR(sq - x * x) * a
  30.                 ELSE
  31.                     delta = SQR(sq - x * x) * a
  32.                     LINE (CX + (x - 1), CY + lastDelta)-(CX + x, CY + delta), C
  33.                     LINE (CX + (x - 1), CY - lastDelta)-(CX + x, CY - delta), C
  34.                     LINE (CX - (x - 1), CY + lastDelta)-(CX - x, CY + delta), C
  35.                     LINE (CX - (x - 1), CY - lastDelta)-(CX - x, CY - delta), C
  36.                     lastDelta = delta
  37.                 END IF
  38.             NEXT
  39.         ELSE
  40.             a = xRadius / yRadius: sq = yRadius * yRadius
  41.             FOR y = 0 TO yRadius
  42.                 IF y = 0 THEN
  43.                     lastDelta = SQR(sq - y * y) * a
  44.                 ELSE
  45.                     delta = SQR(sq - y * y) * a
  46.                     LINE (CX + lastDelta, CY + (y - 1))-(CX + delta, CY + y), C
  47.                     LINE (CX - lastDelta, CY + (y - 1))-(CX - delta, CY + y), C
  48.                     LINE (CX + lastDelta, CY - (y - 1))-(CX + delta, CY - y), C
  49.                     LINE (CX - lastDelta, CY - (y - 1))-(CX - delta, CY - y), C
  50.                     lastDelta = delta
  51.                 END IF
  52.             NEXT
  53.         END IF
  54.     END IF
  55.  
  56.  

Offline SierraKen

  • Forum Resident
  • Posts: 1454
Re: 3 Dogs Rebuses
« Reply #2 on: August 28, 2020, 04:33:17 pm »
The band 3 Dog Night ?

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
Re: 3 Dogs Rebuses
« Reply #3 on: August 28, 2020, 06:04:45 pm »
The band 3 Dog Night ?

Yes that's the 2nd one ;-) Celebrate,...

Offline SpriggsySpriggs

  • Forum Resident
  • Posts: 1145
  • Larger than life
    • GitHub
Re: 3 Dogs Rebuses
« Reply #4 on: August 31, 2020, 03:39:24 pm »
Top dog?
Shuwatch!

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
Re: 3 Dogs Rebuses
« Reply #5 on: August 31, 2020, 04:10:51 pm »
Top dog?

Yes sir! Two down, I will be really surprised if any one is weird enough to get the third. What third? you may well ask. :)  I may well answer that is part of the rebus. ;-))

The Bonus is pretty easy too. Of course its easy when you know the answer. Of course someone might come up with a perfectly good alternate interpretation.

I have one for 3 utilities connecting to 3 houses without crossing lines.
« Last Edit: August 31, 2020, 04:17:15 pm by bplus »