Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Chaotic Magnetic Pendulum with Custom Radial Forces in Houdini [Video]

DZone's Guide to

Chaotic Magnetic Pendulum with Custom Radial Forces in Houdini [Video]

Here's another project that roughly simulates the effect of a magnetic pendulum and visualizes the resulting attractor.

· Mobile Zone
Free Resource

Download this comprehensive Mobile Testing Reference Guide to help prioritize which mobile devices and OSs to test against, brought to you in partnership with Sauce Labs.

Following on from my recent post about creating a double pendulum in SideFX Houdini, here's another project that roughly simulates the effect of a magnetic pendulum and visualizes the resulting attractor.

The system consists of a single pendulum and four fields visualized as small spheres. The blue spheres indicate a repulsive radial force and the red spheres indicate an attractive radial force.

Perhaps surprisingly, Houdini doesn't come with a radial force "out-of-the-box", so I turned to the VOP Force dynamics node to create my own. This node allows the creation of custom forces based on a VOP network and sits inside my DOP network. My radial force looks like this:

It's not quite a gravitational force because it ignores mass, but my node does apply an impulse in the direction between the affected object and the input position based on the inverse square of the distance between them.

The one gotcha was that, by default, Houdini dynamics "sleeps" stationary objects. Luckily, my pendulum RBD Object has an initial velocity and remains active over the 500 frames in the video above.

The final DOP Network has four of these custom radial force nodes - two with negative strengths and two with positive strengths yielding the final result.

Analysts agree that a mix of emulators/simulators and real devices are necessary to optimize your mobile app testing - learn more in this white paper, brought to you in partnership with Sauce Labs.

Topics:
houdini ,mobile ,pendulum

Published at DZone with permission of Simon Gladman, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}