###### VTK

## Calculate The Signed Angle Between Two Vectors

The angle between two vectors can be calculated by the dot product. We want to find the direction of the rotation. Here are two different ways to get it done. 1、Compute the value of Sine of the angle, then we can judge it’s clockwise or counterclockwise. The value of Sine Read more…

###### Math

## Rigid Transformation And The Block Matrix

The affine transform in the 3D world can be represented by a 4×4 matrix. If there is no scale in the affine transform, the vector is translate vector and A is the rotate matrix. The original point’s position is representing by M, the changed point’s position is M’. Read more…

###### Math

## Cross Product, Dot Product, Tensor Product In Matrices Forms

Cross Product Let’s define vector and and their cross product . As known that , so we have: The cross product is antisymmetric due to its definition. Dot Product So we can write the dot product of two vectors as the matrix form. Read more…

###### Math

## Lomo Graphy By OpenCV

The article shows how to make the original image has a retro style. Two steps need to be done. Change the red color channel of the original image. Change the brightness by a filled circle. The mathematical function used in step1 makes the brighter pixel brighter, darker pixel darker. Read more…

###### VTK

## Use Local Coordinate System And Show It

How to create a local coordinate system and show it? We define the local coordinate system has its own x-axis, y-axis, z-axis, and origin. We call the left coordinate system L1 and the right coordinate system L2. Regard L1 as the world coordinate system in VTK, the other one L2 Read more…

###### Math

## Wolfram – Calculation And Plot On Lists

Here are some notes about how to create, change , and plot data stored by lists. Many examples come from the book An Elementary Introduction To The Wolfram Language. Make a plot of the first 10 squares, starting at 1. ListPlot[Range[10]^2] Make a combined list of the first 5 squares Read more…

###### CPlusPlus

## VTK – Local Coordinate System

We want to know the world coordinate of a point on a 3D widget event though we don’t know the widget’s position on the world coordinate system. I get a matrix from an actor and create a temporal vtkTransform object, then the function TransformDoublePoint can give me the real coordinate Read more…