How to create the curved lines?

Hi,

I created the magnetic object which is having the magnetic field surround that. Now i want to show the field using the lines, but i dont know how to do that. please help me if you know and tell me if any free tools available.

Thank you.

Hi,

We’ve talked once before about creating magnets; I suggested using my Asset Store package called Magnetodynamics. When combined with Vectrosity, you can make smoothly varying magnetic field lines in real-time without any coding. (This demo shows that aspect of the package.) Since Magnetodynamics costs $25 and Vectrosity costs $30, this solution would be $55.

To do it for free, you need to solve two problems: following field contours and drawing lines. The first problem can be solved using a numerical differential equations technique called Euler’s Method (for the first-order case) or Runge-Kutta (for the fourth-order case). For real-time performance, I found that a second-order method (which has no name, as far as I’m aware) is the best compromise between speed and accuracy. I found chapter 17 of Numerical Recipes (Integration of Ordinary Differential Equations) to be very helpful in working this out. It may not seem like electromagnetic field lines are a differential equation, but they are if you think of the field vectors as a gradient. I described this in some detail in my Magnetodynamics Documentation, which is available for free.

Beyond that, I don’t know of a free solution to the second problem— drawing lines. That’s why I used Vectrosity (the only dependency in my package).

Good luck!
– Jim