Methods for blending TPMS (and lattices) without the mix block

Objective:

Learn how to blend TPMS (and lattices) without using the Mix block.

Applies to:

  • ModelIng
  • Lattices

Procedure:

Using a Sine Wave transition

Inverse Distance Weighting

Advanced - Using Equations

 

Using a Sine Wave transition

mceclip1.png

1. Create two bodies with the TPMS or Lattice of your choice. Make these the same size.

2. Add a Ramp block

    • For the Field input:
      • Create the equation sin (x/10) using Math blocks.
      • Add an Absolute (Abs) block and insert your equation so only the absolute values are returned.
    • Set the In min to 0
    • Set the In max to 1
    • Set the Out min to your TPMS body
    • Set the Out max to your second TPMS body

When the value is 0, it will be the first TPMS body. When it is at 1, it will be the second TPMS body. You can change the TPMS body for any lattice body. With this method, you can get creative and change the equation around.

mceclip2.png

Example File Link

 

Inverse Distance Weighting

This method uses inverse distance weighting

You provide points (corresponding to the interpolation centers) and an exponent which controls the decay. As the exponents go to minus infinity, one gets a sharp Boolean Union of the Voronoi regions of the points. In the gif, you can see how the wiggling of the exponents changes the transition regions.

tpms_interpolation.gif

 

Custom block, the Shepard Equation

    • Interpolation Point input: the interpolation center for that TPMS.
    • Decay Exponent input: the decay exponent. (These values can be the same for each body or vary, depending on the blend you want).

For two TPMS bodies, the equation looks like this:

(TPMS1 * Shepard Equation1) + (TPMS2 * Shepard Equation2) / 
(Shepard Equation1 + Shepard Equation2)

For three TPMS bodies, the equation looks like this:

(TPMS1 * Shepard Equation1) + (TPMS2 * Shepard Equation2) + (TPMS3 * Shepard Equation3) / 
(Shepard Equation1 + Shepard Equation2 + Shepard Equation3)

Follow the pattern to add more bodies.

To create this method in nTop:

1. Create three bodies with the TPMS or Lattice of your choice. Make these the same size.

2. Create a Point for each interpolation center. We are using a Polygon to create three points on the same plane, but any method for creating points works.

3. Import the Shepard Equation custom block. 

    • Right-click on the Decay Exponent to create a variable (we are going to use the same value for each body)

4. Create a Shepard Equation block for each TPMS body. Use the Interpolation point that relates to each body.

5. Create the equation from above to build the TPMS transitions.

shepards.png

Advanced - Using Equations

You can use TPMS equations with an interpolator to create a blend.

We want to interpolate from "x" to "a * x + b".  Therefore, we introduce a parameter t in [0, 1] and produce:

t * a * x + (1 - t) * x + t * b 

or

(t * a + (1 - t)) * x + t * b

When t = 0, the expressions reduce to "x". 
When t = 1, it's "a * x + b".

Using the Split P Expression defined in this article.

1.1*(sin(2*x)*sin(z)*cos(y)+sin(2*y)*sin(x)*cos(z)+sin(2*z)*sin(y)*cos(x))
-0.2*(cos(2*x)*cos(2*y)+cos(2*y)*cos(2*z)+cos(2*z)*cos(2*x))-0.4*(cos(2*x) + cos(2*y) +cos(2*z))

This method implements the expression above, with an interpolator, so it's equivalent to the Gyroid at param = 0 and the Split P at param = 1.

mceclip0.png

Download the example file to see how this method is created in nTop. 

 

And that’s it! You’ve successfully learned several different methods to blend TPMS without the mix block

Are you still having issues? Contact the support team, and we’ll be happy to help!

More on this topic:

Keywords:

 tpms blend how-to weighting distance equation mix inverse 
Was this article helpful?