POV-Ray : Newsgroups : povray.binaries.scene-files : Making functions for natural cubic splines : Re: Making functions for natural cubic splines Server Time
1 May 2024 05:05:39 EDT (-0400)
  Re: Making functions for natural cubic splines  
From: Bald Eagle
Date: 15 Oct 2014 10:05:00
Message: <web.543e7e995b2bbe7b5e7df57c0@news.povray.org>
I figured that there had to be a scaling to the screen relative to the range of
the point coordinates - I was just way too tired to "get it."

for p = 0 to N
    #grid, "size 5"
    #grid, "down"
    #grid, "color pink"
    #grid, "set "; Abscissa(XX(p), MinX, MaxX); " "; Ordinate(YY(p), MinY, MaxY)
    #grid, "up"
next p

Seems to work ok - except for the far right point, probably since the window
isn't full screen.  Multiplying ordinate and abscissa by 0.9 inside the function
scales that down a bit, and all 5 points are visible.

Now I just need to work out how to draw the right x,y curves in 2d and splice
out the parts between the endpoints, excluding the control points.  I'm guessing
studying the POV code that already graphs the curves might clue me in if I'm
alert enough to follow what's happening


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.