The steps below will teach you how to mirror an Implicity Body using a Plane the mirror. The steps may be involved the first time around, but as always, we can create a Custom Block with them to easily repeat the process when we need it.
1. Start with the Implicit Body you want to mirror and create a Plane (or implicit body) to use as your mirror. Make both of these blocks Variables and name them.
2. Create a simple vector field. This will be used to create the reflected mirror field.
- Add a Vector Field from Components block
- Set the X, Y, Z values to X, Y, Z
3. Create the Reflected Field
- Add a Multiply block and multiply the scalar field of the Mirror by -2
- Add a Vector Field from Gradient block using the Mirror as the Scalar Field
- Multiply both of the previous steps together
- Add the result of this to the Simple Vector from Step 2. to create the Reflected Vector
3. Remap the Field to Mirror the Object
- Add a Remap Field block
- For Scalar Field input use the Shape from Step 1 (the object to be mirrored)
- Use the Properties from the Reflected block, use X, Y, Z for each input
Follow along with the gif below to see Step 3.
And that’s it! You’ve successfully mirrored your object.
As an added bonus with this Custom Block, you can use any Implicit Body or Plane as the Mirror Plane. Try mirroring your object with a sphere.
Bonus: How to load in a Custom Block
- Download the Custom Block file provided with this tutorial
- Open nTop Platform
- Click on the + icon at the far right of the Notebook
- Import your Custom Block
Are you still having issues? Reach out to the support team, and we’ll be happy to help!
Thanks for following along with this tutorial and for using nTop Platform.