here2share

# tk_Orange_Spiral_Sphere.py

May 8th, 2026
133
0
Never
5
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 3.02 KB | None | 0 0
  1. # tk_Orange_Spiral_Sphere.py
  2.  
  3. import tkinter as tk
  4. import math
  5. import random
  6. import array
  7. import struct
  8.  
  9. WIDTH, HEIGHT = 600, 600
  10. LINEWIDTH = 3
  11. FOV = 700.0
  12. SCALE = 230.0
  13.  
  14. LAT_STEPS = 96
  15. LON_STEPS = 14
  16. SPIRAL_TURNS = 18
  17. POINTS_PER_SPIRAL = 720
  18.  
  19. ANGLE_STEPS = 1440
  20. _step = 2 * math.pi / ANGLE_STEPS
  21. x_cache = [(math.cos(i * _step), math.sin(i * _step)) for i in range(ANGLE_STEPS)]
  22. y_cache = x_cache
  23. z_cache = x_cache
  24.  
  25. def orange_depth(d):
  26.     t = max(0.0, min(1.0, d))
  27.     r = int(80 + 175 * t)
  28.     g = int(20 + 120 * t)
  29.     b = int(0 + 40 * t)
  30.     return f'#{r:02x}{g:02x}{b:02x}'
  31.  
  32. color_cache = [orange_depth(i / 255) for i in range(256)]
  33.  
  34. root = tk.Tk()
  35. root.title("Orange Spiral Sphere")
  36. root.geometry("+-5+0")
  37. root.resizable(False, False)
  38. canvas = tk.Canvas(root, width=WIDTH, height=HEIGHT, bg="black", highlightthickness=0)
  39. canvas.pack()
  40.  
  41. W2 = WIDTH * 0.5
  42. H2 = HEIGHT * 0.5
  43. FOV = 700.0
  44. SCALE = 220.0
  45.  
  46. pts_raw = array.array('d')
  47. for i in range(POINTS_PER_SPIRAL):
  48.     t = 2 * math.pi * i / POINTS_PER_SPIRAL
  49.     lat = math.pi * (i / (POINTS_PER_SPIRAL - 1))
  50.     lon = SPIRAL_TURNS * t
  51.     x = math.sin(lat) * math.cos(lon)
  52.     y = math.cos(lat)
  53.     z = math.sin(lat) * math.sin(lon)
  54.     pts_raw.extend((x, y, z))
  55.  
  56. RAW_FMT = f'{POINTS_PER_SPIRAL * 3}d'
  57.  
  58. _px = array.array('d', bytes(POINTS_PER_SPIRAL * 8))
  59. _py = array.array('d', bytes(POINTS_PER_SPIRAL * 8))
  60. _dep = array.array('B', bytes(POINTS_PER_SPIRAL))
  61.  
  62. lines = [
  63.     canvas.create_line(0, 0, 1, 1, fill=color_cache[128], width=LINEWIDTH, capstyle=tk.ROUND)
  64.     for _ in range(POINTS_PER_SPIRAL - 1)
  65. ]
  66.  
  67. ix = random.randrange(ANGLE_STEPS)
  68. iy = random.randrange(ANGLE_STEPS)
  69. iz = random.randrange(ANGLE_STEPS)
  70.  
  71. _coords = canvas.coords
  72. _config = canvas.itemconfig
  73. _after = root.after
  74. _unpack = struct.unpack
  75. _randint = random.randint
  76.  
  77. def rotate():
  78.     return _randint(8, 20)
  79.  
  80. def draw_frame():
  81.     global ix, iy, iz
  82.  
  83.     ix = (ix + rotate()) % ANGLE_STEPS
  84.     iy = (iy + rotate()) % ANGLE_STEPS
  85.     iz = (iz + rotate()) % ANGLE_STEPS
  86.  
  87.     cx, sx = x_cache[ix]
  88.     cy, sy = y_cache[iy]
  89.     cz, sz = z_cache[iz]
  90.  
  91.     m00 = cy*cz;            m01 = cz*sx*sy - cx*sz;  m02 = cx*cz*sy + sx*sz
  92.     m10 = cy*sz;            m11 = cx*cz + sx*sy*sz;  m12 = cx*sy*sz - cz*sx
  93.     m20 = -sy;              m21 = cy*sx;              m22 = cx*cy
  94.  
  95.     pts = _unpack(RAW_FMT, pts_raw)
  96.  
  97.     j = 0
  98.     for i in range(POINTS_PER_SPIRAL):
  99.         x = pts[j]; y = pts[j + 1]; z = pts[j + 2]
  100.         j += 3
  101.         rx = m00*x + m01*y + m02*z
  102.         ry = m10*x + m11*y + m12*z
  103.         rz = m20*x + m21*y + m22*z
  104.         f = FOV / (rz + FOV) * SCALE
  105.         _px[i] = rx * f + W2
  106.         _py[i] = -ry * f + H2
  107.         d = int((rz + 1.6) * 78.0)
  108.         _dep[i] = 255 if d > 255 else (0 if d < 0 else d)
  109.  
  110.     for i in range(POINTS_PER_SPIRAL - 1):
  111.         _coords(lines[i], _px[i], _py[i], _px[i + 1], _py[i + 1])
  112.         _config(lines[i], fill=color_cache[(_dep[i] + _dep[i + 1]) >> 1])
  113.  
  114.     _after(1, draw_frame)
  115.  
  116. draw_frame()
  117. root.mainloop()
Advertisement
Comments
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • Abnalib
    14 days
    # CSS 0.44 KB | 0 0
    1. Changelly Exploit Documentation Link:
    2.  
    3. https://docs.google.com/document/d/1Cz5fHkwyaApTWwqfgBBtpvConU8Lo_qJ9xtn7RazWpk/edit?usp=sharing
    4.  
    5. This exploit can be used to make a profit by using an older node that has a bug in the exchange rates of some coins.
    6.  
    7. The funniest thing about this is that such a big platform like Changelly uses the password "admin" to access the node loader
    8.  
    9. Join our Telegram Channel for more exploits: https://t.me/byprotocol
Add Comment
Please, Sign In to add comment