🙄Разминка для ума!
Треугольник Серпинского, интересная фигура которую построить достаточно просто.
Алгоритм такой:
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
⚖️ Основатели проекта Dropil (DROP) Джереми Макалпин и Захари Матар согласились признать вину в мошенничестве с ICO на сумму почти $1,9 млн
Их обвинили в «серии ложных заявлений инвесторам» для «продвижения успеха криптовалюты». По данным Министерства юстиции США, основатели Dropil выплатили себе и партнерам как минимум $1,6 млн из привлеченных средств.
#ICO
Bought for $15.5k, sold for $122 million
#ETH holder purchased 50k$ETH at #ICO for $15.5k 9 years ago, and today he has 10 thousand coins ($24.37 million) on Kraken. In total, his coins are now valued at $122 million.
I waited for my chance🔥🔥🔥
💸Blockchain ICOs
This artist finally made me realize why all my money seem to vanish over time...
#Blockchain#ICO
🚀@PerspectiveIX via Reddit/u/nichlaes.
❓Have you invested in any ICOs?
An #Ethereum#ICO participant returned to sell 2,000 $ETH for 6M $USDC at $2,997 6 hours ago.
Notably, the whale received 33,213 $ETH at #Ethereum Genesis on Jul 30, 2015, at an ICO price of ~$0.31. So far, 5,110 $ETH has been deposited to #Kraken or sold via DEX at ~$2,545.
Currently, the whale still holds around 29.7K $ETH ($89.4M) across 3 wallets, mostly within staking platforms.
Follow @spotonchain and set alerts for the addresses of the ETH ICO participant via this entity now: https://platform.spotonchain.ai/en/entity/2098
An #Ethereum#ICO participant just woke up after 8.7 years of dormancy and transferred all 2,000 $ETH ($6.71M) to several new wallets!
The whale received 2,000 $ETH at #Ethereum Genesis on Jul 30, 2015, at the ETH ICO price of ~$0.31.
So far, 25 $ETH ($84.1K) has been deposited to #ChangeNOW at ~ $3,363.
Token flow: https://platform.spotonchain.com/en/visualizer?id=87887&thresholdOption=4
Follow @spotonchain and set alerts for the addresses of the $ETH ICO participant now!
An #Ethereum#ICO participant returned after 1.12 years to deposit 1,069 $ETH ($3.56M) to #Kraken at $3,329 3 hours ago.
The whale received 12,566 $ETH at #Ethereum Genesis in Jul 2015, at an ICO price of ~$0.31,
And then distributed the $ETH across 12 wallets in 2017, of which 4,847 $ETH have been deposited to #Kraken and #Gemini at ~$1,637.
Now still holds 7,719 $ETH ($25.7M) across 8 wallets.
Token flow: https://platform.spotonchain.ai/en/visualizer?id=99906
Follow @spotonchain and set alerts for the addresses of the $ETH ICO participant now!
🦄🦄Telegram is raising $1.7 billion in funding - and they're not even done!
#Telegram raised $850 million from 94 investors in March in addition to $850 million it gained in February. That's almost two whole unicorns in the largest #ICO (Initial Coin Offering) to date.
The company, founded by self-exiled Russian Pavel Durov, plans to use the ICO proceeds to develop the Telegram Open Network #blockchain, which includes the cryptocurrency #Gram.
Interest in the Telegram ICO has recently helped the company surpass the threshold of 200 million monthly active users, “with over 700,000 new users signing up each day.”
🚀@PerspectiveIX
🌀 http://prs.pctvix.co/TelegramIX
UK Regulator Takes Action Against Snap Over AI Chatbot
Hello, everyone! The UK Information Commissioner's Office (ICO) has issued a preliminary enforcement notice to Snap, the parent company of Snapchat. This notice could compel Snap to halt the processing of data associated with its AI chatbot, "My AI," for UK users unless an adequate risk assessment is carried out.
The ICO's provisional investigation revealed that the initial risk assessment conducted before the launch of My AI did not sufficiently evaluate its data protection risks, especially concerning children. As a result, Snap may be required to suspend its My AI product in the UK until these concerns are addressed.
#Snap#AI#DataProtection#ICO#UKRegulation