Technical‎ > ‎Houdini‎ > ‎Isosurface‎ > ‎

Transform


Cube:

max( max( $Y^2-1, $X^2-1 ), $Z^2-1 )
Translate:

max( max( $Y^2-1, ($X-2)^2-1 ), $Z^2-1 )

You can simply translate object by subtracting value to axis:
($X-2) move 2 to $X axis.

You can also create dedicated expression to help you to play with:
float tx(float val){
    return $X-val;
}
Then replace ($X-2) by tx(2)
Scale:

max( max( $Y^2-1, ($X/2)^2-1 ), $Z^2-1 )

You can resize any object by divide or multiply the axis:
($X/2) scale the X axis by 2.
($X*2) divide the X axis by 2.

You can also create a cpecial expression for scaling:
float sx(float val){
    return $X / val;
}
Then replace $X/2 by sx(2)
Shear:

Shear in XY axis:
max( max( $Y^2-1, ($X+ $Y*tan(25))^2-1 ), $Z^2-1 )

Replace the $X axis by $X + $Y*tan(Angle)

float shearXY(float val){
    return $X + $Y*tan(val);
}

Flip:

max( max( -$X^2-1, ($Y+ -$X*tan(20))^2-1 ), $Z^2-1 )

Flip X-Y : replace $X by $Y and $Y by -$X
Flip Y-Z : replace $Y by $Z and $Z by -$Y
Flip X-Z : replace $X by -$Z and $Z by $X
Rotate:

max( max( ($Z*sin(25) + $Y*cos(25))^2-1, $X^2-1 ), ($Z*cos(25) - $Y*sin(25))^2-1 )

Rotate X:
replace $Y with $Z*sin(Angle) + $Y*cos(Angle)
replace $Z with $Z*cos(Angle) - $Y*sin(Angle)

Rotate Y:
replace $X with $X*cos(Angle) - $Z*sin(Angle)
replace $Z with $X*sin(Angle) + $Z*cos(Angle)

Rotate Z:
replace $X with $X*cos(Angle) + $Y*sin(Angle)
replace $Y with -$X*sin(Angle) + $Y*cos(Angle)
Twist:

max( max( $Y^2-1, ($Z*sind($Y*2*$PI*ch("N")) + $X*cosd($Y*2*$PI*ch("N")))^2-1 ), ($Z*cosd($Y*2*$PI*ch("N")) - $X*sind($Y*2*$PI*ch("N")))^2-1 )

Parameter "N" is N turn/unit.

Twist in X:
replace $Y with $Z*sin($X*2*$PI*ch("N")) + $Y*cos($X*2*$PI*ch("N"))
replace $Z with $Z*cos($X*2*$PI*ch("N")) - $Y*sin($X*2*$PI*ch("N"))

Twist in Y:
replace $X with $Z*sin($Y*2*$PI*ch("N")) + $X*cos($Y*2*$PI*ch("N"))
replace $Z with $Z*cos($Y*2*$PI*ch("N")) - $X*sin($Y*2*$PI*ch("N"))

Twist in Z:
replace $Y with $X*sin($Z*2*$PI*ch("N")) + $Y*cos($Z*2*$PI*ch("N"))
replace $X with $X*cos($Z*2*$PI*ch("N")) - $Y*sin($Z*2*$PI*ch("N"))
Thickening:

abs($Y*3 + noise( $X*2, 0, $Z*2 ) ) - 0.3

By simply absolute your open object and minus with a distance you add a thickness to it.


Comments