-
-
Notifications
You must be signed in to change notification settings - Fork 477
added graphing 2d equations example #953
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@two-ticks Looks good so far. Are you thinking about adding KaTeX equation formatting at this point or is this ready to merged? |
|
||
function draw() { | ||
loadPixels(); | ||
var n = (mouseX * 10.0) / width; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you update this to ES6 and use const
or let
for these?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes :
let n = (mouseX * 10.0) / width;
const w = 16.0; // 2D space width
const h = 16.0; // 2D space height
const dx = w / width; // Increment x this amount per pixel
const dy = h / height; // Increment y this amount per pixel
let x = -w / 2; // Start x at -1 * width / 2
let y;
let r;
let theta;
let val;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you please update to ES6 in all three files? thanks!
updated es6 in all three files |
looks great, thanks! |
Fixes #952
Added Graphing 2D Equations example to http://p5js.org/examples from https://processing.org/examples/
https://editor.p5js.org/radium.scientist/full/t7snmm5qy