Piero V.

Una Fenice che torna al passato

Questione di desideri…

15 anni fa, desideravo diventare uno sviluppatore web: ero affascinato da questo mondo e avrei voluto farne parte anche io. Un po’ alla volta ho imparato a usare gli strumenti necessari e creai il mio primo sito.

12 anni fa, ho realizzato che non bastava fare delle pagine web e basta, ma dovevano avere uno scopo. Ho anche realizzato che fare sia il contenuto, che tutto il sistema per gestirlo era un lavoro enorme e le mie competenze non ne erano all’altezza. Sono quindi passato a dei CMS: Flatpress, DokuWiki e altri.

Dopo 6 mesi, poi ho deciso di tenere solo il blog, ma a parte qualche cambiamento di grafica, è rimasto così per 10 anni.

Poi, 2 anni fa, cercavo un tirocinio per l’Università e volevo che il sito potesse dare una panoramica nonché reseoconto cronografico dei miei progetti. Ne ho aprofittato per dare una rinnovata: già da diverso tempo non mi trovavo più con PHP, avevo deciso di abbandonare Flatpress e volevo che il risultato fosse più professionale. Sono passato così a Python, in particolare Django, per il backend, più un Bootstrap leggermente personalizzato per il frontend. … [Leggi il resto]

NetStylus

Preamble

Recently I started digital sculpting, and I immediately realized that the mouse is not the best tool for this scope. As any tutorial will tell you, a drawing tablet will make you much faster and much more precise.

I do not have one, but I have a Microsoft Surface Pro and a Surface Pen. However, it is the base, not-so-powerful model: it has just a Core M3 and 4GB of RAM. It was enough to study at University, but, sadly, I cannot even think of running a 3D editor in it.

Initially, I tried Weylus, a program that allows you to control a machine (my Linux desktop, in my case) through a web browser from any device with a stylus. Being web-based, it works on any device, including iPads, and it even mirrors the screen.

However, it did not play well with the barrel button of my pen. And that button is critical for a lot of workflows.

Therefore, I decided to write my own software to do so: NetStylus.

The Win32 API for tablets

I discovered that Microsoft has liked pen input methods for years: they started the Tablet PC thing with Windows XP, before 2005!

They have several APIs and functionality, but we are interested in the one that sits at the beginning of the chain: the Real-Time Stylus interface.[Leggi il resto]

Picking voxels on the Open3D visualizer

While working on my M.S. thesis, I got to know Open3D. To me, it is basically the Swiss army knife for 3D data acquired from reality.

It offers implementations of performant algorithms, Python support to quickly change your scripts or adjust parameters to improve your results, and a visualizer to see them.

Unfortunately, this very visualizer is not very interactive. Often, I would like to pick objects in the scene and drag them or modify them. Sadly, in Python, it is not possible. But it is in C++, and I will comment on how you can implement that.

But first, I suggest you download my code, as I will refer to it. It combines the routines of the following sections to allow picking and deleting voxels.

Interact with the Mouse

Usually, when I want to do something with Open3D, I look at the examples on their Read the Docs documentation. However, they also offer a Doxygen-based one for the C++ part of the library. … [Leggi il resto]