TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #164 · 14 окт.

🙄Разминка для ума! Треугольник Серпинского, интересная фигура которую построить достаточно просто. Алгоритм такой: 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

Резултати

Пронајдени 34 слични објави

Пребарај: #spaceships

当前筛选 #spaceships清除筛选
Universe Mysteries 🪐

@cosmomyst · Post #691 · 21.02.2026 г., 22:21

🪐 NASA’s Psyche mission is sending a high-tech spacecraft to the asteroid 16 Psyche, testing a new electric propulsion system called Hall thrusters. Hall thrusters use electricity and magnetic fields to accelerate charged particles (ions) for thrust, offering a more efficient way to travel long distances—demonstrating key technology that could power spaceships to worlds like Ceres or the moons of Jupiter in the future. ✨ #spaceships⚡#propulsion⚡#asteroids⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #666 · 07.02.2026 г., 22:21

🪐 ESA’s Hera mission, launching soon to study asteroid Didymos and its moon Dimorphos, is bringing a new kind of space probe—one equipped with autonomous navigation, letting the spaceship guide itself during its close encounters. This technology, inspired by how insects use simple visual cues to avoid obstacles, could pave the way for future spaceships that explore places like Jupiter’s moon Europa or the rings of Saturn independently, relying less on commands from Earth and more on real-time decisions. ✨ #spaceships⚡#technology⚡#exploration⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #399 · 09.10.2025 г., 20:21

🪐 The future of interstellar travel may rely on building spacecraft capable of withstanding long-duration journeys across vast distances like the 4.37 light-years to Alpha Centauri. NASA’s Starlight project is studying how powerful ground-based lasers could push small, ultra-light probes to a significant fraction of the speed of light—over 100 million kilometers per hour—enabling them to reach nearby star systems in just a few decades rather than millennia. ✨ #spaceships⚡#technology⚡#exploration⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #168 · 21.08.2025 г., 20:11

🪐 The Japanese spacecraft Hayabusa2 demonstrated a glimpse of future spaceship technology by visiting the asteroid Ryugu, collecting samples, and returning them to Earth in 2020. Its advanced ion propulsion system and autonomous navigation allowed it to land and lift off from the tiny asteroid's weak gravity—a feat that opens the door to more complex robotic missions to objects like Bennu and even farther out in the solar system. ✨ #spaceships⚡#exploration⚡#technology⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries

Universe Mysteries 🪐

@cosmomyst · Post #106 · 09.08.2025 г., 16:11

🪐 NASA's Solar System Ambassador program highlights the rapid development of electric propulsion for future spaceships, like the ion engines used on the Dawn spacecraft. Ion engines work by shooting electrically charged atoms, called ions, out of the back of the spacecraft, allowing for extremely efficient travel to distant worlds such as the asteroid Vesta and the dwarf planet Ceres. ✨ #spaceships⚡#technology⚡#exploration⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries

Universe Mysteries 🪐

@cosmomyst · Post #627 · 19.01.2026 г., 22:21

🪐 NASA has announced plans for its first nuclear-powered rocket in over 50 years, aiming to test an engine in space by 2027. This new technology, called nuclear thermal propulsion, could dramatically reduce travel time to Mars and distant worlds like Europa by heating hydrogen to generate powerful thrust—making human missions to the outer solar system more achievable than ever before. ✨ #spaceships⚡#technology⚡#Mars⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #567 · 19.12.2025 г., 12:21

🪐 Deep space travelers will experience time differently than people on Earth—a mysterious effect called time dilation. If astronauts took a fast journey to the star Sirius (8.6 light-years away) on a spaceship moving near the speed of light, their onboard clocks would run much slower than those back home, so they would age less during the trip—even while years passed on Earth. This real phenomenon comes straight from Einstein’s theory of relativity and shows how speed itself can turn space voyages into journeys through time. ✨ #timedilation⚡#relativity⚡#spaceships⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #623 · 15.01.2026 г., 12:21

🪐 Scientists studying the future of interstellar travel are exploring how hydrogen harvested from interstellar space—called "ramjet" propulsion—could one day fuel journeys to stars like Alpha Centauri, located over 4 light-years from Earth. A concept known as the Bussard Ramjet proposes using a huge electromagnetic field to collect hydrogen atoms as a spaceship speeds through space, fusing them for energy in the same way stars do, potentially enabling continuous acceleration across vast cosmic distances. ✨ #spaceships⚡#technology⚡#AlphaCentauri⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #508 · 19.11.2025 г., 22:21

🪐 NASA’s upcoming VERITAS mission will send a spaceship equipped with advanced synthetic aperture radar and infrared sensors to Venus, mapping the planet’s surface in detail never achieved before. VERITAS will peer through Venus’s thick clouds to unveil its volcanic terrain and tectonic features, opening a new frontier for robotic exploration in one of the solar system’s most extreme environments. ✨ #spaceships⚡#venus⚡#technology⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #479 · 05.11.2025 г., 12:21

🪐 NASA’s upcoming DAVINCI mission is set to test a new kind of spaceship technology as it descends through the thick atmosphere of Venus in the late 2020s. The spacecraft will use a combination of heat shielding and parachutes designed to survive the planet’s crushing pressure and scorching surface temperatures—over 460°C—pushing the limits of materials and engineering needed for future robotic explorers of extreme worlds like Venus and beyond. ✨ #spaceships⚡#technology⚡#Venus⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #673 · 11.02.2026 г., 12:21

🪐 Scientists are researching how self-healing materials could revolutionize interstellar travel, allowing future spacecraft bound for distant stars like Proxima Centauri to repair themselves from cosmic dust impacts and radiation damage. These advanced materials are designed to sense and fix tiny cracks or holes automatically, greatly increasing the durability and safety of deep space missions as they travel through the harsh, unpredictable environment between the stars. ✨ #spaceships⚡#technology⚡#innovation⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

ПретходнаСтраница 1 од 3Следна