How to warp a lattice with sine wave spacing

Objective:

Learn how to warp a lattice using a sine wave field.

Applies to:

  • Lattices
  • Remap field

Procedure:

1a. Create a design space:

    • Import or create the geometry where you want the lattice to fill (this will be used at the end)
      • Create a Box with length 50 mm, width 10 mm, and height 10 mm

1b. Create a lattice in a region larger than the design space: (this allows us to create the sine field in a larger area and trim it down after)

    • Add a Periodic Lattice Body* block (*This is a beta block)
      • Insert a Graph Unit Cell
        • Set the unit type to Body-Centered Cubic
      • Insert a Rectangular Cell Map
        •  Volume: Insert your own larger design space or add a Box with a length of 500 mm, width of 10 mm, and height of 10 mm (this is a lot longer than the design space created in Step 1a)
        • Set the Cell Size to 1 x 1 x 1 
      • Set the Thickness to 0 mm

sine_wave_1.jpg

2. Create the Sine wave field:

    • Add a Sin block
      • Insert a Divide block into the Operand input
        • Operand A: x
        • Operand B: 1mm
    • Add a Multiply block
      • Operand A: Insert the Sin block
      • Operand B: 1 mm

The divide and multiply blocks remove and re-assign units. The values of 1 mm can be changed to alter the wavelength and the amplitude. 

sine_wave_2.jpg

To preview the field, select the Multiply block and hit 'f' to bring up the Field Viewer. Set the Colormap to 'Turbo'. Below, you can see the visualization of the sine wave.

sine_wave_5.jpg

    • Add a Remap Field block (this re-maps the lattice field with the sine wave in the x-axis)
      • Scalar Field: Insert the Implicit Property chip from the Periodic Lattice Body in Step 1
      • X: Insert the Multiply block
      • Y: Y
      • Z: Z

sine_wave_1.gif

3. Normalize the Field: This block is useful for remapping fields with severe deformations. It helps make the thickness more accurate. Without it, the underlying field can be stretched. 

4. Thicken the Lattice:

    • Add a Thicken Body block
      • Insert the Normalize Field block from Step 3
      • Set the Thickness to 0.25 mm

5. Trim the Lattice:

    • Add a Boolean Intersect block
      • Body 0: Thickened Lattice
      • Body 1: Design Space

sine_wave_4.jpg

In the image below, we compare the lattice to the sine wave field. You can see the lattice is elongated where the sine wave is at the min and max values.

sine_wave_3.jpg

And that’s it! You’ve successfully warped your lattice with a sine wave

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

Download the Example file:

More on this topic:

Keywords:

 field lattice thicken view cell periodic unit remap multiply math beta mapping trim warp how-to size re sine sin wave normalize divide turbo 
Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.