I'm trying to implement a way to visualize magnetic fields and after some googling I settled on using Catmull Rom Splines to create the curves necessary. One of the things I wanted to do however was have arrows move along the lines to indicate direction. I figured I could just do this by incrementing the parameter variable t from 0 to 1, then moving the 4 active points being used each time, thus giving me my x,y,z coordinates I would need each frame. The issue I have with this is that given the equation for Catmull Rom splines this seems like it would be really costly (especially give that there will be a lot of lines in the scene). Is there a better way to do this? Sorry if it is not explained well and thanks in advance.
Asked
Active
Viewed 653 times
0
-
Have you looked into Line Integral Convolution, see http://www.zhanpingliu.org/Research/FlowVis/LIC/LIC.htm? – Wolfgang Kuehn Oct 09 '12 at 21:25
-
I know this doesn't answer the question but I wanted to mention that the default Catmull-Rom implementation is prone to loops and other artifacts. The centripetal parameterization discussed here gives better results: http://stackoverflow.com/questions/9489736/catmull-rom-curve-with-no-cusps-and-no-self-intersections/19283471#19283471 – Ted Oct 09 '13 at 23:09