visjs实现三维可视化坐标轴分布图表效果代码

代码语言:html

所属分类:图表

代码描述:visjs实现三维可视化坐标轴分布图表效果代码

代码标签: visjs 三维 可视化 坐标轴 分布 图表

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en" >

<head>

  <meta charset="UTF-8">
  

<link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/vis.4.21.0.css">
<script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/math.2.5.0.js"></script>
<script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/vis.4.21.0.js"></script>


</head>

<body>
  <div>
    f(x,y) =
    <input type="text" id="inputEquation3D" />

  </div>
  <div>
    x ranges from
    <input type="text" id="xStart" /> to
    <input type="text" id="xEnd" />
  </div>
  <div>
    y ranges from
    <input type="text" id="yStart" /> to
    <input type="text" id="yEnd" />
  </div>
  <div>
    number of points to plot
    <input type="text" id="steps" />
  </div>
  <div>
    <input type="button" value="Graph 3D" id="calculate3D" cd/>
  </div>


  <!--
    <div>
        f(x) =
        <input type="text" id="inputEquation2D" />
        <input type="button" value="Graph 2D" id="calculate2D" cd/>
    </div>
-->


  <h3 id="example">Example Graph: f(x,y) = x + y </h3>

  <div id="visualization"></div>



      <script>
/*
Copyright by: Alex Chenxing Ouyang
Github Repo: https://github.com/AlexOuyang/3DGrapher

*/

// Create and populate a data table.
// var f1 = function (x) {
//     return Math.sin(x);
// }
//
// var f2 = function (x, y) {
//     return Math.sin(x) + Math.cos(y);
// }
//
// var f3 = function (x, y) {
//     return 1 / (x + y);
// }

console.log("good");

math.config({
  number: 'number' // Default type of number: 
    // 'number' (default), 'bignumber', or 'fraction'
});

function escapeRegExp(str) {
  return str.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1");
}

function replaceAll(str, find, replace) {
  return str.replace(ne.........完整代码请登录后点击上方下载按钮下载查看

网友评论0