Vortices in my coffee and the Perpetual Ocean

Image

In a previous post I shared a video on mixing and unmixing of fluids. This time I share with you an image I took of my coffee. With some milk fluid dynamics created amazing vortices. Following it is an animation of the time evolution of the vortices.

Milk vortices.jpg
Milk vortices” by AstrobobOwn work. Licensed under CC BY-SA 4.0 via Commons.

Continue reading

Hack Academy – French Awareness Project on Online Security

Video

Below are 4 interesting videos for the “Hack Academy” raising people’s awareness on the basic techniques “crackers”, rather than “hackers”, use to exploit you.

Continue reading

Matlab – Symbolic & Function Handles

Standard

Consider you want to define a function in Matlab, plot it, and differentiate it. This can be done in two ways. Let’s demonstrate the two methods on the function

f(x) = x - 3 * log(x)

whose derivative is

f'(x) = 1 - \frac{3}{x}

The first is using function handles (ie; numerically) that take & return values as input & output. Function handles require the inputs to be initialized. Here’s an example:


x = linspace(0.5, 5.0)'; % range of x as column vector
f = x - 3 * log(x); % returns numerical values
df = diff(f) ./ diff(x); % also numerical values of the derivative

The other is symbolically (ie; like you do in your math class) as such


syms x % define symbolic variables
f = x - 3 * log(x); % symbolic function
df = diff(f, x); % gives the symbolic derivative

which returns

f = x - 3*log(x)
df = 1 - 3/x

But this way you cannot give the funtion numerical inputs and hence can’t plot it. To do so you’ll have to convert the function to a function handle which is easy using matlabFunction():


f_handle = matlabFunction(f); % convert symbolic fn to a handle
f_handle(2); % value of f @ x = 2
x = linspace(0.5, 5.0)'; % define range for x as column vector
plot(x, f_handle(x) ) % plot f on the range x

which return

f_handle = @(x)x-log(x).*3.0
df_handle = @(x)-3.0./x+1.0

Physics for Fun – Mixing and Unmixing Colors in a Fluid

Video

Most of us know that when you mix two substances together there’s no way of returning them to their original state. For example mixing some colors in water

This is true for non-viscous fluids. On the other hand, if the same thing is done with glycerine you will be able to return the fluids to their original state before mixing by simply un-mixing the fluids. This can happen because, unlike water, glycerine is a viscous fluid. The video below demonstrates this interesting phenomenon.

Kaufman’s Folly, or, How Movies Can Secretly Drive You Mad

Standard