Hard math and 3d shapes using canvas and javascript

I have an old friend who is a mathematician. He has his own math to squeeze his formulas, which are incredibly beautiful.

He works in Mathematica, which converts formulas for 3D shapes.

I wonder if these numbers can be obtained using Canvas and JavaScript? See the attached formula and figure.

I know little about it myself. But I would be glad if someone could show me an example.

formula

3D shape

+5
source share
4 answers

Since you mention Mathematica, I will use it to provide some more examples for various t values. However, I can not help you with the canvas.

This is the Mathematica code:

With[{a = 3, t = 0.7}, 
 RegionPlot3D[
  10^-(t x + y)^10 + 10^-(-t x + y)^10 + 10^-(t y + z)^10 + 
    10^-(-t y + z)^10 + 10^-(t z + x)^10 + 10^-(-t z + x)^10 > 
   5/2, {x, -a, a}, {y, -a, a}, {z, -a, a}, PlotPoints -> 50, 
   Boxed -> False, Axes -> None
 ]]

t = 0.2

Mathematica graphics

t = 0.4

Mathematica graphics

t = 0.7

Mathematica graphics

t = 1

Mathematica graphics

+5

. javascript-surface-plot http://www.grvisualisation.50webs.com/javascript_surface_plot.html. , .

, , , . javascript.

, , , , , . html canvas 3d plot .

+4

:

  • - 3D--: K3D
  • javascript:

( ), - MatLab/Maple , 2D- . 3D-, . Python script, , html (rememer, - , html ). html EaselJS

+1

, WebGL . 3D.

There may be libraries that can display out of the box functions, but this is a new technology, so you might have to write most of this.

+1
source

All Articles