# xah wolfram language notes

xtodo working on updating my 20 years old Mathematica stuff.

• ParaPlot
• PlaneCurveFormulas
• PlaneCurveGenerator
• TrochoidPlot
• TrochoidShow
• RuledSurfacePlot
• Transform2DPlot

### Implementing Contour Plot 3D

This is interesting and hard to implement. The function takes a 3D array. Then, create a surface that basically connects similar values together. Say, you have a 3d array, each value is a number from 1 to 1000.

ListContourPlot3D[array] generates a contour plot from a three-dimensional array of values. ListContourPlot3D[{{x1, y1, z1, f1}, {x2, y2, z2, f2}, ...}] generates a contour plot from values defined at specified points in three-dimensional space.

needs computational geometry knowledge to implement this.

actually this post should be in #programing .

first hard problem is , imagine you have a 3d matrix, how to you find out the indexes for elements in the matrix that have the same value? (let's assumes all the values are integers. forget about float or approximately equate as required) this is non-trivial to implement it efficiently.

second non-trivial problem: once you found indexes that have the same value, you need to determine if they are adjacent in 3D space. Basically, the indexes for each el in matrix is its coordinate. If 2 same value are not connected, you don't draw surface.

3rd hard problem is, given a bunch of points in 3d space forming a surface, you need to triangulate them into a mesh in order to draw the surface. classic computational geometry problem.

omg this is one level harder. computational geometry! once you have a surface, and given a plane intersecting it. you need to draw curves on the plane to show the intersection (like cross section). The plane can actually be ANY surface!

one can get a phd in computational geometry just for creating a algorithm to solve this problem efficiently. i presume it's mostly solved problem.