Author Topic: Crop Circles  (Read 5498 times)

0 Members and 1 Guest are viewing this topic.

This topic contains a post which is marked as Best Answer. Press here if you would like to see it.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Crop Circles
« on: January 25, 2021, 04:12:42 pm »
Crop circles: 2 color geometric design with shades of fractal or whatever looks intelligently designed or fun!

Crop Circles #3 mod
Code: QB64: [Select]
  1. _TITLE "Crop Circles #3" 'b+ trans and mod to QB64 2021-01-25
  2.  
  3. CONST Xmax = 730, Ymax = 730, Cx = Xmax / 2, Cy = Ymax / 2
  4. SCREEN _NEWIMAGE(Xmax, Ymax, 32)
  5. _DELAY .25
  6.  
  7. Hc = _RGB32(240, 220, 80): Lc = _RGB32(100, 50, 10): n = 12: stp = -40
  8. COLOR , Hc
  9. FOR br = 360 TO 0 STEP stp
  10.     shft = shft + 720 / (n * n)
  11.     FOR i = 1 TO n
  12.         x = Cx + br * COS(_D2R(i * 360 / n + shft))
  13.         y = Cy + br * SIN(_D2R(i * 360 / n + shft))
  14.         drawc x, y
  15.         _LIMIT 10
  16.     NEXT
  17.  
  18. SUB drawc (mx, my)
  19.     'local m,cr,dx,dy,dr,i,cc
  20.     cr = .5 * SQR((Cx - mx) ^ 2 + (Cy - my) ^ 2): m = .5 * cr
  21.     dx = (mx - Cx) / m: dy = (my - Cy) / m: dr = cr / m
  22.     FOR i = m TO 0 STEP -1
  23.         IF i MOD 2 = 0 THEN cc = Hc ELSE cc = Lc
  24.         x = Cx + dx * (m - i): y = Cy + dy * (m - i): r = dr * i
  25.         fcirc x, y, r, cc
  26.     NEXT
  27.  
  28. SUB fcirc (CX AS LONG, CY AS LONG, R AS LONG, C AS _UNSIGNED LONG)
  29.     DIM Radius AS LONG, RadiusError AS LONG
  30.     DIM X AS LONG, Y AS LONG
  31.     Radius = ABS(R): RadiusError = -Radius: X = Radius: Y = 0
  32.     IF Radius = 0 THEN PSET (CX, CY), C: EXIT SUB
  33.     LINE (CX - X, CY)-(CX + X, CY), C, BF
  34.     WHILE X > Y
  35.         RadiusError = RadiusError + Y * 2 + 1
  36.         IF RadiusError >= 0 THEN
  37.             IF X <> Y + 1 THEN
  38.                 LINE (CX - Y, CY - X)-(CX + Y, CY - X), C, BF
  39.                 LINE (CX - Y, CY + X)-(CX + Y, CY + X), C, BF
  40.             END IF
  41.             X = X - 1
  42.             RadiusError = RadiusError - X * 2
  43.         END IF
  44.         Y = Y + 1
  45.         LINE (CX - X, CY - Y)-(CX + X, CY - Y), C, BF
  46.         LINE (CX - X, CY + Y)-(CX + X, CY + Y), C, BF
  47.     WEND
  48.  
  49.  
  50.  

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
Re: Crop Circles
« Reply #1 on: January 25, 2021, 05:32:28 pm »
You obviously have non-traditional aliens where you live...

Nicely done... Does it come in blue... lol  Kidding....
Logic is the beginning of wisdom.

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: Crop Circles
« Reply #2 on: January 25, 2021, 05:35:58 pm »
I want a slower frames version, with a zoom feature... so I can see Steve on his tractor, making those crop circles. We all know it's him!!!

Pete
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline SierraKen

  • Forum Resident
  • Posts: 1454
    • View Profile
Re: Crop Circles
« Reply #3 on: January 25, 2021, 05:52:45 pm »
Awesome B+! I decided to change one line to make the colors red and green to make it a flower.

Code: QB64: [Select]
  1. _TITLE "Crop Circles #3" 'b+ trans and mod to QB64 2021-01-25
  2.  
  3. CONST Xmax = 730, Ymax = 730, Cx = Xmax / 2, Cy = Ymax / 2
  4. SCREEN _NEWIMAGE(Xmax, Ymax, 32)
  5. _DELAY .25
  6.  
  7. 'Color mod by SierraKen to look like a flower.
  8. 'Hc = _RGB32(240, 220, 80): Lc = _RGB32(100, 50, 10): n = 12: stp = -40
  9. Hc = _RGB32(0, 255, 0): Lc = _RGB32(255, 0, 0): n = 12: stp = -40
  10. COLOR , Hc
  11. FOR br = 360 TO 0 STEP stp
  12.     shft = shft + 720 / (n * n)
  13.     FOR i = 1 TO n
  14.         x = Cx + br * COS(_D2R(i * 360 / n + shft))
  15.         y = Cy + br * SIN(_D2R(i * 360 / n + shft))
  16.         drawc x, y
  17.         _LIMIT 10
  18.     NEXT
  19.  
  20. SUB drawc (mx, my)
  21.     'local m,cr,dx,dy,dr,i,cc
  22.     cr = .5 * SQR((Cx - mx) ^ 2 + (Cy - my) ^ 2): m = .5 * cr
  23.     dx = (mx - Cx) / m: dy = (my - Cy) / m: dr = cr / m
  24.     FOR i = m TO 0 STEP -1
  25.         IF i MOD 2 = 0 THEN cc = Hc ELSE cc = Lc
  26.         x = Cx + dx * (m - i): y = Cy + dy * (m - i): r = dr * i
  27.         fcirc x, y, r, cc
  28.     NEXT
  29.  
  30. SUB fcirc (CX AS LONG, CY AS LONG, R AS LONG, C AS _UNSIGNED LONG)
  31.     DIM Radius AS LONG, RadiusError AS LONG
  32.     DIM X AS LONG, Y AS LONG
  33.     Radius = ABS(R): RadiusError = -Radius: X = Radius: Y = 0
  34.     IF Radius = 0 THEN PSET (CX, CY), C: EXIT SUB
  35.     LINE (CX - X, CY)-(CX + X, CY), C, BF
  36.     WHILE X > Y
  37.         RadiusError = RadiusError + Y * 2 + 1
  38.         IF RadiusError >= 0 THEN
  39.             IF X <> Y + 1 THEN
  40.                 LINE (CX - Y, CY - X)-(CX + Y, CY - X), C, BF
  41.                 LINE (CX - Y, CY + X)-(CX + Y, CY + X), C, BF
  42.             END IF
  43.             X = X - 1
  44.             RadiusError = RadiusError - X * 2
  45.         END IF
  46.         Y = Y + 1
  47.         LINE (CX - X, CY - Y)-(CX + X, CY - Y), C, BF
  48.         LINE (CX - X, CY + Y)-(CX + X, CY + Y), C, BF
  49.     WEND
  50.  

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Crop Circles
« Reply #4 on: January 25, 2021, 06:58:22 pm »
I want a slower frames version, with a zoom feature... so I can see Steve on his tractor, making those crop circles. We all know it's him!!!

Pete

Sure, sure but not a tractor, QB64!  ;-))

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: Crop Circles
« Reply #5 on: January 25, 2021, 07:11:38 pm »
I lost a good first officer, adrift in space that way. I yelled to Ensign Steve, "Engage the tractor beam! To which he immediately went to the shuttle bay, and engaged the headlight on the John Deere. Oh well.

- Pete out.
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Crop Circles
« Reply #6 on: January 25, 2021, 07:26:41 pm »
@johnno56 and @SierraKen  different colors huh?

OK let's take a look into my little bag of tricks...

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Crop Circles
« Reply #7 on: January 25, 2021, 09:21:15 pm »
OK here is what my tractor beam from my ship can do:
Code: QB64: [Select]
  1. _TITLE "Crop Circles #3 Mod 1 Zap Color Changes" 'b+ trans and mod to QB64 2021-01-25
  2.  
  3. CONST Xmax = 1024, Ymax = 730, Cx = Xmax / 2, Cy = Ymax / 2
  4. SCREEN _NEWIMAGE(Xmax, Ymax, 32)
  5. _DELAY .25
  6. HighColr = _RGB32(240, 220, 80): LowColr = _RGB32(100, 50, 10)
  7. makeCCircle
  8.     _PUTIMAGE , CCircle, 0
  9.     WHILE _MOUSEINPUT: WEND 'aim with mouse
  10.     mx = _MOUSEX: my = _MOUSEY: mb = _MOUSEBUTTON(1)
  11.     drawShip mx, my, LowColr
  12.     IF mb THEN
  13.         PLC mx, my, Cx, Cy, 360
  14.         _DISPLAY
  15.         FlagChange = -1
  16.     END IF
  17.     IF FlagChange THEN
  18.         makeCCircle
  19.         FlagChange = 0
  20.     END IF
  21.     _DISPLAY
  22.  
  23. SUB makeCCircle
  24.     IF CCircle THEN _FREEIMAGE CCircle
  25.     CCircle = _NEWIMAGE(_WIDTH, _HEIGHT, 32)
  26.     _DEST CCircle
  27.     n = 12: stp = -40
  28.     COLOR , HighColr
  29.     CLS
  30.     FOR br = 360 TO 0 STEP stp
  31.         shft = shft + 720 / (n * n)
  32.         FOR i = 1 TO n
  33.             x = Cx + br * COS(_D2R(i * 360 / n + shft))
  34.             y = Cy + br * SIN(_D2R(i * 360 / n + shft))
  35.             drawc x, y
  36.         NEXT
  37.     NEXT
  38.     _DEST 0
  39.  
  40. SUB drawc (mx, my)
  41.     cr = .5 * SQR((Cx - mx) ^ 2 + (Cy - my) ^ 2): m = .5 * cr
  42.     dx = (mx - Cx) / m: dy = (my - Cy) / m: dr = cr / m
  43.     FOR i = m TO 0 STEP -1
  44.         IF i MOD 2 = 0 THEN cc = HighColr ELSE cc = LowColr
  45.         x = Cx + dx * (m - i): y = Cy + dy * (m - i): r = dr * i
  46.         fcirc x, y, r, cc
  47.     NEXT
  48.  
  49. SUB fcirc (CX AS LONG, CY AS LONG, R AS LONG, C AS _UNSIGNED LONG)
  50.     DIM Radius AS LONG, RadiusError AS LONG
  51.     DIM X AS LONG, Y AS LONG
  52.     Radius = ABS(R): RadiusError = -Radius: X = Radius: Y = 0
  53.     IF Radius = 0 THEN PSET (CX, CY), C: EXIT SUB
  54.     LINE (CX - X, CY)-(CX + X, CY), C, BF
  55.     WHILE X > Y
  56.         RadiusError = RadiusError + Y * 2 + 1
  57.         IF RadiusError >= 0 THEN
  58.             IF X <> Y + 1 THEN
  59.                 LINE (CX - Y, CY - X)-(CX + Y, CY - X), C, BF
  60.                 LINE (CX - Y, CY + X)-(CX + Y, CY + X), C, BF
  61.             END IF
  62.             X = X - 1
  63.             RadiusError = RadiusError - X * 2
  64.         END IF
  65.         Y = Y + 1
  66.         LINE (CX - X, CY - Y)-(CX + X, CY - Y), C, BF
  67.         LINE (CX - X, CY + Y)-(CX + X, CY + Y), C, BF
  68.     WEND
  69.  
  70. SUB PLC (baseX, baseY, targetX, targetY, targetR) ' PLC for PlasmaLaserCannon
  71.     r = RND ^ 2 * RND: g = RND ^ 2 * RND: b = RND ^ 2 * RND: hp = _PI(.5) ' red, green, blue, half pi
  72.     ta = _ATAN2(targetY - baseY, targetX - baseX) ' angle of target to cannon base
  73.     dist = _HYPOT(targetY - baseY, targetX - baseX) ' distance cannon to target
  74.     dr = targetR / dist
  75.     FOR r = 0 TO dist STEP .25
  76.         x = baseX + r * COS(ta)
  77.         y = baseY + r * SIN(ta)
  78.         C = C + .3
  79.         fcirc x, y, dr * r, _RGB32(128 + 127 * SIN(r * C), 128 + 127 * SIN(g * C), 128 + 127 * SIN(b * C))
  80.     NEXT
  81.     FOR rr = dr * r TO 0 STEP -.5
  82.         C = C + 1
  83.         LowColr = _RGB32(128 + 127 * SIN(r * C), 128 + 127 * SIN(g * C), 128 + 127 * SIN(b * C))
  84.         fcirc x, y, rr, LowColr
  85.     NEXT
  86.     cAnalysis LowColr, rr, gg, bb, aa
  87.     HighColr = _RGB32(255 - rr, 255 - gg, 255 - bb)
  88.  
  89. SUB cAnalysis (c AS _UNSIGNED LONG, outRed, outGrn, outBlu, outAlp)
  90.     outRed = _RED32(c): outGrn = _GREEN32(c): outBlu = _BLUE32(c): outAlp = _ALPHA32(c)
  91.  
  92. SUB drawShip (x, y, colr AS _UNSIGNED LONG) 'shipType     collisions same as circle x, y radius = 30
  93.     STATIC ls
  94.     DIM light AS LONG, r AS LONG, g AS LONG, b AS LONG
  95.     r = _RED32(colr): g = _GREEN32(colr): b = _BLUE32(colr)
  96.     fellipse x, y, 6, 15, _RGB32(r, g - 120, b - 100)
  97.     fellipse x, y, 18, 11, _RGB32(r, g - 60, b - 50)
  98.     fellipse x, y, 30, 7, _RGB32(r, g, b)
  99.     FOR light = 0 TO 5
  100.         fcirc x - 30 + 11 * light + ls, y, 1, _RGB32(ls * 50, ls * 50, ls * 50)
  101.     NEXT
  102.     ls = ls + 1
  103.     IF ls > 5 THEN ls = 0
  104.  
  105. SUB fellipse (CX AS LONG, CY AS LONG, xr AS LONG, yr AS LONG, C AS _UNSIGNED LONG)
  106.     IF xr = 0 OR yr = 0 THEN EXIT SUB
  107.     DIM x AS LONG, y AS LONG
  108.     w2 = xr * xr: h2 = yr * yr: h2w2 = h2 * w2
  109.     LINE (CX - xr, CY)-(CX + xr, CY), C, BF
  110.     DO WHILE y < yr
  111.         y = y + 1
  112.         x = SQR((h2w2 - y * y * w2) \ h2)
  113.         LINE (CX - x, CY + y)-(CX + x, CY + y), C, BF
  114.         LINE (CX - x, CY - y)-(CX + x, CY - y), C, BF
  115.     LOOP
  116.  
  117.  

Oh yeah! wear your laser safety glasses unless you have a welders helmet ;-))
« Last Edit: January 25, 2021, 09:30:06 pm by bplus »

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: Crop Circles
« Reply #8 on: January 25, 2021, 10:03:56 pm »
Okay, that was very amusing, to say the least. Ensign Steve, eat your heart out!

Pete
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline SierraKen

  • Forum Resident
  • Posts: 1454
    • View Profile
Re: Crop Circles
« Reply #9 on: January 25, 2021, 10:45:36 pm »
The UFO is back!!! Run for your lives!!!!!!!! :D

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
Re: Crop Circles
« Reply #10 on: January 26, 2021, 07:16:52 am »
You have excelled yourself yet again!!
Logic is the beginning of wisdom.

Offline Dav

  • Forum Resident
  • Posts: 792
    • View Profile
Re: Crop Circles
« Reply #11 on: January 26, 2021, 08:11:47 am »
Cool effect.  Nice coding!.

Edit:  I had to play around with it...

Code: QB64: [Select]
  1. _TITLE "Crop Circles #3 Mod 1 Zap Color Changes" 'b+ trans and mod to QB64 2021-01-25
  2.  
  3. CONST Xmax = 1024, Ymax = 730, Cx = Xmax / 2, Cy = Ymax / 2
  4. SCREEN _NEWIMAGE(Xmax, Ymax, 32)
  5. _DELAY .25
  6. HighColr = _RGB32(240, 220, 80): LowColr = _RGB32(100, 50, 10)
  7. makeCCircle
  8.     _PUTIMAGE , CCircle, 0
  9.     WHILE _MOUSEINPUT: WEND 'aim with mouse
  10.     mx = _MOUSEX: my = _MOUSEY: mb = _MOUSEBUTTON(1)
  11.     drawShip mx, my, LowColr
  12.     IF mb THEN
  13.         PLC mx, my, Cx, Cy, 360
  14.         _DISPLAY
  15.         FlagChange = -1
  16.     END IF
  17.     IF FlagChange THEN
  18.         makeCCircle
  19.         FlagChange = 0
  20.     END IF
  21.  
  22.  
  23.     temp& = _COPYIMAGE(_DISPLAY)
  24.     RotoZoom _WIDTH / 2, _HEIGHT / 2, temp&, 1, angle
  25.     angle = angle + 3: IF angle >= 360 THEN angle = angle - 360
  26.     _FREEIMAGE temp&
  27.     _DISPLAY
  28.     _DELAY .01
  29.  
  30.  
  31.  
  32. SUB makeCCircle
  33.     IF CCircle THEN _FREEIMAGE CCircle
  34.     CCircle = _NEWIMAGE(_WIDTH, _HEIGHT, 32)
  35.     _DEST CCircle
  36.     n = 12: stp = -40
  37.     COLOR , HighColr
  38.     CLS
  39.     FOR br = 360 TO 0 STEP stp
  40.         shft = shft + 720 / (n * n)
  41.         FOR i = 1 TO n
  42.             x = Cx + br * COS(_D2R(i * 360 / n + shft))
  43.             y = Cy + br * SIN(_D2R(i * 360 / n + shft))
  44.             drawc x, y
  45.         NEXT
  46.     NEXT
  47.     _DEST 0
  48.  
  49. SUB drawc (mx, my)
  50.     cr = .5 * SQR((Cx - mx) ^ 2 + (Cy - my) ^ 2): m = .5 * cr
  51.     dx = (mx - Cx) / m: dy = (my - Cy) / m: dr = cr / m
  52.     FOR i = m TO 0 STEP -1
  53.         IF i MOD 2 = 0 THEN cc = HighColr ELSE cc = LowColr
  54.         x = Cx + dx * (m - i): y = Cy + dy * (m - i): r = dr * i
  55.         fcirc x, y, r, cc
  56.     NEXT
  57.  
  58. SUB fcirc (CX AS LONG, CY AS LONG, R AS LONG, C AS _UNSIGNED LONG)
  59.     DIM Radius AS LONG, RadiusError AS LONG
  60.     DIM X AS LONG, Y AS LONG
  61.     Radius = ABS(R): RadiusError = -Radius: X = Radius: Y = 0
  62.     IF Radius = 0 THEN PSET (CX, CY), C: EXIT SUB
  63.     LINE (CX - X, CY)-(CX + X, CY), C, BF
  64.     WHILE X > Y
  65.         RadiusError = RadiusError + Y * 2 + 1
  66.         IF RadiusError >= 0 THEN
  67.             IF X <> Y + 1 THEN
  68.                 LINE (CX - Y, CY - X)-(CX + Y, CY - X), C, BF
  69.                 LINE (CX - Y, CY + X)-(CX + Y, CY + X), C, BF
  70.             END IF
  71.             X = X - 1
  72.             RadiusError = RadiusError - X * 2
  73.         END IF
  74.         Y = Y + 1
  75.         LINE (CX - X, CY - Y)-(CX + X, CY - Y), C, BF
  76.         LINE (CX - X, CY + Y)-(CX + X, CY + Y), C, BF
  77.     WEND
  78.  
  79. SUB PLC (baseX, baseY, targetX, targetY, targetR) ' PLC for PlasmaLaserCannon
  80.     r = RND ^ 2 * RND: g = RND ^ 2 * RND: b = RND ^ 2 * RND: hp = _PI(.5) ' red, green, blue, half pi
  81.     ta = _ATAN2(targetY - baseY, targetX - baseX) ' angle of target to cannon base
  82.     dist = _HYPOT(targetY - baseY, targetX - baseX) ' distance cannon to target
  83.     dr = targetR / dist
  84.     FOR r = 0 TO dist STEP .25
  85.         x = baseX + r * COS(ta)
  86.         y = baseY + r * SIN(ta)
  87.         C = C + .3
  88.         fcirc x, y, dr * r, _RGB32(128 + 127 * SIN(r * C), 128 + 127 * SIN(g * C), 128 + 127 * SIN(b * C))
  89.     NEXT
  90.     FOR rr = dr * r TO 0 STEP -.5
  91.         C = C + 1
  92.         LowColr = _RGB32(128 + 127 * SIN(r * C), 128 + 127 * SIN(g * C), 128 + 127 * SIN(b * C))
  93.         fcirc x, y, rr, LowColr
  94.     NEXT
  95.     cAnalysis LowColr, rr, gg, bb, aa
  96.     HighColr = _RGB32(255 - rr, 255 - gg, 255 - bb)
  97.  
  98. SUB cAnalysis (c AS _UNSIGNED LONG, outRed, outGrn, outBlu, outAlp)
  99.     outRed = _RED32(c): outGrn = _GREEN32(c): outBlu = _BLUE32(c): outAlp = _ALPHA32(c)
  100.  
  101. SUB drawShip (x, y, colr AS _UNSIGNED LONG) 'shipType     collisions same as circle x, y radius = 30
  102.     STATIC ls
  103.     DIM light AS LONG, r AS LONG, g AS LONG, b AS LONG
  104.     r = _RED32(colr): g = _GREEN32(colr): b = _BLUE32(colr)
  105.     fellipse x, y, 6, 15, _RGB32(r, g - 120, b - 100)
  106.     fellipse x, y, 18, 11, _RGB32(r, g - 60, b - 50)
  107.     fellipse x, y, 30, 7, _RGB32(r, g, b)
  108.     FOR light = 0 TO 5
  109.         fcirc x - 30 + 11 * light + ls, y, 1, _RGB32(ls * 50, ls * 50, ls * 50)
  110.     NEXT
  111.     ls = ls + 1
  112.     IF ls > 5 THEN ls = 0
  113.  
  114. SUB fellipse (CX AS LONG, CY AS LONG, xr AS LONG, yr AS LONG, C AS _UNSIGNED LONG)
  115.     IF xr = 0 OR yr = 0 THEN EXIT SUB
  116.     DIM x AS LONG, y AS LONG
  117.     w2 = xr * xr: h2 = yr * yr: h2w2 = h2 * w2
  118.     LINE (CX - xr, CY)-(CX + xr, CY), C, BF
  119.     DO WHILE y < yr
  120.         y = y + 1
  121.         x = SQR((h2w2 - y * y * w2) \ h2)
  122.         LINE (CX - x, CY + y)-(CX + x, CY + y), C, BF
  123.         LINE (CX - x, CY - y)-(CX + x, CY - y), C, BF
  124.     LOOP
  125.  
  126. SUB RotoZoom (X AS LONG, Y AS LONG, Image AS LONG, Scale AS SINGLE, Rotation AS SINGLE)
  127.     DIM px(3) AS SINGLE: DIM py(3) AS SINGLE
  128.     W& = _WIDTH(Image&): H& = _HEIGHT(Image&)
  129.     px(0) = -W& / 2: py(0) = -H& / 2: px(1) = -W& / 2: py(1) = H& / 2
  130.     px(2) = W& / 2: py(2) = H& / 2: px(3) = W& / 2: py(3) = -H& / 2
  131.     sinr! = SIN(-Rotation / 57.2957795131): cosr! = COS(-Rotation / 57.2957795131)
  132.     FOR i& = 0 TO 3
  133.         x2& = (px(i&) * cosr! + sinr! * py(i&)) * Scale + X: y2& = (py(i&) * cosr! - px(i&) * sinr!) * Scale + Y
  134.         px(i&) = x2&: py(i&) = y2&
  135.     NEXT
  136.     _MAPTRIANGLE _SEAMLESS(0, 0)-(0, H& - 1)-(W& - 1, H& - 1), Image& TO(px(0), py(0))-(px(1), py(1))-(px(2), py(2))
  137.     _MAPTRIANGLE _SEAMLESS(0, 0)-(W& - 1, 0)-(W& - 1, H& - 1), Image& TO(px(0), py(0))-(px(3), py(3))-(px(2), py(2))
  138.  
  139.  

- Dav
« Last Edit: January 26, 2021, 08:20:04 am by Dav »

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: Crop Circles
« Reply #12 on: January 26, 2021, 11:37:25 am »
As Steve's attorney, I have to warn you against stealing his intellectual property. You know, ROTATING CROPS.

Help! I'm in a flat spin.......

Pete :D
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Crop Circles
« Reply #13 on: January 26, 2021, 12:16:08 pm »
Ha! Dav now I know what the aliens saw just before they crashed in Roswell ;-))

Well I think the current crop circle design is getting old and we need to zap some new ones.

Some ideas:
https://www.google.com/search?q=crop+circles&client=opera&hs=Vr&sxsrf=ALeKk03o1a04wOu4VzeNoGFGFOaq87A6Xw:1611681406788&source=lnms&tbm=isch&sa=X&ved=2ahUKEwiIhPiNjbruAhUTBs0KHVIzBKAQ_AUoAXoECAgQAw&biw=1179&bih=606
« Last Edit: January 26, 2021, 12:18:06 pm by bplus »

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: Crop Circles
« Reply #14 on: January 26, 2021, 01:30:13 pm »
I have a comic I photoshopped to a site once regarding the Roswell incident.

It was a saucer, half embedded in the ground at a 45-degree angle, and around the hull of the saucer, I printed "Student Flyer"

Pete
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/