You are viewing the course site for a past offering of this course. The current offering may be found here.
Lecture 7: Geometry And Splines (50)
georgebzhang

Is 1/2 applicable to 3D space?

moridin22

Yes, the 1/2 will be there no matter how many dimensions we have. Intuitively, I think the reason it's there is because (for example) p2 and p0 are two points apart, so when you take the difference you want to divide by 2 to account for that. If slope is (change in y) / (change in x), then (change in y) = p2 - p0 and (change in x) = 2. Otherwise, all these tangent vectors would look super long.

zehric

I'm a bit confused about this. Don't each of the points have x, y components? How would p2 - p0 be just the y component?

DavidVakshlyak

@moridin22 are you sure that's right? change in y has to be a scalar value (Assuming we are in R2 where y is second component), and p2-p0 is another vector (notice the bold font). How can scalar value = vector?

moridin22

I didn't mean it as a rigorous mathematical explanation, more like a rough idea for why the convention is this way - you could have some other number there instead of 1/2 and you'd still have a curve with the same properties, but it would look a bit different (this appears to be called adjusting the tension of the curve from here: https://www.cs.drexel.edu/~david/Classes/CS536/Lectures/L-04_Hermite_Catmull_Rom.pdf).

julialuo

How do we define the order that we trace the points? Are they another input to the program or are they determined by some sort of algorithm like convex hull?

amandaawan

How do we choose which tangent vector is calculated? It seems like the lines would be drawn differently if for example, we calculated the tangent vector for p3 as 1/2*(p2-p4) rather than 1/2*(p4-p2) while keeping the tangent at p2 the same...

sheaconlon

@julialuo I think the order would have to be defined by the program, since you may wish for the curve to go from point A, to a further-away point B, then back to a closer point C. It can't really be assumed that you want it to go through the closest point after A.

VioIchigo

@amandaawan when you implement the algorithm, you wish to draw a smooth path that passes through a series of points, which should have an order that is defined by you, so that the algorithm just follow that order to calculate the tangent.

You must be enrolled in the course to comment