Published
Edited
Nov 9, 2021
2 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
f = (x,y) => Math.sin(Math.sqrt(x*x+y*y))
Insert cell
fpartialX = (x,y) => x*Math.cos(Math.sqrt(x*x+y*y))/Math.sqrt(x*x+y*y)
Insert cell
fpartialY = (x,y) => y*Math.cos(Math.sqrt(x*x+y*y))/Math.sqrt(x*x+y*y)
Insert cell
Insert cell
position = {
const position = []
let x = x0
let y = y0
for(let i = 0; i <= 1000; i = i + 1){
position.push([x,y])
x = x - .01*fpartialX(x,y)
y = y - .01*fpartialY(x,y)
}
return position
}
Insert cell
x = position[step][0]
Insert cell
y = position[step][1]
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