Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Weird anomaly when crossing an axis
#1
I have a spline that is comprised of 271 points.  There is a strange anomaly in the curve for these 3 points.

CP0007 = -128.562, 132.193, -380
CP0008 = -121.812. 131.842, -380
CP0009 = 7.25, 125.961, -331

Between points CP0007 and CP0008 the curve torques backward as shown in the attachment.  This is clearly not the intent of the math, if math is capable of having an intent.  It is likely associated with crossing the x axis in segment CP008-CP009.

It is not trivial for me to move the points as they are captured and saved to a file.  My code will be loading them from a file and creating a spline accordingly.  

Thanks in advance for your assistance.

electronically yours,
rda


Attached Files Image(s)
   
Reply
#2
I'd like to look at that curve, could you please create a package from it? (and exclude Dependencies - just the spline with it's CPs is sufficient).

Thanks
Reply
#3
It is not that easy.  I am tiling a universe for the general case, and using the camera path from a larger coord system and translating it to my coords.  But I have touched up the file loader that can be used by you with the points in the attachment.  This should get you the test case you need.

There is a header that contains a vert count and a camera linear velocity and an angular velocity.  Each vert line also contains Euler angles for camera orientation that is studiously ignored by the loader.

digitally yours,
rda


Attached Files
.cs   SplineFromFile.cs (Size: 2.01 KB / Downloads: 4)
.txt   JN_full.txt (Size: 10.36 KB / Downloads: 2)
Reply
#4
Looks like regular CR behaviour caused by the subsequent CP is placed far away while the "sharp corner" has short segments in relation. Found a CR snippet on the web to quickly test it and the results are the same: http://www.actionsnippet.com/swfs/catmull_rom.html. But you could use Bezier with AutoHandles enabled to force the math into the right intention  Big Grin


Attached Files Image(s)
   
Reply
#5
I have already switched to the Bezier interpolation which handles the points well. Thx.

intentionally yours,
rda
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  road crossings like T-Crossing or X-Crossing with Curvy? Econt 1 745 08-13-2020, 01:07 PM
Last Post: _Aka_
  Moving freely on the Y axis? clearleaf 6 4,204 01-30-2020, 11:21 AM
Last Post: ATHellboy
  y axis rotation flowerfire 1 3,169 12-22-2016, 08:14 PM
Last Post: Jake
  Position in path relative to Z world axis socoman3 5 9,438 02-09-2015, 02:34 PM
Last Post: Jake

Forum Jump: