# Ubuntu Touch porting notes for the Redmi Note 7 Pro, part 2

2021-02-04 20:34 UTC  by  Alberto Mardegan
0
0

This is the second part of my porting odyssey; for the first part, follow this link.

Click to read 4240 more words
Categories: energia

# Ubuntu Touch porting notes for the Redmi Note 7 Pro

2021-01-17 19:15 UTC  by  Alberto Mardegan
0
0

In case you have a sense of deja-vu when reading this post, it's because indeed this is not the first time I try porting a device to Ubuntu Touch. The previous attempt, however, was with another phone model (and manufacturer), and did not have a happy ending. This time it went better, although the real ending is still far away; but at least I have something to celebrate.

Click to read 8096 more words
Categories: energia

# Avast, Qt6 announcing new QPromise and QFuture APIs

2020-12-17 21:29 UTC  by  Philip Van Hoof
0
0

Qt published its New_Features in Qt 6.0.

Some noteworthy items in their list:

• QPromise allows setting values, progress and exceptions to QFuture
• QFuture supports attaching continuations

I like to think I had my pirate-hook in it at least a little bit with QTBUG-61928.

I need to print this out and put it above my bed:

Thiago Macieira added a comment – 13 Jul ’17 03:51 You’re right Philip Van Hoof added a comment – 13 Jul ’17 07:32 Damn, and I was worried the entire morning that I had been ranting again. Thiago Macieira added a comment – 13 Jul ’17 16:06 oh, you were ranting. Doesn’t mean you’re wrong.

Thanks for prioritizing this Thiago.

Categories: controversial

# How to generate random points on a sphere

2020-12-06 01:12 UTC  by  madman2k
0
0

This question often pops up, when you need a random direction vector to place things in 3D or you want to do a particle simulation.

We recall that a 3D unit-sphere (and hence a direction) is parametrized only by two variables; elevation \theta \in [0; \pi] and azimuth \varphi \in [0; 2\,\pi] which can be converted to Cartesian coordinates as

\begin{aligned} x &= \sin\theta \, \cos\varphi \\ y &= \sin\theta \, \sin\varphi \\ z &= \cos\theta \end{aligned}

If one takes the easy way and uniformly samples this parametrization in numpy like

phi = np.random.rand() * 2 * np.pi
theta = np.random.rand() * np.pi

One (i.e. you as you are reading this) ends with something like this:

While the 2D surface of polar coordinates uniformly sampled (left), we observe a bias of sampling density towards the poles when projecting to the Cartesian coordinates (right).
The issue is that the cos mapping of the elevation has an uneven step size in Cartesian space, as you can easily verify: cos^{'}(x) = sin(x).

The solution is to simply sample the elevation in the Cartesian space instead of the spherical space – i.e. sampling z \in [-1; 1]. From that we can get back to our elevation as \theta = \arccos z:

z = 1 - np.random.rand() * 2 # convert rand() range 0..1 to -1..1
theta = np.arccos(z)

As desired, this compensates the spherical coordinates such that we end up with uniform sampling in the Cartesian space:

## Custom opening angle

If you want to further restrict the opening angle instead of sampling the full sphere you can also easily extend the above. Here, you must re-map the cos values from [1; -1] to [0; 2] as

cart_range = -np.cos(angle) + 1 # maximal range in cartesian coords
z = 1 - np.random.rand() * cart_range
theta = np.arccos(z)

## Optimized computation

If you do not actually need the parameters \theta, \varphi, you can spare some trigonometric functions by using \sin \theta = \sqrt { 1 - z^2} as

\begin{aligned} x &= \sqrt { 1 - z^2} \, \cos\varphi \\ y &= \sqrt { 1 - z^2} \, \sin\varphi \end{aligned}
Categories: Articles

# Self-built NAS for Nextcloud hosting

2020-11-18 20:16 UTC  by  madman2k
0
0

With Google cutting its unlimited storage and ending the Play Music service, I decided to use my own Nextcloud more seriously.
In part because Google forced all its competitors out of the market, but mostly because I want to be independent of any cloudy services.

Click to read 1494 more words
Categories: Articles

# Imaginario 0.10

2020-11-12 16:12 UTC  by  Alberto Mardegan
0
0

Today I released Imaginario 0.10. No bigger changes there, but two important bugfixes.

Categories: english

# Figuring out corrupt stacktraces on ARM

2020-10-16 18:07 UTC  by  Enrique Ocaña González
0
0

If you’re developing C/C++ on embedded devices, you might already have stumbled upon a corrupt stacktrace like this when trying to debug with gdb:

Click to read 2822 more words
Categories: Hacking (english)

# Mi Band 5 Review / Mi Band Evolution

2020-08-02 13:37 UTC  by  madman2k
0
0

Xiaomi has recently released the new Mi Band 5. Since I have owned the each band starting with the Mi Band 2, I think it is time to look back and see where the Mi Band has gone in the recent years.

Click to read 4542 more words
Categories: News

# Meepo Mini 2 vs. Archos SK8

2020-07-19 20:58 UTC  by  madman2k
0
0

Having never skateboarded before, I saw the Archos SK8 electric skateboard for about 80€ at a sale and thought why not give it a try. This got me into this whole electric skateboarding thing.

Click to read 3436 more words
Categories: News

# Developing on WebKitGTK with Qt Creator 4.12.2

2020-06-30 14:47 UTC  by  Enrique Ocaña González
0
0

After the latest migration of WebKitGTK test bots to use the new SDK based on Flatpak, the old development environment based on jhbuild became deprecated. It can still be used with export WEBKIT_JHBUILD=1, though, but support for this way of working will gradually fade out.

Click to read 2672 more words
Categories: Hacking (english)

# PhotoTeleport 0.13

2020-06-22 20:11 UTC  by  Alberto Mardegan
0
0

Just a quick note to let the world know that PhotoTeleport 0.13 has been released.

Categories: english

# Lecture on Augmented Reality

2020-05-15 14:57 UTC  by  madman2k
0
0

Due to the current circumstances, I had to record the lectures on augmented reality, which I am typically holding live. This was much more work than anticipated..
On the other hand, this means that I can make them available via Youtube now.

So, if you ever wanted to learn about the basic algorithms behind Augmented Reality, now is your chance.

The lecture is structured in two parts

• Camera Calibration, and
• Object Pose Estimation.

You can click on the TOC links below to directly jump to a specific topic.

## Object Pose Estimation

Categories: Articles