Three.js implements the surface of plot?

This is the surface generated by plot’s Surface feature.


Click here.
I want to know how can three.js achieve the same effect ?

Which one? Deformed sphere (or what surface is it)? Colors on the object? The grid on background?

Same shape and colors. I’ve tried a lot of things, but nothing works

Hm, interesting. I just didin’t get the algo for indices to form a surface from points :thinking:

There appears to be equal number of points on each layer… This is quite strong alleviation.

1 Like

Then the using of PlaneGeometry is enough :slight_smile:

1 Like

TKS, I’ll try it.

Would be cool to see the code of your implementation :slight_smile:

*Why can’t I combine them into a surface ?

Because your geometry needs .index, that forms faces by indices of vertices. PlaneGeometry has index of the desired structure.

Is there any example help to learn this?

Source code of PlaneGeometry: three.js/PlaneGeometry.js at 560c5fcba722d9b37884a6925895d64195cd675e · mrdoob/three.js · GitHub

You can create an instance of PlaneGeometry of a certain segmentation and then substitute its points with points, that you obtained from the plot. Don’t forget to re-compute vertex normals afterwards.

TKS,I have finished.

Can you show how you updated the vertices? I’m trying the same but I’m stuck.

Thanks

This is what I came up with: