Published
Edited
Nov 21, 2018
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
//#region Cosas que necesito sólo si estoy en nteract
// Es necesario instalar con NPM algunos paquetes en el directorio local:
// jsdom, p5, p5.js-svg, mathjs y mathjax-node
// No copiar en el caso de Observable
//if (nteract) {
// JSDOM = require('jsdom').JSDOM
// dom = new JSDOM()
// window = dom.window
// document = dom.window.document
// screen = dom.window.screen
// navigator = dom.window.navigator
// p5 = require('p5')
// require('p5.js-svg')(p5)
// math = require('mathjs')
// Vamos a utilizar MathJAX en el servidor en el caso de nteract
// mjAPI = require('mathjax-node')
// mjAPI.start()
// Función que me renderiza código LaTeX como SVG que luego puedo pintar en nteract
//toTeX = function(mathTeXCode) {
// var svgCode = 'Error'
// mjAPI.typeset(
// { math: mathTeXCode, format: 'TeX', svg: true },
//data => !data.errors && (svgCode = data.svg)
// )
// return svgCode
// }
//}
//#endregion
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
//Bz = 1.0 // Componente z del campo magnético

Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
//#region Proxy que pinta el código LaTeX
// No hace falta con Observable ya que este utiliza su propio sistema
// para pintar LaTeX (descrito hacia el final)
//physicalPropertyTeXHandler = {
//set: () => {
//katex.render(`\\vec{v} = ${texMatrix(speed)}\\qquad\\vec{a} = ${texMatrix(accel)}`, mathArea)
//}
//}


Insert cell
//speedProxy = new Proxy(speed, physicalPropertyTeXHandler)
//#endregion
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Type JavaScript, then Shift-Enter. Ctrl-space for more options. Arrow ↑/↓ to switch modes.

Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more