Any command/tool for generating a quadratic surface(quadric) given 9 points?

panescudumitru shared this question 4 years ago
Answered

Is there any command in 3D to generate the quadratic surface defined by 9 points in space? If not, are you aware of anybody who has written a sketch of this? I can solve the generic equation for a quadric in Mathematica, but that takes quite a bit of time (and accuracy when plugging in values).

Comments (12)

photo
1

I'm sure I've seen that using GeoGebra's matrix commands (but I can't find it :( )


Hopefully this helps:


https://math.stackexchange....

photo
1

How's this? Exact for 6 points: https://www.geogebra.org/m/fqfe5trp


(it can be made more efficient if the points only move vertically as M_A will then be constant)


I think you can probably use the SVD command if you want "best fit" through eg 9 points


https://wiki.geogebra.org/e...

photo
1

Hi Michael,


I made a try to calc quadrik by

f(x,y)=Sum(m3 {x², y², x y, x, y, 1})

can you check the result too?

got a list. why?

BTW

my ipad do not give me the keyboard using online app - had to download the file to work with, great work!

I remember there was a post to this?

photo
1

I think that's OK. Try

Sum(Sum(m3 {x², y², x y, x, y, 1}))

photo
photo
1

I think this is OK for 9 points (maybe you can check against your Mathematica answers to verify)


https://www.geogebra.org/m/dwsk5nwg

photo
1

Sorry, didn't use enough terms. I've updated https://www.geogebra.org/m/fqfe5trp so it's now exact for 9 points :)

photo
1

I used the CAS to substitute into the general equation of a quadric the coordinates of the nine points, solve the resulting system of equations and again substitute the solution into the equation. I thus obtained the equation of the quadric, see here the result: https://www.geogebra.org/m/mxpdmt4n

photo
1

with brute force. but I am afraid the PC crashes

photo
1

Works well here (also in browser!)

photo
photo
1

... and much shorter solutions from Zbynek


Fit({A, B, C, D, E, F, G, H, I}, {1, x, y, x y, x², y²})

Fit({A, B, C, D, E, F, G, H, I}, {1, x, y, x y, x², y², x² y, x y², x² y²})

photo
1

... and what the original poster actually wants I think from Mathieu :)


https://www.geogebra.org/m/xqkwgcan

photo
1

awesome

but they fail when (0,0,0) is in quadric (mine too)

this problem was also implementing conic

© 2023 International GeoGebra Institute