RaPenduLa: Una Video piattaforma FaiDa Te Per Studiare Oscillazioni Meccaniche

Qualche giorno fa ho pubblicato un nuovo progetto educativo sul mio sito Instructables. Il dispositivo, che ho battezzato RaPenduLa (dalle iniziali in inglese di RaspPi Pendulum Laboratory), è stato ribattezzato in italiano CAMPO (Computer Analisi Moto Pendolare Oscillante) grazie a un suggerimento di ChatGPT. Ma, come direbbe Shakespeare, ‘What’s in a name? That which we call a rose by any other name would smell as sweet’: il cuore del progetto è infatti una piattaforma video per lo studio delle oscillazioni meccaniche. Utilizzando un Raspberry Pi Zero W2 dotato di modulo fotocamera, il sistema registra ad alta velocità il movimento dei pendoli. Poi, con un’analisi video basata su Python e OpenCV, RaPenduLa è in grado di tracciare il percorso preciso della punta del pendolo, visualizzandone il comportamento oscillatorio in 2D.

Continue reading

RaPenduLa: A DIY Video Platform for Exploring Mechanical Oscillations

I have recently published another educational project on my Instructables website. I called the device RaPenduLa for the RaspPi Pendulum Laboratory, and it is a video platform for studying mechanical oscillations. It uses a Raspberry Pi Zero W2 equipped with a camera module to record the motion of pendulums in high speed. The interesting part happens through video analysis: using Python and the fantastic OpenCV library, RaPenduLa can track the precise path of a pendulum’s tip and help visualize its oscillatory behavior in two dimensions.

Continue reading

Easter 2025: Exploring Egg-Shaped Billiards

It has become a recurrent habit for me to write a blog on the shape of eggs to wish you a Happy Easter. Not repeating oneself and finding a new interesting topic is a brainstorming exercise of lateral thinking and a systematic search in literature to find an interesting connection. This year, I wanted to explore an idea that has been lurching in my mind for some time for other reasons: billiards.

I used to play snooker from time to time with some old friends. I am a far cry from being even an amateur in the billiard games, but I had a lot of fun verifying the laws of mechanics on a green table. I soon discovered that studying the dynamics of bouncing collision of an ideal cue ball in billiards of different shapes keeps brilliant mathematicians and physicists engaged in recreational academic studies and important theoretical implications.

Continue reading

Season’s Greetings with Diffusion-Limited Aggregation!


As the year comes to a close, let us take a moment to reflect on the beauty of nature and the profound patterns that can arise from simple rules. Inspired by the Diffusion-Limited Aggregation (DLA) simulation—a concept that creates mesmerizing structures from chaotic randomness—we find parallels between its patterns and the essence of the holiday season.

The animation featured here was created using my DLA simulator, written in Awk, my favorite programming language. This program simulates the deposition of randomly diffusing particles in two dimensions. In this case, it mimics the formation of snowflakes or coriander-like clusters, with particles meandering through randomness to form intricate fractal structures.

These patterns remind us how small, individual efforts can come together to create something extraordinary. Be it family gatherings, acts of kindness, or moments of generosity, each step contributes to a larger, beautiful picture—much like how particles aggregate to form stunning natural structures such as snowflakes, coral reefs, or mineral deposits.

Wishing You:

🎄 Fractal Joy: Let your happiness grow in beautiful and unexpected ways.

🌟 Boundless Creativity: Like the Moore and von Neumann neighborhoods in the simulation, embrace different perspectives to expand your horizons.

❄️ Peace and Harmony: May your life’s matrix be filled with meaningful connections and serene moments.

May your holidays be filled with love, joy, and wonder — and may your 2024 be as inspiring as the intricate patterns of life itself!

Happy Holidays! 🌟

RasMol: A Classic Tool for Molecular Visualization

In questo articolo descrivo come ho usato per molti anni il programma di visualizzazione molecolare Rasmol per delle esercitazioni pratiche di chimica generale presso l’Università dell’Aquila (Italia). Le esercitazioni consistevano nella visualizzazione di strutture cristallografiche di sistemi molecolari e nella misura di alcune proprietà geometriche. Per questo scopo è stato usato Rasmol controllato da un’interfaccia, scritta nel linguaggio Tcl/Tk, che permetteva di selezionare la struttura molecolare da visualizzare.

RasMol è uno tra i programmi più diffusi per la visualizzazione di strutture molecolari. Esso è liberamente distribuito e nel sito web (http://www.rasmol.org) è possibile ottenere il codice sorgente e gli eseguibili per i sistemi operativi Linux, MS Windows e Mac OS. Il programma ha un’ottima documentazione in lingua inglese. In questa pagina sono fornite le istruzioni necessarie per usare il programma per l’esercitazione. I lettori interessati sono comunque invitati ad esplorare le potenzialità di questo programma, installandolo sul proprio computer.

Continue reading

Retro Programming Nostalgia VI: Exploring the Hyperspace

Henk Rogers: Um, I like Pascal. Assembler is my go-to. But never underestimate…
Alexey Pajitnov: …the power of BASIC.

From the movie Tetris (2023).

It has been a long while that I wanted to write this article. The usual motivation is to propose another of my BASIC programming explorations performed in the 80s on my Philips MSX VG-8010 and Amiga 500 microcomputer. The exploration was encouraged by the reading of another of the brilliant articles by A. K. Dewdney in his column “Ricreazioni al Calcolatore” (Computer Recreation) of Le Scienze, the edition in Italian of Scientific American [1]. Dewdney’s article was inspired by the beautiful book by Thomas F. Banchoff [2] who pioneered in the early 1990s the study using computer graphics of hyperdimensional objects.

Continue reading

Easter 2024: Dinosaur Eggs, Kinder Surprise, Drug Capsules, Jumping Beans Toy and Retro programming

Oh my God. Do you know what this is? This is a dinosaur egg. The dinosaurs are breeding.

Dr. Alan Grant, Jurassic Park movie (1993)

We are again approaching Easter time and, as tradition, I would like to celebrate with an article dedicated to the most perfect thing in nature: the egg. I came across interesting books about the discovery of dinosaur eggs last year. Dinosaurs are the ancestors of birds and modern reptiles, so we will take a little detour from the traditional Easter egg, and with the spirit of equal opportunity justice, we will look at the shape of these.

Continue reading

Retro Programming Nostalgia V: Phase Plane of Autonomous Planar System of DE

What is the origin of the urge, the fascination that drives physicists, mathematicians, and presumably other scientists as well? Psychoanalysis suggests that it is sexual curiosity. You start by asking where little babies come from, one thing leads to another, and you find yourself preparing nitroglycerine or solving differential equations. This explanation is somewhat irritating, and therefore probably basically correct. David Ruelle, in Chance and Chaos

Here I am again for a new appointment with the Italian version of the column “Retro Programming Nostalgia“, my very own adventure in computer archaeology, rediscovering old programs written some time ago on microcomputers that have made their mark on an era.

This time, in my old floppy disks for the glorious Amiga 500, I found a program in Amiga Basic that I wrote during the early years of my university studies, when I was taking the course on differential equations II. Specifically, I was very fascinated by autonomous systems of differential equations due to their numerous applications in mathematical modeling of physical, chemical, and biological systems, as well as their importance in the theory of chaos. As in the series articles, I want to release an adapted version for the QB64 BASIC meta-compiler, but before presenting the program, I want to briefly explain what an autonomous system of differential equations is.

Continue reading

Retro Programming Nostalgia V: Sistemi Autonomi di Equazioni differenziali

“Qual è l’origine del desiderio, della fascinazione che spinge i fisici, i matematici e presumibilmente anche altri scienziati? La psicoanalisi suggerisce che si tratti di curiosità sessuale. Si comincia chiedendosi da dove vengano i bambini piccoli, una cosa porta all’altra e ci si ritrova a preparare il nitroglicerina o a risolvere equazioni differenziali. Questa spiegazione è un po’ irritante, e quindi probabilmente fondamentalmente corretta.” – David Ruelle, in “Chance and Chaos”

Eccomi di nuovo per un nuovo appuntamento con la versione in italiano della Rubrica “Retro Programming Nostalgia “, la mia personalissima avventura d’ archeologia informatica alla riscoperta di vecchi programmi scritti qualche tempo fa su microcomputers che hanno segnato un’epoca.

Questa volta, nei miei vecchi dischetti per il glorioso Amiga 500, ho trovato un programma in Amiga Basic che scrissi durante i primi anni dei miei studi universitari, quando studiavo nel corso di matematica II, i sistemi d’equazioni differenziali. In particolare, ero molto affascinato dai sistemi di equazioni differenziali autonomi per via delle molteplici applicazioni nella modellazione matematica di sistemi fisici, chimici e biologici, e per la loro importanza nella teoria del caos. Come negli articoli della serie, voglio rilasciare una versione riadattata per il meta compilatore QB64 BASIC, ma prima di presentare il programma, voglio brevemente spiegare cosa sia un sistema autonomo di equazioni differenziali.

Continue reading

Programming in Awk Language. LiStaLiA: Little Statistics Library in Awk. Part II

This article describes a new function of the LiStaLiA library. As I mentioned in Part I of this series of articles, I didn’t extensively test the library, so I am releasing it as an alpha version. Please let me know if you find any errors or if you improve the function, and feel free to send me your modified code!

CALCULATING STATISTICS PROPERTIES OF DATA SETS

The new functions perform a statistical analysis of the data set read by the function ReadData(). The source code of this new library functions is reported in the Appendix. The following list report all the descriptor calculated buy the functions.

Continue reading