🙄Разминка для ума!
Треугольник Серпинского, интересная фигура которую построить достаточно просто.
Алгоритм такой:
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
💼 Ethereum Foundation to Convert 5,000 ETH Into Stablecoins
The Ethereum Foundation announced via X that it will convert 5,000 ETH into stablecoins using CoW DAO’s TWAP feature to fund R&D, grants, and donations. #stablecoinlink
💳 RedotPay raises $107M in a Series B round led by Goodwater Capital to expand #stablecoin payment infrastructure.
➖➖➖➖➖➖➖➖➖
📣@cryptonewstel
✨Vip join⭐️
JUST IN: 🔥 Visa has launched a Stablecoins Advisory Practice to help institutions develop #stablecoin strategies.
➖➖➖➖➖➖➖➖➖
📣@cryptonewstel
✨Vip join⭐️
Paxos Trust is committed to bringing trust and transparency to the digital asset industry. See all of our monthly attestation reports on $PAX by top auditing firm @Withum. As of March 29, total funds of $118,048,457.66 USD and $PAX #stablecoin match exactly https://www.paxos.com/attestation/
Stablecoin yields, mainly generated via lending and borrowing activities, have become a topic of interest among traders, and you should join the conversation!
Learn more about #tether tokens and other #stablecoin yields⬇️
https://tether.to/where-do-stablecoin-yields-come-from/
📝 TokenPocket Monthly Report — July 2025
→ https://medium.com/@tokenpocket-gm/tokenpocket-monthly-report-july-2025-90a2476b9237
In July, TokenPocket focused on technological innovation and community activities, launching a series of measures centered around multi-chain functionality upgrades and enhanced security protection.
🎯#StablecoinWallet
TokenPocket provides the Gas Station service for the TRON network and the zero-fee USDT/USD1 transfer service on BNBCHAIN. This significantly reduces your #stablecoin transaction fee costs and enhances your trading experience.
🎯 LetsBONK on TokenPocket
Track all the trending LetsBonk tokens effortlessly, all in one place.
🎯 Supported XRP, HashKey Chain, and ink networks, making TokenPocket your first choice for a multi-chain wallet.
📍 All In One, All in TokenPocket
🔗https://tp.xyz
🔥🤩🤞
🗣#USDC Circle CEO says stablecoins now let people transact like messaging on WhatsApp, and major institutions agree stablecoins are the future of global money movement. #stablecoin
⚡️The Daily TON: Ethena Brings Innovative Stablecoin to the Ecosystem
#Ethena#stablecoin#TON
The Ethena project plans to enter the TON ecosystem, introducing its unique stablecoin USDe. Unlike traditional stablecoins, USDe uses a hedging strategy to manage volatility, offering users potential yields on their holdings. The project aims to integrate with blockchain ecosystems, including a Telegram mini-app for broader accessibility.
Source: link
@tonlines