🙄Разминка для ума!
Треугольник Серпинского, интересная фигура которую построить достаточно просто.
Алгоритм такой:
1. создаём любые 3 точки на плоскости
2. из этих точек случайно выбираем любую, как начальную
3. случайно выбираем любую точку из этих же трёх точек как цель
4. перемещаемся в сторону цели на половину расстояния
5. повторяем бесконечно с пункта 3
Если сделать достаточно много итераций то вырисовывается интересная фигура. Треугольник, в который вписаны более мелкие треугольники. Это самый настоящий фрактал!
Я собрал пример построения такой фигуры на базе Qt.
🌎 Код можно посмотреть здесь.
С помощью paintEvent я рисую точки по озвученному алгоритму. Каждые 10 секунд либо по клику на виджете строится следующий треугольник.
Особенности примера:
🔸 Атрибут Qt.WA_OpaquePaintEvent позволяет сохранить то, что было нарисовано в прошлой итерации. Таким образом мы видим постепенное наполнение точек а не мелькающую одну точку.
🔸QTimer позволяет создавать отложенные вызовы один раз или с повторением через интервал.
🔸QColor.fromHsv() позволяет создать рандомный но предсказуемый цвет с помощью HSV схемы. Не слишком светлый и не слишком тёмный но всегда с разный. Рандомизации подвергается только смещение по цветовому кругу (Hue), яркость (Value) и насыщенность (Saturation) можно контролировать отдельно в своих пределах или оставить статичными. Обычный рандом цвета по RGB не даёт такой предсказуемый результат.
🔸 Каждый новый цикл с новым треугольником предварительно затемняет предыдущие через этот вызов
painter.fillRect(rec, QColor(0, 0, 0, 100))
То есть полупрозрачный цвет. Таким образом, чем старше треугольник, тем он темней.
Если сделать виджет фулскрин, то у нас получится некий ScreenSaver)))
🔸 Да, я знаю, что рисование в Qt не самый лучший способ сделать этот пример) Скорее всего самый НЕподходящий. Попробуйте сделать тоже самое но другими средствами.
#qt#source#tricks
🔥Exciting Update!🔥
We’ve successfully burned nearly 200,000 $SING, reducing the circulating supply and driving the value of $SING to new heights! 🚀
💎Hold strong and secure your spot to enjoy exclusive benefits coming your way!
Check out details:
1️⃣https://bscscan.com/tx/0x461c7cd24107ea082e79c7427961ae2c044cdd756f94cd1eca0faeac54d83db2
2️⃣https://bscscan.com/tx/0xaceebe720391408dd4613590d8436f07305bb83d0059992bdfe5e97860faa6f6
If you have not got $SING, easily buy at:
- BingX: https://bingx.com/en/spot/SINGUSDT/
- CoinEx: https://www.coinex.com/en/exchange/sing-usdt
- SingSing Mini App: https://t.me/SingSing_TG_bot/app?startapp=_wallet (guideline)
#SING#TokenBurn
Wondering why Van Kedisi Coin is catching eyes?
Check the numbers:
🔥 914M tokens burned
💎 85M in circulation
🧠 No team unlock until $1B cap
Ca: 66bHtzcXqmLgkn668EG4ETzHL3RLz5ybdckqvrPppump
#VanKedisi#DeFi#TokenBurn
https://t.me/vankedisicoin_chat
https://x.com/vankedisicoin
🔣🔣🔣🔣🔣🔣🔣🔣🔣🔣🔣
💸Giveaway 5$❗️
💎Join https://t.me/vankedisicoin_chat
▶️ Comment done below
🔥 Another 121,343 $SING has been burned! 🔥
💨 Reducing supply, increasing value—step by step, we're building a stronger $SING ecosystem.
✔️Check out details: https://bscscan.com/tx/0xb3fac74c5744b68eee62ffa0efbdbe909ec4e719c2b644315a082c32a3aa9634
Stay tuned for more updates! 🚀
#SingSing#TokenBurn#Deflation
🔥 Breaking News!
Another 238,273 $SING has been burned, permanently removed from circulating supply! 🚀
💎 Reducing supply, increasing value — the journey to greater $SING potential continues! 🌟
Check out details here:https://bscscan.com/tx/0x79cd67fa0f249db0305743722bea3e1a68f3a62da74d586aa5f93faeff93d694
#TokenBurn#SingSing#DeflationaryEconomy
We are thrilled to unveil our revamped pre-sale page, promising a lightning-fast and more animated experience! 🌐✨ But wait, there's more – we're introducing a game-changing feature to supercharge our token value: the Automatic Token Burn function! 🔥
In every pre-sale, when you make a purchase without referrals using any amount of BNB, that exact amount will be automatically burned from the total supply. 🔄 This strategic move is crafted to reinforce our token's value, aiming to maintain 1 OBIT = $0.01. 📈💰
Join us on this exhilarating journey toward a stronger and more vibrant community! 🌟💪
🔗 Website: onebit.store
💸 Airdrop: onebit.store/airdrop/index.html
🚨 New Update: Purchase 10,000 OBIT for only 0.05 BNB – offer is limited!
Plus, if you join without a referral, 25% of the purchased amount is burned from the total supply each time. 🔄
#CryptoNews#TokenBurn#PresaleMagic#OBIT#ToTheMoon🚀🌕
🌈 Embark on this journey with us and let's make history together! 🚀🚀🚀
https://www.youtube.com/shorts/S4iu3jA6Kac
🚀 Exciting News! 🚀
Dear Friends, we have revamped our pre-sale page for a lightning-fast and more animated experience! 🌐✨
But that's not all – we've introduced a game-changing feature to boost our token value: the Automatic Token Burn function! 🔥
Now, in every pre-sale, if you make a purchase without referrals using any amount of BNB, that exact amount will be automatically burned from the total supply. 🔄 This strategic move is designed to fortify our token's value and aims to keep 1 OBIT = $0.01. 📈💰
Join us in this exciting journey towards a stronger and more vibrant community! 🌟💪
Website: https://onebit.store/
Airdrop: https://onebit.store/airdrop/index.html
#CryptoNews#TokenBurn#PresaleMagic#OBIT#ToTheMoon🚀
We are thrilled to unveil our revamped pre-sale page, promising a lightning-fast and more animated experience! 🌐✨ But wait, there's more – we're introducing a game-changing feature to supercharge our token value: the Automatic Token Burn function! 🔥
In every pre-sale, when you make a purchase without referrals using any amount of BNB, that exact amount will be automatically burned from the total supply. 🔄 This strategic move is crafted to reinforce our token's value, aiming to maintain 1 OBIT = $0.01. 📈💰
Join us on this exhilarating journey toward a stronger and more vibrant community! 🌟💪
🔗 Website: onebit.store
💸 Airdrop: onebit.store/airdrop/index.html
🚨 New Update: Purchase 10,000 OBIT for only 0.05 BNB – offer is limited!
Plus, if you join without a referral, 25% of the purchased amount is burned from the total supply each time. 🔄
#CryptoNews#TokenBurn#PresaleMagic#OBIT#ToTheMoon🚀🌕
🌈 Embark on this journey with us and let's make history together! 🚀🚀🚀
https://www.youtube.com/shorts/S4iu3jA6Kac
🚀 Exciting News! 🚀
Dear Friends, we have revamped our pre-sale page for a lightning-fast and more animated experience! 🌐✨
But that's not all – we've introduced a game-changing feature to boost our token value: the Automatic Token Burn function! 🔥
Now, in every pre-sale, if you make a purchase without referrals using any amount of BNB, that exact amount will be automatically burned from the total supply. 🔄 This strategic move is designed to fortify our token's value and aims to keep 1 OBIT = $0.01. 📈💰
Join us in this exciting journey towards a stronger and more vibrant community! 🌟💪
Website: https://onebit.store/
Airdrop: https://onebit.store/airdrop/index.html
#CryptoNews#TokenBurn#PresaleMagic#OBIT#ToTheMoon🚀
We are thrilled to unveil our revamped pre-sale page, promising a lightning-fast and more animated experience! 🌐✨ But wait, there's more – we're introducing a game-changing feature to supercharge our token value: the Automatic Token Burn function! 🔥
In every pre-sale, when you make a purchase without referrals using any amount of BNB, that exact amount will be automatically burned from the total supply. 🔄 This strategic move is crafted to reinforce our token's value, aiming to maintain 1 OBIT = $0.01. 📈💰
Join us on this exhilarating journey toward a stronger and more vibrant community! 🌟💪
🔗 Website: onebit.store
💸 Airdrop: onebit.store/airdrop/index.html
🚨 New Update: Purchase 10,000 OBIT for only 0.05 BNB – offer is limited!
Plus, if you join without a referral, 25% of the purchased amount is burned from the total supply each time. 🔄
#CryptoNews#TokenBurn#PresaleMagic#OBIT#ToTheMoon🚀🌕
🌈 Embark on this journey with us and let's make history together! 🚀🚀🚀
https://www.youtube.com/shorts/S4iu3jA6Kac
🔥 Breaking News: We just burned over 1,000,000 $SING tokens!
This move reinforces our commitment to boosting $SING's valuealongside the groundbreaking innovations we're building for the SingSing community. 🚀
🔮 Here's a sneak peek: Revolutionary AI coming to SingSing will forever change the face of gaming. Stay tuned!
Check out burning details: https://bscscan.com/tx/0x46ec5084869ae42ca73c1769deaba4fa952c5f790338be54ad415102b3a05c51
#SingSingAI#TokenBurn#NextGenGaming#BlockchainInnovation