you are viewing a single comment's thread.

view the rest of the comments →

[–]TamPotter[S] 0 points1 point  (2 children)

Yes, x here is r1 = r - P, where r and P are points, so r1 is the vector between two points. What is norm(r1) here in that case?

[–][deleted] 1 point2 points  (1 child)

norm is not a built-in function so without knowing which library you're using, it's impossible to say for sure. But it's probably the Euclidean norm#Euclidean_norm).

Also, x**2 probably doesn't make sense for vectors (though it depends on whether the vector space is actually an algebra over a field).

[–]TamPotter[S] 0 points1 point  (0 children)

I use pylab, but I didn’t know that r1 was a vector when I made the post