OtagoHarbour
OtagoHarbour

Reputation: 4183

Interpolating Missing Data with Javascript-surface-plot

I have started using Javascript-surface-plot to make 3D surface on the client side. I fill google.visualization.DataTable with (x,y,z) values that I have available. I cannot assign a z value to every (x,y) coordinate since there are none available. As a consequence, instead of have a smooth surface, I have spikes where the data is assigned and the plot is zero elsewhere.

Is there a way to use Javascript-surface-plot to interpolate among the non-zero elements (or better still, form a Bezier surface)? If not, is there a JavaScript-based 3D surface plotting program that does?

Upvotes: 1

Views: 344

Answers (1)

Greg Ross
Greg Ross

Reputation: 3498

Currently there is no built-in support for interpolation. I will keep this in mind, though and try to implement it at some point. In the meantime, you could apply bilinear interpolation to your input matrix and this should smooth out the surface.

Upvotes: 1

Related Questions