-
Compute width and height from diagonal and aspect ratio
Posted on 8 Nov 2021 - 11:42
Problem When the information about a screen, a window or a generic rectangle is limited to its diagonal and an the aspect ratio (the width divided by the height) and we need to know width and height, we have a little problem. It must be easy right? Well.. not as obvious as most people expect (how many of your friends know the right answer?) but still the solution isn’t difficult and it’s a nice example of use of some known quadratic formulas.
-
Show system temperature on a mini i2c (9E6018A0) screen via Arduino Nano
Posted on 23 Apr 2021 - 15:45
Introduction This is a project showing How to wire the I2C display to an Arduino How to retrieve the CPU temperature (or other values) from Linux’s sysfs How to use the RS232 library by wjwwood How to connect to the Arduino Nano and send data How to receive data in Arduino How to display data through the nice graphics library by Adafruit —— (also how to scribble with that library) We will build a minimal C++ console application that retrieves a temperature value from Linux’s sysfs and sends it to a serial port.
-
Save and load mesh data in Unity
Posted on 1 Oct 2020 - 19:06
I do have a hell of a fun with generative graphics; if you do too and you want to save some of your creations to a file at runtime and load them later on, here’s your today’s chocolate cake. i use this method especially where it takes time to generate a topology and loading it is a lot quicker than regenerating it.
-
Unity little toy shaders
Posted on 1 Oct 2020 - 19:00
Here’s a small but growing collection of little Unity toys with more or less typical mathematical tricks implemented in a fragment shader. What’s impressive is, as often happens in maths, the simplicity of most formulas when implemented. I’ve always found coding things that have a visual output a really good way of understanding maths. I adapted these old snippets I made in Processing to ShaderLab/CG. I intentionally shared them in their most basic form to leave room to creativity.